Microchip PIC32AK3208GC41064 handleiding

76 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 25 van 76
Matrix Funcons
User Guide
© 2025 Microchip Technology Inc. and its subsidiaries
DS70005605A - 25
1. The sum of sizes of all the matrices 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 number of rows and columns of the operand matrices must
obey the rules of vector algebra (i.e., For matrix addition and subtraction, the two matrices must
have the same number of rows and columns, while for matrix multiplication, the number of
columns of the rst operand must be the same as the number of rows of the second operand.).
The source matrix to the inversion operation must be square (the same number of rows and
columns) and non-singular (its determinant dierent than zero).
The destination matrix must be large enough to accept the results of an operation.
4.2. User Consideraons
When using matrix functions, consider the following:
1. No boundary checking is performed by these functions. Out of range dimensions (including zero
row and/or zero column matrices) as well as nonconforming use of source matrix sizes in binary
operations may produce unexpected results.
2. The matrix addition and subtraction operations could lead to saturation if the sum of
corresponding elements in the source(s) matrix(ces) is greater than 1-2
-31
for 1.31 fractional
or smaller than -1.
3. The matrix multiplication operation could lead to saturation if the sum of products of
corresponding row and column sets results in a value greater than 1-2
-31
for 1.31 fractional
or smaller than -1.
4. It is recommended that the STATUS Register (SR) is examined after completion of each function
call. In particular, users can inspect the SA, SB and SAB ags after the function returns to
determine if saturation occurred.
5. Operations which return a destination matrix can be nested. For instance, if:
a = Op1 (b, c), with b = Op2 (d), and c = Op3 (e, f), then
a = Op1 (Op2 (d), Op3 (e, f))
6. All cycle count values for PIC32A are considered with the PBU cache enabled and may dier
depending on the status of the PBU cache or on the placement of vectors and code.
4.3. Addional Remarks
The description of the functions limits the scope to the regular usage of these operations. However,
since no boundary checking is performed during computation of these functions, operations and
the results are interpreted to t specic needs.
For instance, while computing the MatrixMultiply function, the dimensions of the intervening
matrices do not necessarily need to be {numRows1, numCos1Rows2} for the source one matrix,
{numCols1Rows2, numCols2} for the source two matrix and {numRows1, numCols2} for the destination
matrix. In fact, all that is needed is that their sizes are large enough so during computation, the
pointers do not exceed their memory range.
As another example, when a source matrix of dimension {numRows, numCols} is transposed, the
destination matrix has dimensions {numCols, numRows}. Therefore, the operation can be computed
in place only if the source matrix is square. Nevertheless, the operation can be successfully applied
in place to non-square matrices; all that needs to be kept in mind is the implicit change of
dimensions.
Other possibilities can be exploited from the fact that no boundary checking is performed.
4.4. Funcons
4.4.1. MatrixAdd
Description

Bekijk gratis de handleiding van Microchip PIC32AK3208GC41064, 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
ModelPIC32AK3208GC41064
CategorieNiet gecategoriseerd
TaalNederlands
Grootte11302 MB