Vector-constant and Matrix-constant Operations

This subsection expands on vector-constant operations with arrays of vectors and constants. The matrix-constant operations with arrays of matrices and constants are carried out in a similar way.

The base function (object type is "vc" or "cv") performs an operation with a constant and a vector so that the operation is carried out with each element of the source vector and the constant. The result is stored in the destination vector:

dst [i] = src [i] <ops> val, 0 i < len.

When the first operand is a vector array and the second operand is a single constant (object type is "vac" or "cva"), the operation is carried out with the constant and each element of the j-th source vector. The result is stored in j-th destination vector:

dstj [i] = srcj [i] <ops> val, where 0 i < len, 0 j < count.

When the first operand is a vector array and the second operand is an array of constants (object type is "vaca" or "cava"), the operation is carried out with each element of the j-th source vector and the j-th constant in the source array of constants Val. The result is stored in j-th destination vector:

dstj [i] = srcj [i] <ops> Valj , where 0 i < len, 0 j < count.

When the first operand is a single vector and the second operand is an array of constants (object type is "vca" or "cav"), the operation is carried out with each element of the source vector and the j-th constant in the source array of constants Val. The result is stored in j-th destination vector:

dstj [i] = src [i] <ops> Valj, where 0 i < len, 0 j < count.

For example, see the Add function.


Submit feedback on this help topic

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