1.4.2.83 DSP_VectorMul32 Function
Multiplication of a series of numbers in one vector to another vector.
Description
void DSP_VectorMul32(int32_t *outdata, int32_t *indata1, int32_t *indata2, int N);
Multiples the value of each element of indata1 * indata2 and stores it to outdata. The number of samples to process is given by the parameter N. Data is in the Q31 fractional format.
outdata filled with N elements of indata1 * indata2
Preconditions
The pointers outdata and indata must be aligned on 4-byte boundaries. N must be greater than or equal to four and a multiple of four.
Parameters
outdata pointer to output array of 16-bit elements (int32_t)
indata1 pointer to input array of 16-bit elements (int32_t)
indata2 pointer to input array of 16-bit elements (int32_t)
N number of samples (int)
Returns
None.
Remarks
This must be assembled with .set microMIPS.
Example
int16_t *pOutdata; int32_t outVal[8]; int32_t inBufMultA[8]={0x7FFFFFFF, 0x80000000, 0x73333333, 0x66666666, 0x19999999, 0x40000000, 0x7FFFFFFF, 0xB3333334}; _// 1, -1, 0.9, 0.8, 0.2, 0.5, 1, -0.6_ int32_t inBufMultB[8]={0x0CCCCCCD, 0x0CCCCCCD, 0x40000000, 0xC0000000, 0xE6666667, 0x40000000, 0x00000000, 0x0CCCCCCD}; _// 0.1, 0.1, 0.5, -0.5, -0.2, 0.5, 0, 0.1_ int Num = 8; pOutdata = &outVal; DSP_VectorMul32(pOutdata, inBufMultA, inBufMultB, Num); _// outVal[i] = inBufTest[i] * inBuf2[i] =_ _// {0x0CCCCCCD, 0xF3333333, 0x3999999A, 0xCCCCCCCD, 0xFAE147AE,_ _// 0x20000000, 0x00000000, 0xF851EB86}_ _// 0.1, -0.1, 0.45, -0.4, -0.04, 0.25, 0, -0.06_
C
void DSP_VectorMul32 (int32_t * outdata , int32_t * indata1 , int32_t * indata2 , int N );