MU Library
mu::vector Namespace Reference

Classes

class  VdmaError
 The VdmaError class represents an error that can occur during vector operations. More...
 

Functions

mu::vector::VdmaError addElementwise (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Adds two float type vectors elementwise. More...
 
mu::vector::VdmaError addElementwise (const half_float::half *lhs, const half_float::half *rhs, half_float::half *res, const uint64_t vectorDim)
 Adds two half-float type vectors elementwise. More...
 
mu::vector::VdmaError subElementwise (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Subtracts two float type vectors elementwise. More...
 
mu::vector::VdmaError subElementwise (const half_float::half *lhs, const half_float::half *rhs, half_float::half *res, const uint64_t vectorDim)
 Subtracts two half-float type vectors elementwise. More...
 
mu::vector::VdmaError mulElementwise (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Multiplies two float type vectors elementwise. More...
 
mu::vector::VdmaError mulElementwise (const half_float::half *lhs, const half_float::half *rhs, half_float::half *res, const uint64_t vectorDim)
 Multiplies two half-float type vectors elementwise. More...
 
mu::vector::VdmaError squareElementwise (const float *src, float *res, const uint64_t vectorDim)
 Squares a float type vector elementwise. More...
 
mu::vector::VdmaError squareElementwise (const half_float::half *src, half_float::half *res, const uint64_t vectorDim)
 Squares a half-float type vector elementwise. More...
 
mu::vector::VdmaError divElementwise (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Divides float type lhs vector by rhs vector elementwise. More...
 
mu::vector::VdmaError divElementwise (const half_float::half *lhs, const half_float::half *rhs, half_float::half *res, const uint64_t vectorDim)
 Divides half-float type lhs vector by rhs vector elementwise. More...
 
mu::vector::VdmaError xorElementwise (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Performs bitwise XOR on the two bytestreams which have size of dimension multiplied by float size. More...
 
mu::vector::VdmaError xorElementwise (const half_float::half *lhs, const half_float::half *rhs, half_float::half *res, const uint64_t vectorDim)
 Performs bitwise XOR on the two bytestreams which have size of dimension multiplied by half-float size. More...
 
mu::vector::VdmaError addVectorToScalar (const float &scalar, const float *vector, float *res, const uint64_t vectorDim)
 Adds a single scalar value to a float type vector. More...
 
mu::vector::VdmaError addVectorToScalar (const half_float::half &scalar, const half_float::half *vector, half_float::half *res, const uint64_t vectorDim)
 Adds a single scalar value to a half-float type vector. More...
 
mu::vector::VdmaError subVectorToScalar (const float &scalar, const float *vector, float *res, const uint64_t vectorDim)
 Subtracts a scalar from a float type vector. More...
 
mu::vector::VdmaError subVectorToScalar (const half_float::half &scalar, const half_float::half *vector, half_float::half *res, const uint64_t vectorDim)
 Subtracts a scalar from a half-float type vector. More...
 
mu::vector::VdmaError mulVectorToScalar (const float &scalar, const float *vector, float *res, const uint64_t vectorDim)
 Multiplies a scalar to a float type vector. More...
 
mu::vector::VdmaError mulVectorToScalar (const half_float::half &scalar, const half_float::half *vector, half_float::half *res, const uint64_t vectorDim)
 Multiplies a scalar to a half-float type vector. More...
 
mu::vector::VdmaError divVectorToScalar (const float &scalar, const float *vector, float *res, const uint64_t vectorDim)
 Divides a float type vector by a scalar. More...
 
mu::vector::VdmaError divVectorToScalar (const half_float::half &scalar, const half_float::half *vector, half_float::half *res, const uint64_t vectorDim)
 Divides a half-float type vector by a scalar. More...
 
mu::vector::VdmaError xorVectorToScalar (const float &scalar, const float *vector, float *res, const uint64_t vectorDim)
 Performs XOR a scalar to a float type vector. More...
 
mu::vector::VdmaError xorVectorToScalar (const half_float::half &scalar, const half_float::half *vector, half_float::half *res, const uint64_t vectorDim)
 Performs XOR a scalar to a half-float type vector. More...
 
mu::vector::VdmaError addElementwiseReduce (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Adds two float type vectors elementwise and sums up. More...
 
mu::vector::VdmaError addElementwiseReduce (const half_float::half *lhs, const half_float::half *rhs, float *res, const uint64_t vectorDim)
 Adds two half-float type vectors elementwise and sums up. More...
 
mu::vector::VdmaError subElementwiseReduce (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Subtracts two float type vectors elementwise and sums up. More...
 
mu::vector::VdmaError subElementwiseReduce (const half_float::half *lhs, const half_float::half *rhs, float *res, const uint64_t vectorDim)
 Subtracts two half-float type vectors elementwise and sums up. More...
 
mu::vector::VdmaError mulElementwiseReduce (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Multiplies two float type vectors elementwise and sums up. (same as dotProduct) More...
 
mu::vector::VdmaError mulElementwiseReduce (const half_float::half *lhs, const half_float::half *rhs, float *res, const uint64_t vectorDim)
 Multiplies two half-float type vectors elementwise and sums up. (same as dotProduct) More...
 
mu::vector::VdmaError divElementwiseReduce (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Divides float type lhs vector by rhs vector elementwise and sums up. More...
 
mu::vector::VdmaError divElementwiseReduce (const half_float::half *lhs, const half_float::half *rhs, float *res, const uint64_t vectorDim)
 Divides half-float type lhs vector by rhs vector elementwise and sums up. More...
 
mu::vector::VdmaError dotProduct (const float *lhs, const float *rhs, float *res, const uint64_t vectorDim)
 Performs dot product on two float type vectors. (Alias function of mulElementwiseReduce) More...
 
mu::vector::VdmaError dotProduct (const half_float::half *lhs, const half_float::half *rhs, float *res, const uint64_t vectorDim)
 Performs dot product on two half-float type vectors. (Alias function of mulElementwiseReduce) More...
 
mu::vector::VdmaError equals (const float *lhs, const float *rhs, bool *res, const uint64_t vectorDim)
 Compares two float type vectors elementwise. More...
 
mu::vector::VdmaError equalsWithScalar (const float *vector, const float &scalar, bool *res, const uint64_t vectorDim)
 Compares float type vector with a scalar elementwise. More...
 
mu::vector::VdmaError isAllZero (const float *vector, bool *res, const uint64_t vectorDim)
 Check if all elements in a float type vector are zero. More...
 
mu::vector::VdmaError crc32 (const void *src, uint32_t &res, const uint64_t byteSize)
 Gets the CRC32 checksum of a buffer. More...
 
mu::vector::VdmaError crc32c (const void *src, uint32_t &res, const uint64_t byteSize)
 Gets the CRC32C checksum of a buffer. More...
 

Function Documentation

◆ addElementwise() [1/2]

mu::vector::VdmaError mu::vector::addElementwise ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Adds two float type vectors elementwise.

This function performs elementwise addition of two float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the sum is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ addElementwise() [2/2]

mu::vector::VdmaError mu::vector::addElementwise ( const half_float::half lhs,
const half_float::half rhs,
half_float::half res,
const uint64_t  vectorDim 
)

Adds two half-float type vectors elementwise.

This function performs elementwise addition of two half-float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the sum is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ addElementwiseReduce() [1/2]

mu::vector::VdmaError mu::vector::addElementwiseReduce ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Adds two float type vectors elementwise and sums up.

This function performs elementwise addition of two float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ addElementwiseReduce() [2/2]

mu::vector::VdmaError mu::vector::addElementwiseReduce ( const half_float::half lhs,
const half_float::half rhs,
float *  res,
const uint64_t  vectorDim 
)

Adds two half-float type vectors elementwise and sums up.

This function performs elementwise addition of two half-float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ addVectorToScalar() [1/2]

mu::vector::VdmaError mu::vector::addVectorToScalar ( const float &  scalar,
const float *  vector,
float *  res,
const uint64_t  vectorDim 
)

Adds a single scalar value to a float type vector.

This function adds a scalar value to each element of a float vector.

Parameters
scalarThe scalar value to add.
vectorThe vector to which the scalar is added.
resThe result vector where the sum is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ addVectorToScalar() [2/2]

mu::vector::VdmaError mu::vector::addVectorToScalar ( const half_float::half scalar,
const half_float::half vector,
half_float::half res,
const uint64_t  vectorDim 
)

Adds a single scalar value to a half-float type vector.

This function adds a scalar value to each element of a half-float vector.

Parameters
scalarThe scalar value to add.
vectorThe vector to which the scalar is added.
resThe result vector where the sum is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ crc32()

mu::vector::VdmaError mu::vector::crc32 ( const void *  src,
uint32_t &  res,
const uint64_t  byteSize 
)

Gets the CRC32 checksum of a buffer.

This function calculates the CRC32 checksum of a given buffer.

Parameters
srcThe source buffer.
resThe result where the checksum is stored.
byteSizeThe size of the buffer in bytes.
Returns
VdmaError Error status of the operation.

◆ crc32c()

mu::vector::VdmaError mu::vector::crc32c ( const void *  src,
uint32_t &  res,
const uint64_t  byteSize 
)

Gets the CRC32C checksum of a buffer.

This function calculates the CRC32C checksum of a given buffer.

Parameters
srcThe source buffer.
resThe result where the checksum is stored.
byteSizeThe size of the buffer in bytes.
Returns
VdmaError Error status of the operation.

◆ divElementwise() [1/2]

mu::vector::VdmaError mu::vector::divElementwise ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Divides float type lhs vector by rhs vector elementwise.

This function performs elementwise division of two float vectors.

Parameters
lhsThe left-hand side vector (numerator).
rhsThe right-hand side vector (denominator).
resThe result vector where the quotient is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ divElementwise() [2/2]

mu::vector::VdmaError mu::vector::divElementwise ( const half_float::half lhs,
const half_float::half rhs,
half_float::half res,
const uint64_t  vectorDim 
)

Divides half-float type lhs vector by rhs vector elementwise.

This function performs elementwise division of two half-float vectors.

Parameters
lhsThe left-hand side vector (numerator).
rhsThe right-hand side vector (denominator).
resThe result vector where the quotient is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ divElementwiseReduce() [1/2]

mu::vector::VdmaError mu::vector::divElementwiseReduce ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Divides float type lhs vector by rhs vector elementwise and sums up.

This function performs elementwise division of two float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector (numerator).
rhsThe right-hand side vector (denominator).
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ divElementwiseReduce() [2/2]

mu::vector::VdmaError mu::vector::divElementwiseReduce ( const half_float::half lhs,
const half_float::half rhs,
float *  res,
const uint64_t  vectorDim 
)

Divides half-float type lhs vector by rhs vector elementwise and sums up.

This function performs elementwise division of two half-float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector (numerator).
rhsThe right-hand side vector (denominator).
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ divVectorToScalar() [1/2]

mu::vector::VdmaError mu::vector::divVectorToScalar ( const float &  scalar,
const float *  vector,
float *  res,
const uint64_t  vectorDim 
)

Divides a float type vector by a scalar.

This function divides each element of a float vector by a scalar value.

Parameters
scalarThe scalar value to divide by.
vectorThe vector to be divided by the scalar.
resThe result vector where the quotient is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ divVectorToScalar() [2/2]

mu::vector::VdmaError mu::vector::divVectorToScalar ( const half_float::half scalar,
const half_float::half vector,
half_float::half res,
const uint64_t  vectorDim 
)

Divides a half-float type vector by a scalar.

This function divides each element of a half-float vector by a scalar value.

Parameters
scalarThe scalar value to divide by.
vectorThe vector to be divided by the scalar.
resThe result vector where the quotient is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ dotProduct() [1/2]

mu::vector::VdmaError mu::vector::dotProduct ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Performs dot product on two float type vectors. (Alias function of mulElementwiseReduce)

This function calculates the dot product of two float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result where the dot product is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ dotProduct() [2/2]

mu::vector::VdmaError mu::vector::dotProduct ( const half_float::half lhs,
const half_float::half rhs,
float *  res,
const uint64_t  vectorDim 
)

Performs dot product on two half-float type vectors. (Alias function of mulElementwiseReduce)

This function calculates the dot product of two half-float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result where the dot product is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ equals()

mu::vector::VdmaError mu::vector::equals ( const float *  lhs,
const float *  rhs,
bool *  res,
const uint64_t  vectorDim 
)

Compares two float type vectors elementwise.

This function compares two float vectors elementwise and stores the result in a boolean vector.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result bool address where the comparison result is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ equalsWithScalar()

mu::vector::VdmaError mu::vector::equalsWithScalar ( const float *  vector,
const float &  scalar,
bool *  res,
const uint64_t  vectorDim 
)

Compares float type vector with a scalar elementwise.

This function compares each element of a float vector with a scalar and stores the result in a boolean vector.

Parameters
vectorThe vector to compare.
scalarThe scalar value to compare with.
resThe result bool address where the comparison result is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ isAllZero()

mu::vector::VdmaError mu::vector::isAllZero ( const float *  vector,
bool *  res,
const uint64_t  vectorDim 
)

Check if all elements in a float type vector are zero.

This function checks if all elements in a float vector are zero.

Parameters
vectorThe vector to check.
resThe result where the check result is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ mulElementwise() [1/2]

mu::vector::VdmaError mu::vector::mulElementwise ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Multiplies two float type vectors elementwise.

This function performs elementwise multiplication of two float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the product is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ mulElementwise() [2/2]

mu::vector::VdmaError mu::vector::mulElementwise ( const half_float::half lhs,
const half_float::half rhs,
half_float::half res,
const uint64_t  vectorDim 
)

Multiplies two half-float type vectors elementwise.

This function performs elementwise multiplication of two half-float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the product is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ mulElementwiseReduce() [1/2]

mu::vector::VdmaError mu::vector::mulElementwiseReduce ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Multiplies two float type vectors elementwise and sums up. (same as dotProduct)

This function performs elementwise multiplication of two float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ mulElementwiseReduce() [2/2]

mu::vector::VdmaError mu::vector::mulElementwiseReduce ( const half_float::half lhs,
const half_float::half rhs,
float *  res,
const uint64_t  vectorDim 
)

Multiplies two half-float type vectors elementwise and sums up. (same as dotProduct)

This function performs elementwise multiplication of two half-float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ mulVectorToScalar() [1/2]

mu::vector::VdmaError mu::vector::mulVectorToScalar ( const float &  scalar,
const float *  vector,
float *  res,
const uint64_t  vectorDim 
)

Multiplies a scalar to a float type vector.

This function multiplies each element of a float vector by a scalar value.

Parameters
scalarThe scalar value to multiply.
vectorThe vector to be multiplied by the scalar.
resThe result vector where the product is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ mulVectorToScalar() [2/2]

mu::vector::VdmaError mu::vector::mulVectorToScalar ( const half_float::half scalar,
const half_float::half vector,
half_float::half res,
const uint64_t  vectorDim 
)

Multiplies a scalar to a half-float type vector.

This function multiplies each element of a half-float vector by a scalar value.

Parameters
scalarThe scalar value to multiply.
vectorThe vector to be multiplied by the scalar.
resThe result vector where the product is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ squareElementwise() [1/2]

mu::vector::VdmaError mu::vector::squareElementwise ( const float *  src,
float *  res,
const uint64_t  vectorDim 
)

Squares a float type vector elementwise.

This function squares each element of a float vector.

Parameters
srcThe source vector to be squared.
resThe result vector where the squares are stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ squareElementwise() [2/2]

mu::vector::VdmaError mu::vector::squareElementwise ( const half_float::half src,
half_float::half res,
const uint64_t  vectorDim 
)

Squares a half-float type vector elementwise.

This function squares each element of a half-float vector.

Parameters
srcThe source vector to be squared.
resThe result vector where the squares are stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ subElementwise() [1/2]

mu::vector::VdmaError mu::vector::subElementwise ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Subtracts two float type vectors elementwise.

This function performs elementwise subtraction of two float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the difference is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ subElementwise() [2/2]

mu::vector::VdmaError mu::vector::subElementwise ( const half_float::half lhs,
const half_float::half rhs,
half_float::half res,
const uint64_t  vectorDim 
)

Subtracts two half-float type vectors elementwise.

This function performs elementwise subtraction of two half-float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the difference is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ subElementwiseReduce() [1/2]

mu::vector::VdmaError mu::vector::subElementwiseReduce ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Subtracts two float type vectors elementwise and sums up.

This function performs elementwise subtraction of two float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ subElementwiseReduce() [2/2]

mu::vector::VdmaError mu::vector::subElementwiseReduce ( const half_float::half lhs,
const half_float::half rhs,
float *  res,
const uint64_t  vectorDim 
)

Subtracts two half-float type vectors elementwise and sums up.

This function performs elementwise subtraction of two half-float vectors and then sums up the result.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe float address where the total sum of the result vector is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ subVectorToScalar() [1/2]

mu::vector::VdmaError mu::vector::subVectorToScalar ( const float &  scalar,
const float *  vector,
float *  res,
const uint64_t  vectorDim 
)

Subtracts a scalar from a float type vector.

This function subtracts a scalar value from each element of a float vector.

Parameters
scalarThe scalar value to subtract.
vectorThe vector from which the scalar is subtracted.
resThe result vector where the difference is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ subVectorToScalar() [2/2]

mu::vector::VdmaError mu::vector::subVectorToScalar ( const half_float::half scalar,
const half_float::half vector,
half_float::half res,
const uint64_t  vectorDim 
)

Subtracts a scalar from a half-float type vector.

This function subtracts a scalar value from each element of a half-float vector.

Parameters
scalarThe scalar value to subtract.
vectorThe vector from which the scalar is subtracted.
resThe result vector where the difference is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ xorElementwise() [1/2]

mu::vector::VdmaError mu::vector::xorElementwise ( const float *  lhs,
const float *  rhs,
float *  res,
const uint64_t  vectorDim 
)

Performs bitwise XOR on the two bytestreams which have size of dimension multiplied by float size.

This function performs a bitwise XOR operation on two float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the XOR result is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ xorElementwise() [2/2]

mu::vector::VdmaError mu::vector::xorElementwise ( const half_float::half lhs,
const half_float::half rhs,
half_float::half res,
const uint64_t  vectorDim 
)

Performs bitwise XOR on the two bytestreams which have size of dimension multiplied by half-float size.

This function performs a bitwise XOR operation on two half-float vectors.

Parameters
lhsThe left-hand side vector.
rhsThe right-hand side vector.
resThe result vector where the XOR result is stored.
vectorDimThe dimension of the vectors.
Returns
VdmaError Error status of the operation.

◆ xorVectorToScalar() [1/2]

mu::vector::VdmaError mu::vector::xorVectorToScalar ( const float &  scalar,
const float *  vector,
float *  res,
const uint64_t  vectorDim 
)

Performs XOR a scalar to a float type vector.

This function performs a bitwise XOR operation between a scalar and each element of a float vector.

Parameters
scalarThe scalar value to XOR.
vectorThe vector to be XORed with the scalar.
resThe result vector where the XOR result is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.

◆ xorVectorToScalar() [2/2]

mu::vector::VdmaError mu::vector::xorVectorToScalar ( const half_float::half scalar,
const half_float::half vector,
half_float::half res,
const uint64_t  vectorDim 
)

Performs XOR a scalar to a half-float type vector.

This function performs a bitwise XOR operation between a scalar and each element of a half-float vector.

Parameters
scalarThe scalar value to XOR.
vectorThe vector to be XORed with the scalar.
resThe result vector where the XOR result is stored.
vectorDimThe dimension of the vector.
Returns
VdmaError Error status of the operation.