clVector.AddScaled Method

Overload List

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

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

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

#NameTypeDescription
1VecTOpenCLMtxVec
2aScaleTCplx

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 clVector.Complex properties of the calling object are set implicitly to match the Vec object.

Indexed: function AddScaled(const Vec: TOpenCLMtxVec; const aScale: TCplx; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

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

#NameTypeDescription
1VecTOpenCLMtxVec
2aScaleTCplx
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;

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

#NameTypeDescription
1VecTOpenCLMtxVec
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 clVector.Complex properties of the calling object are set implicitly to match the Vec object.

Indexed: function AddScaled(const Vec: TOpenCLMtxVec; aScale: Double; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

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

#NameTypeDescription
1VecTOpenCLMtxVec
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.