NMSIS-DSP  Version 1.3.1
NMSIS DSP Software Library
Accumulation functions

Calculates the accumulation of the input vector. Sum is defined as the addition of the elements in the vector. The underlying algorithm is used: More...

Functions

RISCV_DSP_ATTRIBUTE void riscv_accumulate_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult)
 accumulate value of a floating-point vector. More...
 
RISCV_DSP_ATTRIBUTE void riscv_accumulate_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult)
 Accumulation value of a floating-point vector. More...
 
RISCV_DSP_ATTRIBUTE void riscv_accumulate_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult)
 Accumulation value of a floating-point vector. More...
 

Detailed Description

Calculates the accumulation of the input vector. Sum is defined as the addition of the elements in the vector. The underlying algorithm is used:

Result = (pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]);

There are separate functions for floating-point, Q31, Q15, and Q7 data types.

Function Documentation

◆ riscv_accumulate_f16()

RISCV_DSP_ATTRIBUTE void riscv_accumulate_f16 ( const float16_t *  pSrc,
uint32_t  blockSize,
float16_t *  pResult 
)

accumulate value of a floating-point vector.

Sum value of a floating-point vector.

Parameters
[in]pSrcpoints to the input vector.
[in]blockSizenumber of samples in input vector.
[out]pResultsum of values in input vector.

◆ riscv_accumulate_f32()

RISCV_DSP_ATTRIBUTE void riscv_accumulate_f32 ( const float32_t pSrc,
uint32_t  blockSize,
float32_t pResult 
)

Accumulation value of a floating-point vector.

Parameters
[in]pSrcpoints to the input vector.
[in]blockSizenumber of samples in input vector.
[out]pResultsum of values in input vector.

◆ riscv_accumulate_f64()

RISCV_DSP_ATTRIBUTE void riscv_accumulate_f64 ( const float64_t pSrc,
uint32_t  blockSize,
float64_t pResult 
)

Accumulation value of a floating-point vector.

Parameters
[in]pSrcpoints to the input vector.
[in]blockSizenumber of samples in input vector.
[out]pResultsum of values in input vector.