4.2 User Considerations

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 flags 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 differ depending on the status of the PBU cache or on the placement of vectors and code.