Microchip PIC32AK6416GC41036 handleiding
Handleiding
Je bekijkt pagina 8 van 76

Vector Funcons
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 8
produce a result which is a vector. When the result is also a vector, this is referred to as the
destination vector.
Some operations, that result in a vector, allow computation in place. This means the results of the
operation are placed back into the source vector (or the source one vector for binary operations). In
this case, the destination vector is said to (physically) replace the source (one) vector. If an operation
can be computed in place, it is indicated as such in the comments provided with the function
description.
For some binary operations, the two operands can be the same (physical) source vector, which
means the operation is applied to the source vector and itself. If this type of computation is possible
for a given operation, it is indicated as self-applicable in the comments provided with the function
description.
Some operations can be bothself-applicableand computed in place.
All the fractional vector operations in this library take as an argument the cardinality (number of
elements) of the operand vector(s). Based on the value of this argument, the following assumptions
are made:
1. The sum of sizes of all the vectors involved in a particular operation falls within the range of
available data memory for the target device.
2. In the case of binary operations, the cardinalities of both operand vectorsmustobey the rules of
vector algebra (specically for theVectorConvolveandVectorCorrelatefunctions).
3. The destination vectormustbe large enough to accept the results of an operation.
2.2. Addional Remarks
The description of the functions limits its scope of what could be considered the regular usage of
these operations. However, since no boundary checking is performed during computation of these
functions, operations and its results are interpreted to t specic needs.
For instance, while computing theVectorMaxfunction, the length of the source vector could be
greater thannumElems. In this case, the function would be used to nd the maximum value only
among the rstnumElemselements of the source vector.
Similarly, if the requirement is to replacenumElemselements of a destination vector located
betweenNandN+numElems-1, withnumElemselements from a source vector located between
elementsMandM+numElems-1, then, theVectorCopyfunction could be used as follows:
fractional* dstV[DST_ELEMS] = {...};
fractional* srcV[SRC_ELEMS] = {...};
int n = NUM_ELEMS;
int N = N_PLACE; /* NUM_ELEMS+N ≤ DST_ELEMS */
int M = M_PLACE; /* NUM_ELEMS+M ≤ SRC_ELEMS */
fractional* dstVector = dstV+N;
fractional* srcVector = srcV+M;
dstVector = VectorCopy (n, dstVector, srcVector);
Also in this context, theVectorZeroPadfunction can operate in place, wheredstV=srcV,numElemsis
the number of elements at the beginning of the source vector to preserve, andnumZeros isthe
number of elements at the vector tail to set to zero. Other possibilities can be exploited from the
fact that no boundary checking is performed.
2.3. Funcons
Bekijk gratis de handleiding van Microchip PIC32AK6416GC41036, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
Merk | Microchip |
Model | PIC32AK6416GC41036 |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 11302 MB |