Skip to content

Identity Matrix Creation

Module: Matrix Functions

More...

Modules

Name
Identity Matrix Creation Kernels

Functions

Name
void plp_mat_fill_I_f32(uint32_t N, float *restrict pDst)
Glue code for creating a 32-bit float identity matrix.
void plp_mat_fill_I_f32_parallel(uint32_t N, uint32_t nPE, float *restrict pDst)
Glue code for creating a 32-bit float identity matrix in parallel.
void plp_mat_fill_I_i16(uint32_t N, int16_t *restrict pDst)
Glue code for creating a 16-bit integer identity matrix.
void plp_mat_fill_I_i16_parallel(uint32_t N, uint32_t nPE, int16_t *restrict pDst)
Glue code for creating a 16-bit integer identity matrix in parallel.
void plp_mat_fill_I_i32(uint32_t N, int32_t *restrict pDst)
Glue code for creating a 32-bit integer identity matrix.
void plp_mat_fill_I_i32_parallel(uint32_t N, uint32_t nPE, int32_t *restrict pDst)
Glue code for creating a 32-bit integer identity matrix in parallel.
void plp_mat_fill_I_i8(uint32_t N, int8_t *restrict pDst)
Glue code for creating a 8-bit integer identity matrix.
void plp_mat_fill_I_i8_parallel(uint32_t N, uint32_t nPE, int8_t *restrict pDst)
Glue code for creating a 8-bit integer identity matrix in parallel.
void plp_mat_fill_I_q16(uint32_t N, int32_t fracBits, int16_t *restrict pDst)
Glue code for creating a 16-bit fix-point identity matrix.
void plp_mat_fill_I_q16_parallel(uint32_t N, int32_t fracBits, uint32_t nPE, int16_t *restrict pDst)
Glue code for creating a 16-bit fix-point identity matrix in parallel.
void plp_mat_fill_I_q32(uint32_t N, int32_t fracBits, int32_t *restrict pDst)
Glue code for creating a 32-bit fix-point identity matrix.
void plp_mat_fill_I_q32_parallel(uint32_t N, int32_t fracBits, uint32_t nPE, int32_t *restrict pDst)
Glue code for creating a 32-bit fix-point identity matrix in parallel.
void plp_mat_fill_I_q8(uint32_t N, int32_t fracBits, int8_t *restrict pDst)
Glue code for creating a 8-bit fix-point identity matrix.
void plp_mat_fill_I_q8_parallel(uint32_t N, int32_t fracBits, uint32_t nPE, int8_t *restrict pDst)
Glue code for creating a 8-bit fix-point identity matrix in parallel.

Detailed Description

This module contains the glue code for creating identity matrices. The kernel codes (kernels) are in the Module matFillIKernels.

The identity matrix is a square matrix, with the value 1 on it's main diagonal, and all other values 0.

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

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

Functions Documentation

function plp_mat_fill_I_f32

void plp_mat_fill_I_f32(
    uint32_t N,
    float *__restrict__ pDst
)

Glue code for creating a 32-bit float identity matrix.

Parameters:

  • N Width and height of the matrix
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_f32_parallel

void plp_mat_fill_I_f32_parallel(
    uint32_t N,
    uint32_t nPE,
    float *__restrict__ pDst
)

Glue code for creating a 32-bit float identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i16

void plp_mat_fill_I_i16(
    uint32_t N,
    int16_t *__restrict__ pDst
)

Glue code for creating a 16-bit integer identity matrix.

Parameters:

  • N Width and height of the matrix
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i16_parallel

void plp_mat_fill_I_i16_parallel(
    uint32_t N,
    uint32_t nPE,
    int16_t *__restrict__ pDst
)

Glue code for creating a 16-bit integer identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i32

void plp_mat_fill_I_i32(
    uint32_t N,
    int32_t *__restrict__ pDst
)

Glue code for creating a 32-bit integer identity matrix.

Parameters:

  • N Width and height of the matrix
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i32_parallel

void plp_mat_fill_I_i32_parallel(
    uint32_t N,
    uint32_t nPE,
    int32_t *__restrict__ pDst
)

Glue code for creating a 32-bit integer identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i8

void plp_mat_fill_I_i8(
    uint32_t N,
    int8_t *__restrict__ pDst
)

Glue code for creating a 8-bit integer identity matrix.

Parameters:

  • N Width and height of the matrix
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_i8_parallel

void plp_mat_fill_I_i8_parallel(
    uint32_t N,
    uint32_t nPE,
    int8_t *__restrict__ pDst
)

Glue code for creating a 8-bit integer identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q16

void plp_mat_fill_I_q16(
    uint32_t N,
    int32_t fracBits,
    int16_t *__restrict__ pDst
)

Glue code for creating a 16-bit fix-point identity matrix.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q16_parallel

void plp_mat_fill_I_q16_parallel(
    uint32_t N,
    int32_t fracBits,
    uint32_t nPE,
    int16_t *__restrict__ pDst
)

Glue code for creating a 16-bit fix-point identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q32

void plp_mat_fill_I_q32(
    uint32_t N,
    int32_t fracBits,
    int32_t *__restrict__ pDst
)

Glue code for creating a 32-bit fix-point identity matrix.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q32_parallel

void plp_mat_fill_I_q32_parallel(
    uint32_t N,
    int32_t fracBits,
    uint32_t nPE,
    int32_t *__restrict__ pDst
)

Glue code for creating a 32-bit fix-point identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q8

void plp_mat_fill_I_q8(
    uint32_t N,
    int32_t fracBits,
    int8_t *__restrict__ pDst
)

Glue code for creating a 8-bit fix-point identity matrix.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • pDst Points to the output matrix of shape NxN

Return: none

function plp_mat_fill_I_q8_parallel

void plp_mat_fill_I_q8_parallel(
    uint32_t N,
    int32_t fracBits,
    uint32_t nPE,
    int8_t *__restrict__ pDst
)

Glue code for creating a 8-bit fix-point identity matrix in parallel.

Parameters:

  • N Width and height of the matrix
  • fracBits Decimal point for the appropriate scale
  • nPE Number of cores to use for computation
  • pDst Points to the output matrix of shape NxN

Return: none


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