clMatrix.AddProduct Method

function AddProduct(const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec): TOpenCLMtxVec;

Add a product of two vectors.

#NameTypeDescription
1Vec1TOpenCLMtxVec
2Vec2TOpenCLMtxVec

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.

See Also: clMatrix.Mul, clMatrix.Add

Indexed: function AddProduct(const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; Vec1Index: Integer; Vec2Index: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

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
1Vec1TOpenCLMtxVec
2Vec2TOpenCLMtxVec
3Vec1IndexInteger
4Vec2IndexInteger
5IndexIntegerstart index
6LenIntegerelement count

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

Remarks:

An exception is raised if array borders are overrun.