vector scale
Module: Basic Math Functions
Modules
Name |
---|
vector scale Kernels |
Functions
Name | |
---|---|
void | plp_scale_f32(const float32_t restrict pSrc, float32_t scaleFactor, float32_t restrict pDst, uint32_t blockSize) Glue code of multiply a vector by a scalar for 32-bit floats. |
void | plp_scale_i16(const int16_t restrict pSrc, int16_t scaleFactor, int32_t shift, int16_t restrict pDst, uint32_t blockSize) Glue code of multiply a vector by a scalar for 16-bit integers. |
void | plp_scale_i32(const int32_t restrict pSrc, int32_t scaleFactor, int32_t shift, int32_t restrict pDst, uint32_t blockSize) Glue code of multiply a vector by a scalar for 32-bit integers. |
void | plp_scale_i8(const int8_t restrict pSrc, int8_t scaleFactor, int32_t shift, int8_t restrict pDst, uint32_t blockSize) Glue code of multiply a vector by a scalar for 8-bit integers. |
Detailed Description
This module contains the glue code for vector scale. The kernel codes (kernels) are in the Module vector scale Kernels. Multiply a vector by a scalar value. For floating-point data, the algorithm used is: pDst[n] = pSrc[n] * scale, 0 <= n < blockSize.
Functions Documentation
function plp_scale_f32
void plp_scale_f32(
const float32_t *__restrict__ pSrc,
float32_t scaleFactor,
float32_t *__restrict__ pDst,
uint32_t blockSize
)
Glue code of multiply a vector by a scalar for 32-bit floats.
Parameters:
- pSrc points to the input vector
- scaleFactor Factor to multiply all elements
- pDst points to the output vector
- blockSize number of samples in each vector
Return: none
function plp_scale_i16
void plp_scale_i16(
const int16_t *__restrict__ pSrc,
int16_t scaleFactor,
int32_t shift,
int16_t *__restrict__ pDst,
uint32_t blockSize
)
Glue code of multiply a vector by a scalar for 16-bit integers.
Parameters:
- pSrc points to the input vector
- scaleFactor Factor to multiply all elements before shifting
- shift number of bits to shift the result by
- pDst points to the output vector
- blockSize number of samples in each vector
Return: none
function plp_scale_i32
void plp_scale_i32(
const int32_t *__restrict__ pSrc,
int32_t scaleFactor,
int32_t shift,
int32_t *__restrict__ pDst,
uint32_t blockSize
)
Glue code of multiply a vector by a scalar for 32-bit integers.
Parameters:
- pSrc points to the input vector
- scaleFactor Factor to multiply all elements before shifting
- shift number of bits to shift the result by
- pDst points to the output vector
- blockSize number of samples in each vector
Return: none
function plp_scale_i8
void plp_scale_i8(
const int8_t *__restrict__ pSrc,
int8_t scaleFactor,
int32_t shift,
int8_t *__restrict__ pDst,
uint32_t blockSize
)
Glue code of multiply a vector by a scalar for 8-bit integers.
Parameters:
- pSrc points to the input vector
- scaleFactor Factor to multiply all elements before shifting
- shift number of bits to shift the result by
- pDst points to the output vector
- blockSize number of samples in each vector
Return: none
Updated on 2023-03-01 at 16:16:32 +0000