_Convolve
Computes the summation of two vectors.
Float _Convolve(
int nelement,
float* pstart,
float* pend,
float* pdata,
float* pfilter
);
Parameters
- nelement
[in] Number of elements to be processed. - pstart
[in] Pointer to the beginning of data buffer. - pend
[in] Pointer to the end of data buffer. - pdata
[in] Pointer to the current data buffer. - pfilter
[in] Pointer to the filter buffer.
Return Values
The summation of two vectors.
Remarks
The pdata parameter can point to any position in the data buffer. The pfilter parameter can point to any position in the filter buffer. The nelement parameter must not exceed pfilter+nelement buffer size.
To implement this function, use the -Qsh4 -Oi flag when compiling.
The following code shows how to compute the sum of two vectors.
/*****************************************************************
#include <stdio.h>
#include <shintr.h>
#include <stdio.h>
void main()
{
float pdata[5] = {1.0,2.0,3.0,4.0,5.0};
float filter[5] = {1.0,2.0,3.0,4.0,5.0};
float output;
float *pstart = pdata;
float *pend = pdata+4;
/*****************************************************************/
output = _Convolve(5, pstart, pend, pdata, filter);
printf("output = %f\n", output);
/*****************************************************************/
output = _Convolve(5, pstart, pend, pdata+1, filter);
printf("output = %f\n", output);
/*****************************************************************/
output = _Convolve(5, pstart, pend, pdata+2, filter);
printf("output = %f\n", output);
/*****************************************************************/
output = _Convolve(5, pstart, pend, pdata+3, filter);
printf("output = %f\n", output);
/*****************************************************************/
output = _Convolve(5, pstart, pend, pdata+4, filter);
printf("output = %f\n", output);
}
This example results in the following output.
output = 35.000000
output = 45.000000
output = 50.000000
output = 50.000000
output = 45.000000
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: shintr.h.
See Also
Microprocessor-specific Intrinsic Functions
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.