MityDSP Documentation Index

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:
InA vector of N input elements
StrideA Word increment needed to get to next item in A
InB vector of N input elements
StrideB Word increment needed to get to next item in B
Out location to write the output buffer
StrideOut Word increment needed to get to next item in Out
N Number 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:
InA vector of N input elements
StrideA Word increment needed to get to next item in A
InB vector of N input elements
StrideB Word increment needed to get to next item in B
Out location to write the output buffer
StrideOut Word increment needed to get to next item in Out
N Number 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:
InA vector of N input elements
StrideA Word increment needed to get to next item in A
Out location to write the output buffer
StrideOut Word increment needed to get to next item in Out
N Number 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:
InX vector of N input elements
StrideX Word increment needed to get to next item in X
InM vector of N input elements
StrideM Word increment needed to get to next item in M
InB constant to be added per index
Out location to write the output buffer
StrideOut Word increment needed to get to next item in Out
N Number 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:
InX vector of N input elements
StrideX Word increment needed to get to next item in X
InM vector of N input elements
StrideM Word increment needed to get to next item in M
InB constant to be added per index
Out location to write the output buffer
StrideOut Word increment needed to get to next item in Out
N Number 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 Wed Mar 17 18:24:40 2010 for MityDSP Signal Processing by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.