Skip to content

matrix transpose Kernels

Module: Matrix Functions / matrix transpose

More...

Functions

Name
void plp_mat_trans_i16p_xpulpv2(void * args)
Parallel matrix transpose of 16-bit integer matrices kernel for XPULPV2 extension.
void plp_mat_trans_i16s_rv32im(const int16_t restrict pSrc, uint32_t M, uint32_t N, int16_t restrict pDst)
matrix transpose of 16-bit integer matrices kernel for RV32IM extension.
void plp_mat_trans_i16s_xpulpv2(const int16_t restrict pSrc, uint32_t M, uint32_t N, int16_t restrict pDst)
matrix transpose of 16-bit integer matrices kernel for XPULPV2 extension.
void plp_mat_trans_i32p_xpulpv2(void * args)
Parallel matrix transpose of 32-bit integer matrices kernel for XPULPV2 extension.
void plp_mat_trans_i32s_rv32im(const int32_t restrict pSrc, uint32_t M, uint32_t N, int32_t restrict pDst)
matrix transpose of 32-bit integer matrices kernel for RV32IM extension.
void plp_mat_trans_i32s_xpulpv2(const int32_t restrict pSrc, uint32_t M, uint32_t N, int32_t restrict pDst)
matrix transpose of 32-bit integer matrices kernel for XPULPV2 extension.
void plp_mat_trans_i8p_xpulpv2(void * args)
Parallel matrix transpose of 8-bit integer matrices kernel for XPULPV2 extension.
void plp_mat_trans_i8s_rv32im(const int8_t restrict pSrc, uint32_t M, uint32_t N, int8_t restrict pDst)
matrix transpose of 8-bit integer matrices kernel for RV32IM extension.
void plp_mat_trans_i8s_xpulpv2(const int8_t restrict pSrc, uint32_t M, uint32_t N, int8_t restrict pDst)
matrix transpose of 8-bit integer matrices kernel for XPULPV2 extension.

Detailed Description

This module contains the glue code for matrix transpose. The kernel codes (kernels) are in the Module matrix transpose Kernels.

The transpose of a matrix of shape MxN is another matrix of shape NxM, where the the matrix is flipped:

pDst[n, m] = pSrc[m, n]

There are functions for integer 32- 16- and 8-bit data types, as well as for floating-point. These functions can also be used for fix-point matrices.

Functions Documentation

function plp_mat_trans_i16p_xpulpv2

void plp_mat_trans_i16p_xpulpv2(
    void * args
)

Parallel matrix transpose of 16-bit integer matrices kernel for XPULPV2 extension.

Parameters:

Return: none

Par: Exploiting SIMD instructions

The 16 bit values are packed two each into 32 bit vectors and then the two dot products are performed on 32 bit vectors, with 32 bit accumulator.

function plp_mat_trans_i16s_rv32im

void plp_mat_trans_i16s_rv32im(
    const int16_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int16_t *__restrict__ pDst
)

matrix transpose of 16-bit integer matrices kernel for RV32IM extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 16-bit integer matrices for RV32IM extension.

function plp_mat_trans_i16s_xpulpv2

void plp_mat_trans_i16s_xpulpv2(
    const int16_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int16_t *__restrict__ pDst
)

matrix transpose of 16-bit integer matrices kernel for XPULPV2 extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 16-bit integer matrices for XPULPV2 extension.

function plp_mat_trans_i32p_xpulpv2

void plp_mat_trans_i32p_xpulpv2(
    void * args
)

Parallel matrix transpose of 32-bit integer matrices kernel for XPULPV2 extension.

Parameters:

Return: none

Parallel matrix transpose of a 32-bit integer matrices for XPULPV2 extension.

function plp_mat_trans_i32s_rv32im

void plp_mat_trans_i32s_rv32im(
    const int32_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int32_t *__restrict__ pDst
)

matrix transpose of 32-bit integer matrices kernel for RV32IM extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 32-bit integer matrices for RV32IM extension.

function plp_mat_trans_i32s_xpulpv2

void plp_mat_trans_i32s_xpulpv2(
    const int32_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int32_t *__restrict__ pDst
)

matrix transpose of 32-bit integer matrices kernel for XPULPV2 extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 32-bit integer matrices for XPULPV2 extension.

function plp_mat_trans_i8p_xpulpv2

void plp_mat_trans_i8p_xpulpv2(
    void * args
)

Parallel matrix transpose of 8-bit integer matrices kernel for XPULPV2 extension.

Parameters:

Return: none

Par: Exploiting SIMD instructions

The 8 bit values are packed four each into 32 bit vectors and then the four dot products are performed on 32 bit vectors, with 32 bit accumulator.

function plp_mat_trans_i8s_rv32im

void plp_mat_trans_i8s_rv32im(
    const int8_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int8_t *__restrict__ pDst
)

matrix transpose of 8-bit integer matrices kernel for RV32IM extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 8-bit integer matrices for RV32IM extension.

function plp_mat_trans_i8s_xpulpv2

void plp_mat_trans_i8s_xpulpv2(
    const int8_t *__restrict__ pSrc,
    uint32_t M,
    uint32_t N,
    int8_t *__restrict__ pDst
)

matrix transpose of 8-bit integer matrices kernel for XPULPV2 extension.

Parameters:

  • pSrc Points to the input matrix of shape MxN
  • M Height of the input matrix and width of the output matrix
  • N Width of the input matrix and height of the output matrix
  • pDst Points to the output matrix of shape NxM

Return: none

matrix transpose of a 8-bit integer matrices for XPULPV2 extension.


Updated on 2023-03-01 at 16:16:32 +0000