2.3.5 VectorDotProduct
Description
VectorDotProduct computes the sum of the products between the corresponding elements of the source one and source two vectors.
Prototype
fractional VectorDotProduct (int numElems, fractional* srcV1, fractional* srcV2);
Arguments
Parameters |
Description |
---|---|
numElems |
Number of elements in the source vectors |
srcV1 |
Pointer to the source one vector |
srcV2 |
Pointer to the source two vector |
Returns
Value of the sum of products.
Remarks
If the absolute value of sum-of-products is larger than the maximum value of 1.31 fractional data type, the operation results in saturation.
This function can be computed in place.
This function can be self-applicable.
Source File
- vdot_aa.s
Function Profile
Device |
Program Words |
Cycles |
---|---|---|
PIC32A |
11 |
32 + numElems - If srcV2 in y-memory and srcV1 in x-memory. 32 + 2*numElems - If both srcV2 and srcV1 in x-memory. |
System resource usage
- W0…W4 - used, not restored
- ACCA - used, not restored
- CORCON - saved, used, restored
- REPEAT instruction(s) usage – 1