Microchip PIC32AK1216GC41064 handleiding
Handleiding
Je bekijkt pagina 7 van 76

Vector Funcons
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 7
2. Vector Funcons
Function Description
VectorAdd Adds the value of each element in the source one vector with its counterpart in the source
twovector andplaces the result in the destination vector.
VectorConvolve Computes the convolution between two sourcevectors andstores the result in a destination
vector.
VectorCopy Copies the elements of the source vector into the beginning of an (already existing) destination
vector.
VectorCorrelate Computes the correlation between two sourcevectors andstores the result in a destination
vector.
VectorDotProduct Computes the sum of the products between corresponding elements of the source one and
source two vectors.
VectorMax Returns the value and index of the last element in the source vector whose value is greater
than or equal to any previous vector element.
VectorMin Returns the value and index of the last element in the source vector whose value is lesser than
or equal to any previous vector element.
VectorMultiply Multiplies the value of each element in the source one vector with its counterpart in the source
twovector andplaces the result in the corresponding element of destination vector.
VectorNegate Negates (changes the sign of) the values of the elements in the source vector and places them
in the destination vector.
VectorPower Computes the power of a source vector as the sum of the squares of its elements.
VectorScale Scales (multiplies) the values of all the elements in the source vector by a scalevalue andplaces
the result in the destination vector.
VectorSubtract Subtracts the value of each element in the source one vector with its counterpart in the source
twovector andplaces the result in the destination vector.
VectorZeroPad Copies the contents of the source vector into the beginning of the destination vector, and then
lls the remaining positions—specied by numZeros — with zeros to complete the destination
vector.
2.1. Fraconal Vector Operaons
A fractional vector is a collection of numerical values, the vector elements, allocated contiguously
in memory, with the rst element at the lowest memory address. One word of memory is used
to store the value of each element, and this quantitymustbe interpreted as a fractional number
represented in 1.31 data format.
The pointer addressing the rst element of the vector serves as a handle, granting access to each
value within the vector. This address of the rst element is known as the base address (BA) of the
vector. Given that each vector element is 32-bits (for 1.31 fractional data), the last 2-bits of the base
address must be zero.
Theone-dimensionalarrangement of a vector accommodates to the memory storage model of the
device, so that the n
th
element of an N-element vector can be accessed from the vector's base
address as:
BA +4*(n – 1), for 1≤n≤N.
Unary and binary fractional vector operations are implemented in this library. The operand vector
in an unary operation is called the source vector. In a binary operation, the rst operand is referred
to as the source one vector and the second as the source two vector. Each operation applies some
computation to one or several elements of the source vector(s). Some operations produce a result
which is a scalar value (also to be interpreted as a 1.31 fractional number), while other operations
Bekijk gratis de handleiding van Microchip PIC32AK1216GC41064, 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 | PIC32AK1216GC41064 |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 11302 MB |