Skip to content

Vector Multiplication Kernels

Module: Basic Math Functions / Vector Multiplication

More...

Functions

Name
void plp_mult_f32p_xpulpv2(void * S)
Parallel multiplication with interleaved access of 32-bit float vectors kernel for XPULPV2 extension.
void plp_mult_f32s_xpulpv2(const float32_t * pSrcA, const float32_t * pSrcB, float32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 32-bit integer vectors kernel for XPULPV2 extension.
void plp_mult_i16s_rv32im(const int16_t * pSrcA, const int16_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 16-bit integer vectors kernel for RV32IM extension.
void plp_mult_i16s_xpulpv2(const int16_t * pSrcA, const int16_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 16-bit integer vectors kernel for XPULPV2 extension.
void plp_mult_i32s_rv32im(const int32_t * pSrcA, const int32_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 32-bit integer vectors kernel for RV32IM extension.
void plp_mult_i32s_xpulpv2(const int32_t * pSrcA, const int32_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 32-bit integer vectors kernel for XPULPV2 extension.
void plp_mult_i8s_rv32im(const int8_t * pSrcA, const int8_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 8-bit integer vectors kernel for RV32IM extension.
void plp_mult_i8s_xpulpv2(const int8_t * pSrcA, const int8_t * pSrcB, int32_t * pDst, uint32_t blockSize)
Element-by-element multiplication of 8-bit integer vectors kernel for XPULPV2 extension.

Detailed Description

The Vector Multiplication computes element-by-element multiplication 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): _ _ _ , 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_mult_f32p_xpulpv2

void plp_mult_f32p_xpulpv2(
    void * S
)

Parallel multiplication with interleaved access of 32-bit float vectors kernel for XPULPV2 extension.

Parameters:

  • S points to the instance structure for float parallel multiplication

Return: none

function plp_mult_f32s_xpulpv2

void plp_mult_f32s_xpulpv2(
    const float32_t * pSrcA,
    const float32_t * pSrcB,
    float32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 32-bit integer vectors kernel for XPULPV2 extension.

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

Element-by-element multiplication of 32-bit float vectors kernel for XPULPV2 extension.

function plp_mult_i16s_rv32im

void plp_mult_i16s_rv32im(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 16-bit integer vectors kernel for RV32IM extension.

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_mult_i16s_xpulpv2

void plp_mult_i16s_xpulpv2(
    const int16_t * pSrcA,
    const int16_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 16-bit integer vectors kernel for XPULPV2 extension.

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_mult_i32s_rv32im

void plp_mult_i32s_rv32im(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 32-bit integer vectors kernel for RV32IM extension.

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_mult_i32s_xpulpv2

void plp_mult_i32s_xpulpv2(
    const int32_t * pSrcA,
    const int32_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 32-bit integer vectors kernel for XPULPV2 extension.

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_mult_i8s_rv32im

void plp_mult_i8s_rv32im(
    const int8_t * pSrcA,
    const int8_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 8-bit integer vectors kernel for RV32IM extension.

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_mult_i8s_xpulpv2

void plp_mult_i8s_xpulpv2(
    const int8_t * pSrcA,
    const int8_t * pSrcB,
    int32_t * pDst,
    uint32_t blockSize
)

Element-by-element multiplication of 8-bit integer vectors kernel for XPULPV2 extension.

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