Skip to content

strided matrix fill

Module: Strided Matrix operations

More...

Modules

Name
Strided Matrix Fill Kernels

Functions

Name
void plp_mat_fill_stride_f32(uint32_t M, uint32_t N, uint32_t stride, float value, float *restrict pDst)
Glue code for filling an MxN strided 32-bit floats matrix.
void plp_mat_fill_stride_f32_parallel(uint32_t M, uint32_t N, uint32_t stride, float value, uint32_t nPE, float *restrict pDst)
Glue code for filling an MxN strided 32-bit floats matrix in parallel.
void plp_mat_fill_stride_i16(uint32_t M, uint32_t N, uint32_t stride, int16_t value, int16_t *restrict pDst)
Glue code for filling an MxN strided 16-bit integers matrix.
void plp_mat_fill_stride_i16_parallel(uint32_t M, uint32_t N, uint32_t stride, int16_t value, uint32_t nPE, int16_t *restrict pDst)
Glue code for filling an MxN strided 16-bit integers matrix in parallel.
void plp_mat_fill_stride_i32(uint32_t M, uint32_t N, uint32_t stride, int32_t value, int32_t *restrict pDst)
Glue code for filling an MxN strided 32-bit integers matrix.
void plp_mat_fill_stride_i32_parallel(uint32_t M, uint32_t N, uint32_t stride, int32_t value, uint32_t nPE, int32_t *restrict pDst)
Glue code for filling an MxN strided 32-bit integers matrix in parallel.
void plp_mat_fill_stride_i8(uint32_t M, uint32_t N, uint32_t stride, int8_t value, int8_t *restrict pDst)
Glue code for filling an MxN strided 8-bit integers matrix.
void plp_mat_fill_stride_i8_parallel(uint32_t M, uint32_t N, uint32_t stride, int8_t value, uint32_t nPE, int8_t *restrict pDst)
Glue code for filling an MxN strided 8-bit integers matrix in parallel.

Detailed Description

This module contains the glue code for filling strided matrices. The kernel codes (kernels) are located in the module Strided Matrix Fill Kernels.

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_i32):

`plp_<function name>_<data type><precision>[_parallel]`
name description
function_name mat_fill_stride
data type {f, i, q} respectively for floats, integers, fixed points
precision {32, 16, 8} bits

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_f32

void plp_mat_fill_stride_f32(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    float value,
    float *__restrict__ pDst
)

Glue code for filling an MxN strided 32-bit floats matrix.

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_f32_parallel

void plp_mat_fill_stride_f32_parallel(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    float value,
    uint32_t nPE,
    float *__restrict__ pDst
)

Glue code for filling an MxN strided 32-bit floats matrix in parallel.

Parameters:

  • M Height of the matrix
  • N Width of the matrix
  • stride Stride of the matrix (elements between each row)
  • nPE Number of cores to use for processing
  • pSrc Points to the output matrix

Return: none

function plp_mat_fill_stride_i16

void plp_mat_fill_stride_i16(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int16_t value,
    int16_t *__restrict__ pDst
)

Glue code for filling an MxN strided 16-bit integers matrix.

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_i16_parallel

void plp_mat_fill_stride_i16_parallel(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int16_t value,
    uint32_t nPE,
    int16_t *__restrict__ pDst
)

Glue code for filling an MxN strided 16-bit integers matrix in parallel.

Parameters:

  • M Height of the matrix
  • N Width of the matrix
  • stride Stride of the matrix (elements between each row)
  • nPE Number of cores to use for processing
  • pSrc Points to the output matrix

Return: none

function plp_mat_fill_stride_i32

void plp_mat_fill_stride_i32(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int32_t value,
    int32_t *__restrict__ pDst
)

Glue code for filling an MxN strided 32-bit integers matrix.

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_i32_parallel

void plp_mat_fill_stride_i32_parallel(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int32_t value,
    uint32_t nPE,
    int32_t *__restrict__ pDst
)

Glue code for filling an MxN strided 32-bit integers matrix in parallel.

Parameters:

  • M Height of the matrix
  • N Width of the matrix
  • stride Stride of the matrix (elements between each row)
  • nPE Number of cores to use for processing
  • pSrc Points to the output matrix

Return: none

function plp_mat_fill_stride_i8

void plp_mat_fill_stride_i8(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int8_t value,
    int8_t *__restrict__ pDst
)

Glue code for filling an MxN strided 8-bit integers matrix.

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_i8_parallel

void plp_mat_fill_stride_i8_parallel(
    uint32_t M,
    uint32_t N,
    uint32_t stride,
    int8_t value,
    uint32_t nPE,
    int8_t *__restrict__ pDst
)

Glue code for filling an MxN strided 8-bit integers matrix in parallel.

Parameters:

  • M Height of the matrix
  • N Width of the matrix
  • stride Stride of the matrix (elements between each row)
  • nPE Number of cores to use for processing
  • pSrc Points to the output matrix

Return: none


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