Microchip PIC32AK6416GC41036 handleiding

76 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 8 van 76
Vector Funcons
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 bothself-applicableand 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 vectorsmustobey the rules of
vector algebra (specically for theVectorConvolveandVectorCorrelatefunctions).
3. The destination vectormustbe large enough to accept the results of an operation.
2.2. Addional 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 specic needs.
For instance, while computing theVectorMaxfunction, the length of the source vector could be
greater thannumElems. In this case, the function would be used to nd the maximum value only
among the rstnumElemselements of the source vector.
Similarly, if the requirement is to replacenumElemselements of a destination vector located
betweenNandN+numElems-1, withnumElemselements from a source vector located between
elementsMandM+numElems-1, then, theVectorCopyfunction 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, theVectorZeroPadfunction can operate in place, wheredstV=srcV,numElemsis
the number of elements at the beginning of the source vector to preserve, andnumZeros isthe
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. Funcons

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

MerkMicrochip
ModelPIC32AK6416GC41036
CategorieNiet gecategoriseerd
TaalNederlands
Grootte11302 MB