MityDSP Documentation Index
Static Public Member Functions
MityDSP::tcSigProcVector Class Reference

#include <SigProc/SigProcVector.h>

List of all members.

Static Public Member Functions

static int VectorMultiply (short *restrict InA, float *restrict InB, float *restrict Out, int N, int StrideA, int StrideB, int StrideOut)
static int VectorMultiply (float *restrict InA, float *restrict InB, float *restrict Out, int N, int StrideA, int StrideB, int StrideOut)
static int ToFloat (short *restrict InA, float *restrict Out, int N, int StrideA, int StrideOut)
static int VecMulAdd (float *restrict InX, float *restrict InM, float InB, float *restrict Out, int N, int StrideX, int StrideM, int StrideOut)
static int VecAddMul (float *restrict InX, float *restrict InM, float InB, float *restrict Out, int N, int StrideX, int StrideM, int StrideOut)

Detailed Description

The tcSigProcVector class provides utility methods for handling math vectorized operations in an efficient manner.

See also:
tcSigProcVector Page

Member Function Documentation

int tcSigProcVector::VectorMultiply ( short *restrict  InA,
float *restrict  InB,
float *restrict  Out,
int  N,
int  StrideA = 1,
int  StrideB = 1,
int  StrideOut = 1 
)
static

Performs a vector multiply according to:

Out[index] = InA[index]*InB[index]

Parameters:
InAvector of N input elements
StrideAWord increment needed to get to next item in A
InBvector of N input elements
StrideBWord increment needed to get to next item in B
Outlocation to write the output buffer
StrideOutWord increment needed to get to next item in Out
NNumber of words in the vectors. This must be a minimum of 20, must be divisible by 4.

return -1 if N is less than 20 (no operations done) or 0 on success

int tcSigProcVector::VectorMultiply ( float *restrict  InA,
float *restrict  InB,
float *restrict  Out,
int  N,
int  StrideA = 1,
int  StrideB = 1,
int  StrideOut = 1 
)
static

Performs a vector multiply according to:

Out[index] = InA[index]*InB[index]

Parameters:
InAvector of N input elements
StrideAWord increment needed to get to next item in A
InBvector of N input elements
StrideBWord increment needed to get to next item in B
Outlocation to write the output buffer
StrideOutWord increment needed to get to next item in Out
NNumber of words in the vectors. This must be a minimum of 20, must be divisible by 4.

return -1 if N is less than 20 (no operations done) or 0 on success

int tcSigProcVector::ToFloat ( short *restrict  InA,
float *restrict  Out,
int  N,
int  StrideA = 1,
int  StrideOut = 1 
)
static

Converts show data vector to floating point data vector:

Out[index] = (float)(InA[index])

Parameters:
InAvector of N input elements
StrideAWord increment needed to get to next item in A
Outlocation to write the output buffer
StrideOutWord increment needed to get to next item in Out
NNumber of words in the vectors. This must be a minimum of 20, must be divisible by 4.

return -1 if N is less than 20 (no operations done) or 0 on success

int tcSigProcVector::VecMulAdd ( float *restrict  InX,
float *restrict  InM,
float  InB,
float *restrict  Out,
int  N,
int  StrideX = 1,
int  StrideM = 1,
int  StrideOut = 1 
)
static

Performs a vector multiply then add (to a constant) according to:

Out[index] = InX[index]*InM[index]+InB

Parameters:
InXvector of N input elements
StrideXWord increment needed to get to next item in X
InMvector of N input elements
StrideMWord increment needed to get to next item in M
InBconstant to be added per index
Outlocation to write the output buffer
StrideOutWord increment needed to get to next item in Out
NNumber of words in the vectors. This must be a minimum of 20, must be divisible by 4.

return -1 if N is less than 20 (no operations done) or 0 on success

int tcSigProcVector::VecAddMul ( float *restrict  InX,
float *restrict  InM,
float  InB,
float *restrict  Out,
int  N,
int  StrideX = 1,
int  StrideM = 1,
int  StrideOut = 1 
)
static

Performs a vector add then multiply according to:

Out[index] = (InX[index]+InB)*InM[index]

Parameters:
InXvector of N input elements
StrideXWord increment needed to get to next item in X
InMvector of N input elements
StrideMWord increment needed to get to next item in M
InBconstant to be added per index
Outlocation to write the output buffer
StrideOutWord increment needed to get to next item in Out
NNumber of words in the vectors. This must be a minimum of 20, must be divisible by 4.

return -1 if N is less than 20 (no operations done) or 0 on success


  
Generated on Mon Apr 22 2013 11:33:40 for MityDSP Signal Processing by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.