Skip to content

Power Kernels

Module: Statistics Functions / Power

More...

Functions

Name
void plp_power_f32p_xpulpv2(void * S)
Parallel sum of squares of a 32-bit float vector for XPULPV2 extension.
void plp_power_f32s_rv32im(const float restrict pSrc, uint32_t blockSize, float restrict pRes)
Sum of squares of a 32-bit float vector for RV32IM.
void plp_power_f32s_xpulpv2(const float restrict pSrc, uint32_t blockSize, float restrict pRes)
Sum of squares of a 32-bit float vector for XPULPV2 extension.
void plp_power_i16s_rv32im(const int16_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 16-bit integer vector for RV32IM extension.
void plp_power_i16s_xpulpv2(const int16_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 16-bit integer vector for XPULPV2 extension.
void plp_power_i32s_rv32im(const int32_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 32-bit integer vector for RV32IM extension.
void plp_power_i32s_xpulpv2(const int32_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 32-bit integer vector for XPULPV2 extension.
void plp_power_i8s_rv32im(const int8_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 8-bit integer vector for RV32IM extension.
void plp_power_i8s_xpulpv2(const int8_t restrict pSrc, uint32_t blockSize, int32_t restrict pRes)
Sum of squares of a 8-bit integer vector for XPULPV2 extension.
void plp_power_q16s_rv32im(const int16_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 16-bit fixed point vector for RV32IM extension.
void plp_power_q16s_xpulpv2(const int16_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 16-bit fixed point vector for XPULPV2 extension.
void plp_power_q32p_xpulpv2(void * S)
Parallel sum of squares of a 32-bit float vector for XPULPV2 extension.
void plp_power_q32s_rv32im(const int32_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 32-bit fixed point vector for RV32IM extension.
void plp_power_q32s_xpulpv2(const int32_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 32-bit fixed point vector for XPULPV2 extension.
void plp_power_q8s_rv32im(const int8_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 8-bit fixed point vector for RV32IM extension.
void plp_power_q8s_xpulpv2(const int8_t restrict pSrc, uint32_t blockSize, uint32_t fracBits, int32_t restrict pRes)
Sum of squares of a 8-bit fixed point vector for XPULPV2 extension.

Detailed Description

Calculates the sum of squares of the input vector. 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): _ _ _ , with

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_power_f32p_xpulpv2

void plp_power_f32p_xpulpv2(
    void * S
)

Parallel sum of squares of a 32-bit float vector for XPULPV2 extension.

Parameters:

  • S points to the instance structure for floating-point parallel power

Return: none

function plp_power_f32s_rv32im

void plp_power_f32s_rv32im(
    const float *__restrict__ pSrc,
    uint32_t blockSize,
    float *__restrict__ pRes
)

Sum of squares of a 32-bit float vector for RV32IM.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_f32s_xpulpv2

void plp_power_f32s_xpulpv2(
    const float *__restrict__ pSrc,
    uint32_t blockSize,
    float *__restrict__ pRes
)

Sum of squares of a 32-bit float vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

Kernel for Sum of squares of a 32-bit float vector.

function plp_power_i16s_rv32im

void plp_power_i16s_rv32im(
    const int16_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 16-bit integer vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_i16s_xpulpv2

void plp_power_i16s_xpulpv2(
    const int16_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 16-bit integer vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_i32s_rv32im

void plp_power_i32s_rv32im(
    const int32_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 32-bit integer vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_i32s_xpulpv2

void plp_power_i32s_xpulpv2(
    const int32_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 32-bit integer vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_i8s_rv32im

void plp_power_i8s_rv32im(
    const int8_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 8-bit integer vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_i8s_xpulpv2

void plp_power_i8s_xpulpv2(
    const int8_t *__restrict__ pSrc,
    uint32_t blockSize,
    int32_t *__restrict__ pRes
)

Sum of squares of a 8-bit integer vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q16s_rv32im

void plp_power_q16s_rv32im(
    const int16_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 16-bit fixed point vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q16s_xpulpv2

void plp_power_q16s_xpulpv2(
    const int16_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 16-bit fixed point vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q32p_xpulpv2

void plp_power_q32p_xpulpv2(
    void * S
)

Parallel sum of squares of a 32-bit float vector for XPULPV2 extension.

Parameters:

  • S points to the instance structure for floating-point parallel power

Return: none

Parallel sum of squares of a 32-bit fixed-point vector for XPULPV2 extension.

function plp_power_q32s_rv32im

void plp_power_q32s_rv32im(
    const int32_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 32-bit fixed point vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q32s_xpulpv2

void plp_power_q32s_xpulpv2(
    const int32_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 32-bit fixed point vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q8s_rv32im

void plp_power_q8s_rv32im(
    const int8_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 8-bit fixed point vector for RV32IM extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none

function plp_power_q8s_xpulpv2

void plp_power_q8s_xpulpv2(
    const int8_t *__restrict__ pSrc,
    uint32_t blockSize,
    uint32_t fracBits,
    int32_t *__restrict__ pRes
)

Sum of squares of a 8-bit fixed point vector for XPULPV2 extension.

Parameters:

  • pSrc points to the input vector
  • blockSize number of samples in input vector
  • pRes sum of squares returned here

Return: none


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