LIBDSP Version 4.1.9
LIBDSP Software Library
Loading...
Searching...
No Matches
tpt_math_support.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  tpt_sort_instance_f32
 Instance structure for the sorting algorithms. More...
struct  tpt_merge_sort_instance_f32
 Instance structure for the sorting algorithms. More...

Enumerations

enum  tpt_sort_alg {
  tpt_SORT_BITONIC = 0 , tpt_SORT_BUBBLE = 1 , tpt_SORT_HEAP = 2 , tpt_SORT_INSERTION = 3 ,
  tpt_SORT_QUICK = 4 , tpt_SORT_SELECTION = 5
}
 Struct for specifying sorting algorithm. More...
enum  tpt_sort_dir { tpt_SORT_DESCENDING = 0 , tpt_SORT_ASCENDING = 1 }
 Struct for specifying sorting algorithm. More...

Functions

f32_t tpt_weighted_sum_f32 (const f32_t *aInData, const f32_t *aWeight, uint32_t aCount)
 Weighted Sum of the single-precision floating-point vector.
void tpt_barycenter_f32 (f32_t *aOutData, const f32_t *aInData, const f32_t *aWeights, uint32_t aNumofvec, uint32_t aDimofvec)
 Barycenter of the single-precision floating-point type.
f32_t tpt_exp_f32 (f32_t aInData)
 Calculate exponential value of f32 vector.
f64_t tpt_exp_f64 (f64_t aInData)
 Calculate exponential value of f64 vector.
f32_t tpt_sigmoid_f32 (f32_t aInData)
 Calculate sigmoid value of f32 vector.
f32_t tpt_log_f32 (f32_t aInData)
 Calculate the natural logarithm value of f32 input.
f64_t tpt_log_f64 (f64_t aInData)
 Calculate the natural logarithm value of f64 input.
q15_t tpt_log_q15 (q15_t aInData)
 Calculate the natural logarithm value of q15 input.
q31_t tpt_log_q31 (q31_t aInData)
 Calculate the natural logarithm value of q31 input.
void tpt_bitonic_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point bitonic sort.
void tpt_bubble_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point bubble sort.
void tpt_copy_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Copies the elements of a floating-point vector.
void tpt_copy_f64 (f64_t *aOutData, const f64_t *aInData, uint32_t aCount)
 Copies the elements of a floating-point vector.
void tpt_copy_q15 (q15_t *aOutData, const q15_t *aInData, uint32_t aCount)
 Copies the elements of a Q15 vector.
void tpt_copy_q31 (q31_t *aOutData, const q31_t *aInData, uint32_t aCount)
 Copies the elements of a Q31 vector.
void tpt_copy_q7 (q7_t *aOutData, const q7_t *aInData, uint32_t aCount)
 Copies the elements of a Q7 vector.
void tpt_f32_to_q15 (q15_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q15 vector.
void tpt_f64_to_q15 (q15_t *aOutData, const f64_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q15 vector.
void tpt_f32_to_q31 (q31_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q31 vector.
void tpt_f32_to_q7 (q7_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q7 vector.
void tpt_fill_f32 (f32_t *aOutData, f32_t aValue, uint32_t aCount)
 Fills a constant value into a floating-point vector.
void tpt_fill_f64 (f64_t *aOutData, f64_t aValue, uint32_t aCount)
 Fills a constant value into a floating-point vector.
void tpt_fill_q15 (q15_t *aOutData, q15_t aValue, uint32_t aCount)
 Fills a constant value into a Q15 vector.
void tpt_fill_q31 (q31_t *aOutData, q31_t aValue, uint32_t aCount)
 Fills a constant value into a Q31 vector.
void tpt_fill_q63 (q63_t *aOutData, q63_t aValue, uint32_t aCount)
 Fills a constant value into a Q63 vector.
void tpt_fill_q7 (q7_t *aOutData, q7_t aValue, uint32_t aCount)
 Fills a constant value into a Q7 vector.
void tpt_heap_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point heap sort.
void tpt_insertion_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point insertion sort.
void tpt_merge_sort_f32 (f32_t *aOutData, f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point merge sort.
f32_t tpt_pow_f32 (f32_t x, f32_t y)
 Calculate the y power of x of the f32 input value.
void tpt_q15_to_f32 (f32_t *aOutData, const q15_t *aInData, uint32_t aCount)
 Converts the elements of the Q15 vector to floating-point vector.
void tpt_q15_to_f64 (f64_t *aOutData, const q15_t *aInData, uint32_t aCount)
 Converts the elements of the Q15 vector to floating-point vector.
void tpt_q31_to_f32 (f32_t *aOutData, const q31_t *aInData, uint32_t aCount)
 Converts the elements of the Q31 vector to floating-point vector.
void tpt_q31_to_f64 (f64_t *aOutData, const q31_t *aInData, uint32_t aCount)
 Converts the elements of the Q31 vector to floating-point vector.
void tpt_q7_to_f32 (f32_t *aOutData, const q7_t *aInData, uint32_t aCount)
 Converts the elements of the Q7 vector to floating-point vector.
void tpt_q7_to_f64 (f64_t *aOutData, const q7_t *aInData, uint32_t aCount)
 Converts the elements of the Q7 vector to floating-point vector.
void tpt_quick_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point quick sort.
void tpt_selection_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Floating point selection sort.
void tpt_sort_f32 (f32_t *aOutData, const f32_t *aInData, uint32_t aCount, bool aDir)
 Default sorting function.
void tpt_f16_to_q15 (q15_t *pDst, const f16_t *pSrc, uint32_t blockSize)
 Converts the elements of the floating-point vector to Q15 vector.
void tpt_q15_to_f16 (f16_t *pDst, const q15_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q15 vector to floating-point vector.
void tpt_q15_to_q31 (q31_t *pDst, const q15_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q15 vector to Q31 vector.
void tpt_q15_to_q7 (q7_t *pDst, const q15_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q15 vector to Q7 vector.
void tpt_q31_to_q15 (q15_t *pDst, const q31_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q31 vector to Q15 vector.
void tpt_q31_to_q7 (q7_t *pDst, const q31_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q31 vector to Q7 vector.
void tpt_q7_to_q15 (q15_t *pDst, const q7_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q7 vector to Q15 vector.
void tpt_q7_to_q31 (q31_t *pDst, const q7_t *pSrc, uint32_t blockSize)
 Converts the elements of the Q7 vector to Q31 vector.
void tpt_conv_f16 (f16_t *aOutData, const f16_t *aInDataA, uint32_t aLenA, const f16_t *aInDataB, uint32_t aLenB)
 Convolution of floating-point sequences.
void tpt_f64_to_f32 (f32_t *pDst, const f64_t *pSrc, uint32_t blockSize)
 Converts the elements of the 64 bit floating-point vector to floating-point vector.
void tpt_f64_to_q31 (q31_t *pDst, const f64_t *pSrc, uint32_t blockSize)
 Converts the elements of the 64 bit floating-point vector to Q31 vector.
void tpt_f64_to_q7 (q7_t *pDst, const f64_t *pSrc, uint32_t blockSize)
 Converts the elements of the 64 bit floating-point vector to Q7 vector.
void tpt_f32_to_f64 (f64_t *pDst, const f32_t *pSrc, uint32_t blockSize)
 Converts the elements of the floating-point vector to 64 bit floating-point vector.
void tpt_sort_init_f32 (tpt_sort_instance_f32 *S, tpt_sort_alg alg, tpt_sort_dir dir)
void tpt_merge_sort_init_f32 (tpt_merge_sort_instance_f32 *S, tpt_sort_dir dir, f32_t *buffer)
f32_t tpt_weighted_average_f32 (const f32_t *in, const f32_t *weights, uint32_t blockSize)
 Weighted average.
void tpt_copy_f16 (const f16_t *pSrc, f16_t *pDst, uint32_t blockSize)
 Copies the elements of a floating-point vector.
void tpt_f64_to_f16 (f16_t *pDst, const f64_t *pSrc, uint32_t blockSize)
 Converts the elements of the 64 bit floating-point vector to 16 bit floating-point vector.
void tpt_f16_to_f64 (f64_t *pDst, const f16_t *pSrc, uint32_t blockSize)
 Converts the elements of the 16 bit floating-point vector to 64 bit floating-point vector.
void tpt_f32_to_f16 (f16_t *pDst, const f32_t *pSrc, uint32_t blockSize)
 Converts the elements of the floating-point vector to floating-point vector.
void tpt_f16_to_f32 (f32_t *pDst, const f16_t *pSrc, uint32_t blockSize)
 Converts the elements of the floating-point vector to floating-point vector.
f16_t tpt_weighted_average_f16 (const f16_t *in, const f16_t *weights, uint32_t blockSize)
 Weighted average.
void tpt_barycenter_f16 (const f16_t *in, const f16_t *weights, f16_t *out, uint32_t nbVectors, uint32_t vecDim)
 Barycenter.

Enumeration Type Documentation

◆ tpt_sort_alg

Struct for specifying sorting algorithm.

Enumerator
tpt_SORT_BITONIC 
tpt_SORT_BUBBLE 
tpt_SORT_HEAP 
tpt_SORT_INSERTION 
tpt_SORT_QUICK 
tpt_SORT_SELECTION 

◆ tpt_sort_dir

Struct for specifying sorting algorithm.

Enumerator
tpt_SORT_DESCENDING 
tpt_SORT_ASCENDING 

Function Documentation

◆ tpt_barycenter_f16()

void tpt_barycenter_f16 ( const f16_t * in,
const f16_t * weights,
f16_t * out,
uint32_t nbVectors,
uint32_t vecDim )

Barycenter.

Parameters
[in]inList of vectors
[in]weightsWeights of the vectors
[out]outBarycenter
[in]nbVectorsNumber of vectors
[in]vecDimDimension of space (vector dimension)

◆ tpt_conv_f16()

void tpt_conv_f16 ( f16_t * aOutData,
const f16_t * aInDataA,
uint32_t aLenA,
const f16_t * aInDataB,
uint32_t aLenB )

Convolution of floating-point sequences.

Parameters
[out]aOutDatapoints to the location where the output result is written. Length aLenA + aLenB - 1.
[in]aInDataApoints to the first input sequence.
[in]aLenAlength of the first input sequence
[in]aInDataBpoints to the second input sequence.
[in]aLenBlength of the second input sequence
Returns
none

◆ tpt_copy_f16()

void tpt_copy_f16 ( const f16_t * pSrc,
f16_t * pDst,
uint32_t blockSize )

Copies the elements of a floating-point vector.

Parameters
[out]pDstpoints to the floating-point output vector
[in]pSrcpoints to the floating-point input vector
[in]blockSizelength of the input vector

◆ tpt_f16_to_f32()

void tpt_f16_to_f32 ( f32_t * pDst,
const f16_t * pSrc,
uint32_t blockSize )

Converts the elements of the floating-point vector to floating-point vector.

Parameters
[out]pDstpoints to the floating-point output vector
[in]pSrcpoints to the floating-point input vector
[in]blockSizelength of the input vector

◆ tpt_f16_to_f64()

void tpt_f16_to_f64 ( f64_t * pDst,
const f16_t * pSrc,
uint32_t blockSize )

Converts the elements of the 16 bit floating-point vector to 64 bit floating-point vector.

Parameters
[out]pDstpoints to the floating-point 64 output vector
[in]pSrcpoints to the floating-point input vector
[in]blockSizelength of the input vector

◆ tpt_f16_to_q15()

void tpt_f16_to_q15 ( q15_t * pDst,
const f16_t * pSrc,
uint32_t blockSize )

Converts the elements of the floating-point vector to Q15 vector.

Parameters
[out]pDstpoints to the Q15 output vector
[in]pSrcpoints to the floating-point input vector
[in]blockSizelength of the input vector

◆ tpt_f32_to_f16()

void tpt_f32_to_f16 ( f16_t * pDst,
const f32_t * pSrc,
uint32_t blockSize )

Converts the elements of the floating-point vector to floating-point vector.

Parameters
[out]pDstpoints to the floating-point output vector
[in]pSrcpoints to the floating-point input vector
[in]blockSizelength of the input vector

◆ tpt_f64_to_f16()

void tpt_f64_to_f16 ( f16_t * pDst,
const f64_t * pSrc,
uint32_t blockSize )

Converts the elements of the 64 bit floating-point vector to 16 bit floating-point vector.

Parameters
[out]pDstpoints to the floating-point output vector
[in]pSrcpoints to the floating-point 64 input vector
[in]blockSizelength of the input vector

◆ tpt_pow_f32()

f32_t tpt_pow_f32 ( f32_t x,
f32_t y )

Calculate the y power of x of the f32 input value.

Parameters
xBase
yExponent
Returns
f32_t

◆ tpt_q15_to_f16()

void tpt_q15_to_f16 ( f16_t * pDst,
const q15_t * pSrc,
uint32_t blockSize )

Converts the elements of the Q15 vector to floating-point vector.

Parameters
[out]pDstpoints to the floating-point output vector
[in]pSrcpoints to the Q15 input vector
[in]blockSizelength of the input vector

◆ tpt_weighted_average_f16()

f16_t tpt_weighted_average_f16 ( const f16_t * in,
const f16_t * weights,
uint32_t blockSize )

Weighted average.

Parameters
[in]*inArray of input values.
[in]*weightsWeights
[in]blockSizeNumber of samples in the input array.
Returns
Weighted average