TOpenCLMatrix.AddProduct Method

TOpenCLMtxVec AddProduct(TOpenCLMtxVec Vec1, TOpenCLMtxVec Vec2)

Add a product of two vectors.

#NameTypeDescription
1Vec1TOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2Vec2TOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

Result: stored in self (calling object), returns self for chaining

Remarks:

Multiply Vec1 elements with coresponding Vec2 elements and add the result to the calling vector. The size of the calling vector is set implicitly.

Indexed: TOpenCLMtxVec AddProduct(TOpenCLMtxVec Vec1, TOpenCLMtxVec Vec2, Int32 Vec1Index, Int32 Vec2Index, Int32 Index, Int32 Len)

Multiply Vec1 elements [Vec1Index]..[Vec1Index+Len-1] with Vec2 elements [Vec2Index]..[Vec2Index+Len-1] and add the results to the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1Vec1TOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2Vec2TOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
3Vec1IndexInt32
4Vec2IndexInt32
5IndexInt32start index
6LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if array borders are overrun.