Strided Matrix Fill Kernels
Module: Strided Matrix operations / strided matrix fill
Functions
Name | |
---|---|
void | plp_mat_fill_stride_f32p_xpulpv2(void * args) Fill an MxN strided 32-bit floats matrix on XpulpV2 in parallel. |
void | plp_mat_fill_stride_f32s_xpulpv2(uint32_t M, uint32_t N, uint32_t stride, float value, float *restrict pDst) Fill an MxN strided 32-bit floats matrix on XpulpV2. |
void | plp_mat_fill_stride_i16p_xpulpv2(void * args) Fill an MxN strided 16-bit integers matrix on XpulpV2 in parallel. |
void | plp_mat_fill_stride_i16s_rv32im(uint32_t M, uint32_t N, uint32_t stride, int16_t value, int16_t *restrict pDst) Fill an MxN strided 16-bit integers matrix on RV32IM. |
void | plp_mat_fill_stride_i16s_xpulpv2(uint32_t M, uint32_t N, uint32_t stride, int16_t value, int16_t *restrict pDst) Fill an MxN strided 16-bit integers matrix on XpulpV2. |
void | plp_mat_fill_stride_i32p_xpulpv2(void * args) Fill an MxN strided 32-bit integers matrix on XpulpV2 in parallel. |
void | plp_mat_fill_stride_i32s_rv32im(uint32_t M, uint32_t N, uint32_t stride, int32_t value, int32_t *restrict pDst) Fill an MxN strided 32-bit integers matrix on RV32IM. |
void | plp_mat_fill_stride_i32s_xpulpv2(uint32_t M, uint32_t N, uint32_t stride, int32_t value, int32_t *restrict pDst) Fill an MxN strided 32-bit integers matrix on XpulpV2. |
void | plp_mat_fill_stride_i8p_xpulpv2(void * args) Fill an MxN strided 8-bit integers matrix on XpulpV2 in parallel. |
void | plp_mat_fill_stride_i8s_rv32im(uint32_t M, uint32_t N, uint32_t stride, int8_t value, int8_t *restrict pDst) Fill an MxN strided 8-bit integers matrix on RV32IM. |
void | plp_mat_fill_stride_i8s_xpulpv2(uint32_t M, uint32_t N, uint32_t stride, int8_t value, int8_t *restrict pDst) Fill an MxN strided 8-bit integers matrix on XpulpV2. |
Detailed Description
There are functions for integer 32- 16- and 8-bit data types, as well as for floating-point. The naming scheme of the functions follows the following pattern (for example plp_mat_fill_stride_i32s_xpulpv2
):
`plp_<function name>_<data type><precision><method>_<isa_extension>`
name | description |
---|---|
function_name | mat_fill_stride |
data type | {f, i, q} respectively for floats, integers, fixed points |
precision | {32, 16, 8} bits |
method | {s , v , p } meaning scalar, vectorized (i.e. SIMD) and parallel, respectively |
isa_extension | {rv32im , xpulpv2 } respectively for ibex and riscy |
The stride
argument tells how many elements are in between the start of each row of the matrix. In other words, it is the width of the original matrix. Strided Matrix operations
Functions Documentation
function plp_mat_fill_stride_f32p_xpulpv2
void plp_mat_fill_stride_f32p_xpulpv2(
void * args
)
Fill an MxN strided 32-bit floats matrix on XpulpV2 in parallel.
Parameters:
- args pointer to plp_mat_mat_fill_stride_instance_f32 struct initialized by plp_mat_fill_stride_f32_parallel
Return: none
function plp_mat_fill_stride_f32s_xpulpv2
void plp_mat_fill_stride_f32s_xpulpv2(
uint32_t M,
uint32_t N,
uint32_t stride,
float value,
float *__restrict__ pDst
)
Fill an MxN strided 32-bit floats matrix on XpulpV2.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i16p_xpulpv2
void plp_mat_fill_stride_i16p_xpulpv2(
void * args
)
Fill an MxN strided 16-bit integers matrix on XpulpV2 in parallel.
Parameters:
- args pointer to plp_mat_mat_fill_stride_instance_i16 struct initialized by plp_mat_fill_stride_i16_parallel
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_fill_stride_i16s_rv32im
void plp_mat_fill_stride_i16s_rv32im(
uint32_t M,
uint32_t N,
uint32_t stride,
int16_t value,
int16_t *__restrict__ pDst
)
Fill an MxN strided 16-bit integers matrix on RV32IM.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i16s_xpulpv2
void plp_mat_fill_stride_i16s_xpulpv2(
uint32_t M,
uint32_t N,
uint32_t stride,
int16_t value,
int16_t *__restrict__ pDst
)
Fill an MxN strided 16-bit integers matrix on XpulpV2.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i32p_xpulpv2
void plp_mat_fill_stride_i32p_xpulpv2(
void * args
)
Fill an MxN strided 32-bit integers matrix on XpulpV2 in parallel.
Parameters:
- args pointer to plp_mat_mat_fill_stride_instance_i32 struct initialized by plp_mat_fill_stride_i32_parallel
Return: none
function plp_mat_fill_stride_i32s_rv32im
void plp_mat_fill_stride_i32s_rv32im(
uint32_t M,
uint32_t N,
uint32_t stride,
int32_t value,
int32_t *__restrict__ pDst
)
Fill an MxN strided 32-bit integers matrix on RV32IM.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i32s_xpulpv2
void plp_mat_fill_stride_i32s_xpulpv2(
uint32_t M,
uint32_t N,
uint32_t stride,
int32_t value,
int32_t *__restrict__ pDst
)
Fill an MxN strided 32-bit integers matrix on XpulpV2.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i8p_xpulpv2
void plp_mat_fill_stride_i8p_xpulpv2(
void * args
)
Fill an MxN strided 8-bit integers matrix on XpulpV2 in parallel.
Parameters:
- args pointer to plp_mat_mat_fill_stride_instance_i8 struct initialized by plp_mat_fill_stride_i8_parallel
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_fill_stride_i8s_rv32im
void plp_mat_fill_stride_i8s_rv32im(
uint32_t M,
uint32_t N,
uint32_t stride,
int8_t value,
int8_t *__restrict__ pDst
)
Fill an MxN strided 8-bit integers matrix on RV32IM.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
function plp_mat_fill_stride_i8s_xpulpv2
void plp_mat_fill_stride_i8s_xpulpv2(
uint32_t M,
uint32_t N,
uint32_t stride,
int8_t value,
int8_t *__restrict__ pDst
)
Fill an MxN strided 8-bit integers matrix on XpulpV2.
Parameters:
- M Height of the matrix
- N Width of the matrix
- stride Stride of the matrix (elements between each row)
- pSrc Points to the output matrix
Return: none
Updated on 2023-03-01 at 16:16:32 +0000