Skip to content

Identity Matrix Creation Kernels

Module: Matrix Functions / Identity Matrix Creation

More...

Functions

Name
void plp_mat_fill_I_f32p_xpulpv2(void * args)
Create a 32-bit float identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_f32s_xpulpv2(uint32_t N, float *restrict pDst)
Create a 32-bit float identity matrix on XpulpV2.
void plp_mat_fill_I_i16p_xpulpv2(void * args)
Create a 16-bit integer identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_i16s_rv32im(uint32_t N, int16_t *restrict pDst)
Create a 16-bit integer identity matrix on RV32IM.
void plp_mat_fill_I_i16s_xpulpv2(uint32_t N, int16_t *restrict pDst)
Create a 16-bit integer identity matrix on XpulpV2.
void plp_mat_fill_I_i32p_xpulpv2(void * args)
Create a 32-bit integer identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_i32s_rv32im(uint32_t N, int32_t *restrict pDst)
Create a 32-bit integer identity matrix on RV32IM.
void plp_mat_fill_I_i32s_xpulpv2(uint32_t N, int32_t *restrict pDst)
Create a 32-bit integer identity matrix on XpulpV2.
void plp_mat_fill_I_i8p_xpulpv2(void * args)
Create a 8-bit integer identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_i8s_rv32im(uint32_t N, int8_t *restrict pDst)
Create a 8-bit integer identity matrix on RV32IM.
void plp_mat_fill_I_i8s_xpulpv2(uint32_t N, int8_t *restrict pDst)
Create a 8-bit integer identity matrix on XpulpV2.
void plp_mat_fill_I_q16p_xpulpv2(void * args)
Create a 16-bit fix-point identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_q16s_rv32im(uint32_t N, int32_t fracBits, int16_t *restrict pDst)
Create a 16-bit fix-point identity matrix on RV32IM.
void plp_mat_fill_I_q16s_xpulpv2(uint32_t N, int32_t fracBits, int16_t *restrict pDst)
Create a 16-bit fix-point identity matrix on XpulpV2.
void plp_mat_fill_I_q32p_xpulpv2(void * args)
Create a 32-bit fix-point identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_q32s_rv32im(uint32_t N, int32_t fracBits, int32_t *restrict pDst)
Create a 32-bit fix-point identity matrix on RV32IM.
void plp_mat_fill_I_q32s_xpulpv2(uint32_t N, int32_t fracBits, int32_t *restrict pDst)
Create a 32-bit fix-point identity matrix on XpulpV2.
void plp_mat_fill_I_q8p_xpulpv2(void * args)
Create a 8-bit fix-point identity matrix in parallel on XpulpV2.
void plp_mat_fill_I_q8s_rv32im(uint32_t N, int32_t fracBits, int8_t *restrict pDst)
Create a 8-bit fix-point identity matrix on RV32IM.
void plp_mat_fill_I_q8s_xpulpv2(uint32_t N, int32_t fracBits, int8_t *restrict pDst)
Create a 8-bit fix-point identity matrix on XpulpV2.

Detailed Description

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

`plp_<function name>_<data type><precision><method>_<isa_extension>`
name description
function_name mat_fill_I
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

Functions Documentation

function plp_mat_fill_I_f32p_xpulpv2

void plp_mat_fill_I_f32p_xpulpv2(
    void * args
)

Create a 32-bit float identity matrix in parallel on XpulpV2.

Parameters:

Return: none

function plp_mat_fill_I_f32s_xpulpv2

void plp_mat_fill_I_f32s_xpulpv2(
    uint32_t N,
    float *__restrict__ pDst
)

Create a 32-bit float identity matrix on XpulpV2.

Parameters:

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

Return: none

function plp_mat_fill_I_i16p_xpulpv2

void plp_mat_fill_I_i16p_xpulpv2(
    void * args
)

Create a 16-bit integer identity matrix in parallel on XpulpV2.

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_fill_I_i16s_rv32im

void plp_mat_fill_I_i16s_rv32im(
    uint32_t N,
    int16_t *__restrict__ pDst
)

Create a 16-bit integer identity matrix on RV32IM.

Parameters:

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

Return: none

function plp_mat_fill_I_i16s_xpulpv2

void plp_mat_fill_I_i16s_xpulpv2(
    uint32_t N,
    int16_t *__restrict__ pDst
)

Create a 16-bit integer identity matrix on XpulpV2.

Parameters:

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

Return: none

function plp_mat_fill_I_i32p_xpulpv2

void plp_mat_fill_I_i32p_xpulpv2(
    void * args
)

Create a 32-bit integer identity matrix in parallel on XpulpV2.

Parameters:

Return: none

function plp_mat_fill_I_i32s_rv32im

void plp_mat_fill_I_i32s_rv32im(
    uint32_t N,
    int32_t *__restrict__ pDst
)

Create a 32-bit integer identity matrix on RV32IM.

Parameters:

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

Return: none

function plp_mat_fill_I_i32s_xpulpv2

void plp_mat_fill_I_i32s_xpulpv2(
    uint32_t N,
    int32_t *__restrict__ pDst
)

Create a 32-bit integer identity matrix on XpulpV2.

Parameters:

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

Return: none

function plp_mat_fill_I_i8p_xpulpv2

void plp_mat_fill_I_i8p_xpulpv2(
    void * args
)

Create a 8-bit integer identity matrix in parallel on XpulpV2.

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_fill_I_i8s_rv32im

void plp_mat_fill_I_i8s_rv32im(
    uint32_t N,
    int8_t *__restrict__ pDst
)

Create a 8-bit integer identity matrix on RV32IM.

Parameters:

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

Return: none

function plp_mat_fill_I_i8s_xpulpv2

void plp_mat_fill_I_i8s_xpulpv2(
    uint32_t N,
    int8_t *__restrict__ pDst
)

Create a 8-bit integer identity matrix on XpulpV2.

Parameters:

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

Return: none

function plp_mat_fill_I_q16p_xpulpv2

void plp_mat_fill_I_q16p_xpulpv2(
    void * args
)

Create a 16-bit fix-point identity matrix in parallel on XpulpV2.

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_fill_I_q16s_rv32im

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

Create a 16-bit fix-point identity matrix on RV32IM.

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_q16s_xpulpv2

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

Create a 16-bit fix-point identity matrix on XpulpV2.

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_q32p_xpulpv2

void plp_mat_fill_I_q32p_xpulpv2(
    void * args
)

Create a 32-bit fix-point identity matrix in parallel on XpulpV2.

Parameters:

Return: none

function plp_mat_fill_I_q32s_rv32im

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

Create a 32-bit fix-point identity matrix on RV32IM.

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_q32s_xpulpv2

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

Create a 32-bit fix-point identity matrix on XpulpV2.

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_q8p_xpulpv2

void plp_mat_fill_I_q8p_xpulpv2(
    void * args
)

Create a 8-bit fix-point identity matrix in parallel on XpulpV2.

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_fill_I_q8s_rv32im

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

Create a 8-bit fix-point identity matrix on RV32IM.

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_q8s_xpulpv2

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

Create a 8-bit fix-point identity matrix on XpulpV2.

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


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