Operations with Matrix and Vector Arrays

This subsection expands upon vector-vector, matrix-vector and matrix-matrix binary operations with arrays of matrices and vectors. Matrix (vector) array functions having three or more source objects operate in a similar way, as well as functions with transposed matrices.

The base function operates on two sources: two vector operands, two matrix operands or a matrix and vector operand (object type is "vv", "mm", or "mv"):

dst = src1 <ops> src2, which means that an appropriate operation is carried out with vector or matrix elements.

When the first source operand of the function is an array of matrices (vectors) and the second operand is a single matrix (vector) (object type is "vav", "mav", or "mam"), the base function is applied to each j-th matrix (vector) in the source array (first operand) and the single source matrix or vector (second operand). The result is stored in the j-th destination matrix (vector).

dstj = src1j <ops> src2, 0 j < count.

When the first source operand of the function is a single matrix (vector) and the second operand is an array of matrices (vectors) (object type is "vva", "mva", or "mma"), the base function is applied to the single source matrix or vector (first operand) and each j-th matrix (vector) in the source array (second operand). The result is stored the j-th destination matrix (vector).

dstj = src1 <ops> src2j, 0 j < count.

When both source operands of the function are arrays of matrices (vectors) (object type is "vava", "mava", or "mama"), the base function is applied to each j-th matrix (vector) in the first source array and each j-th source matrix (vector) in the second source array. The result is stored in the j-th destination matrix (vector).

dstj = src1j <ops> src2j, 0 j < count.

For example, see the Saxpy function and the Mul function.


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.