Vector Addition
Module: Basic Math Functions
Modules
Name |
---|
Vector Addition Kernels |
Functions
Name | |
---|---|
void | plp_add_i16(const int16_t * pSrcA, const int16_t * pSrcB, int32_t * pDst, uint32_t blockSize) Glue code for element-by-element addition of 16-bit integer vectors. |
void | plp_add_i32(const int32_t * pSrcA, const int32_t * pSrcB, int32_t * pDst, uint32_t blockSize) Glue code for element-by-element addition of 32-bit integer vectors. |
void | plp_add_i8(const int8_t * pSrcA, const int8_t * pSrcB, int32_t * pDst, uint32_t blockSize) Glue code for element-by-element addition of 8-bit integer vectors. |
Detailed Description
This module contains the glue code for Vector Addition. The kernel codes (kernels) are in the Moducle Vector Addition Kernels.
The Vector Addition computes element-by-element addition of two vectors.
pDst[n] = pSrcA[n] + pSrcB[n], 0 <= n < blockSize.
There are separate functions for floating point, integer, and fixed point 32- 16- 8-bit data types. For lower precision integers (16- and 8-bit), functions exploiting SIMD instructions are provided.
The naming scheme of the functions follows the following pattern (for example plp_dot_prod_i32s):
data type = {f, i, q} respectively for floats, integers, fixed points
precision = {32, 16, 8} bits
method = {s, p} respectively meaning single core or parallel multicore implementation.
isa extension = rv32im, xpulpv2, etc. of which rv32im is the most general one.
Functions Documentation
function plp_add_i16
void plp_add_i16(
const int16_t * pSrcA,
const int16_t * pSrcB,
int32_t * pDst,
uint32_t blockSize
)
Glue code for element-by-element addition of 16-bit integer vectors.
Parameters:
- pSrcA points to first input vector
- pSrcB points to second input vector
- pDst points to output vector
- blockSize number of samples in each vector
Return: none
function plp_add_i32
void plp_add_i32(
const int32_t * pSrcA,
const int32_t * pSrcB,
int32_t * pDst,
uint32_t blockSize
)
Glue code for element-by-element addition of 32-bit integer vectors.
Parameters:
- pSrcA points to first input vector
- pSrcB points to second input vector
- pDst points to output vector
- blockSize number of samples in each vector
Return: none
function plp_add_i8
void plp_add_i8(
const int8_t * pSrcA,
const int8_t * pSrcB,
int32_t * pDst,
uint32_t blockSize
)
Glue code for element-by-element addition of 8-bit integer vectors.
Parameters:
- pSrcA points to first input vector
- pSrcB points to second input vector
- pDst points to output vector
- blockSize number of samples in each vector
Return: none
Updated on 2023-03-01 at 16:16:32 +0000