clMatrix.AddScaled Method

Overload List

#SignatureDescription
1function AddScaled(const Vec: TOpenCLMtxVec; aScale: TCplx): TOpenCLMtxVec; overload;Add each of Vec elements to corresponding elements in the calling object.
└ indexed: function AddScaled(const Vec: TOpenCLMtxVec; aScale: TCplx; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;
2function AddScaled(const Vec: TOpenCLMtxVec; aScale: double): TOpenCLMtxVec; overload;Add each of Vec elements to corresponding elements in the calling object.
└ indexed: function AddScaled(const Vec: TOpenCLMtxVec; aScale: double; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Overload 1: function AddScaled(const Vec: TOpenCLMtxVec; aScale: TCplx): TOpenCLMtxVec; overload;

Add each of Vec elements to corresponding elements in the calling object.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2aScaleTCplxscalar

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

Remarks:

In addition, the following formula is being used:

result = result+ aScale*Vec

The results are stored in the calling object. Size and clMatrix.Complex properties of the calling object are set implicitly to match the Vec object.

Indexed: function AddScaled(const Vec: TOpenCLMtxVec; aScale: TCplx; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Adds Vec elements [VecIndex]..[VecIndex+Len-1] to calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2aScaleTCplxscalar
3VecIndexinteger
4Indexintegerstart index
5Lenintegerelement count

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

Remarks:

In addition, the following formula is being used:

result = result+ aScale*Vec

An exception is raised if array borders are overrun.

Overload 2: function AddScaled(const Vec: TOpenCLMtxVec; aScale: double): TOpenCLMtxVec; overload;

Add each of Vec elements to corresponding elements in the calling object.

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2aScaledoublescalar

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

Remarks:

In addition, the following formula is being used:

result = result+ aScale*Vec

The results are stored in the calling object. Size and clMatrix.Complex properties of the calling object are set implicitly to match the Vec object.

Indexed: function AddScaled(const Vec: TOpenCLMtxVec; aScale: double; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Adds Vec elements [VecIndex]..[VecIndex+Len-1] to calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2aScaledoublescalar
3VecIndexinteger
4Indexintegerstart index
5Lenintegerelement count

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

Remarks:

In addition, the following formula is being used:

result = result+ Cplx(aScale)*Vec

An exception is raised if array borders are overrun.