clVector.Mul Method

Overload List

#SignatureDescription
1function Mul(const Value: TCplx): TOpenCLMtxVec;Multiply all calling object elements with complex Value in-place.
└ indexed: function Mul(const Value: TCplx; Index: Integer; Len: Integer): TOpenCLMtxVec;
2function Mul(const Vec: TOpenCLMtxVec): TOpenCLMtxVec;Vector multiplication.
└ indexed: function Mul(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
3function Mul(const Vec: TOpenCLMtxVec; const Value: TCplx): TOpenCLMtxVec;Multiply each element of Vec with complex Value.
└ indexed: function Mul(const Vec: TOpenCLMtxVec; const Value: TCplx; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
4function Mul(const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec): TOpenCLMtxVec;Multiply all Vec1 elements with corresponding Vec2 elements.
└ indexed: function Mul(const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; Vec1Index: Integer; Vec2Index: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
5function Mul(const Vec: TOpenCLMtxVec; const Value: Double): TOpenCLMtxVec;Multiply each element of Vec with Value.
└ indexed: function Mul(const Vec: TOpenCLMtxVec; const Value: Double; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;
6function Mul(const Value: Double): TOpenCLMtxVec;Multiply object elements with Value.
└ indexed: function Mul(const Value: Double; Index: Integer; Len: Integer): TOpenCLMtxVec;

Overload 1: function Mul(const Value: TCplx): TOpenCLMtxVec;

Multiply all calling object elements with complex Value in-place.

#NameTypeDescription
1ValueTCplx

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

Indexed: function Mul(const Value: TCplx; Index: Integer; Len: Integer): TOpenCLMtxVec;

Multipy calling object elements [Index]..[Index+Len-1] with complex Value in-place.

#NameTypeDescription
1ValueTCplx
2IndexIntegerstart index
3LenIntegerelement count

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

Remarks:

An exception is raised if array borders are overrun or underrun.

Overload 2: function Mul(const Vec: TOpenCLMtxVec): TOpenCLMtxVec;

Vector multiplication.

#NameTypeDescription
1VecTOpenCLMtxVec

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

Remarks:

Multiply each of Vec elements with corresponding elements in the calling object. Size and clVector.Complex property of the calling object are set automatically. The result is stored in the calling object.

See Also: clVector.Divide

Indexed: function Mul(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with calling object elements [Index]..[Index+Len-1] in-place.

#NameTypeDescription
1VecTOpenCLMtxVec
2VecIndexInteger
3IndexIntegerstart index
4LenIntegerelement count

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

Remarks:

An exception is raised if Vec and calling object clVector.Complex property do not match or if array borders are overrun/underrun.

Overload 3: function Mul(const Vec: TOpenCLMtxVec; const Value: TCplx): TOpenCLMtxVec;

Multiply each element of Vec with complex Value.

#NameTypeDescription
1VecTOpenCLMtxVec
2ValueTCplx

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

Remarks:

Store the result in the calling object. Size of the calling object is set automatically. clVector.Complex property of the calling object is set to True.

Indexed: function Mul(const Vec: TOpenCLMtxVec; const Value: TCplx; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with complex Value.

#NameTypeDescription
1VecTOpenCLMtxVec
2ValueTCplx
3VecIndexInteger
4IndexIntegerstart index
5LenIntegerelement count

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

Remarks:

Store the result in calling object elements [Index]..[Index+Len-1]. Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. clVector.Complex propertiy of the calling object is set to True.

Overload 4: function Mul(const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec): TOpenCLMtxVec;

Multiply all Vec1 elements with corresponding Vec2 elements.

#NameTypeDescription
1Vec1TOpenCLMtxVec
2Vec2TOpenCLMtxVec

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

Remarks:

Store the results in calling object. Size and clVector.Complex property of calling object are adjusted automatically to match those of Vec1 and Vec2. An exception is raised if Vec1 and Vec2 size and clVector.Complex property do not match.

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

Multiply Vec1 elements [Vec1Index]..[Vec1Index+Len-1] with Vec2 object elements [Vec2Index]..[Vec2Index+Len-1].

#NameTypeDescription
1Vec1TOpenCLMtxVec
2Vec2TOpenCLMtxVec
3Vec1IndexInteger
4Vec2IndexInteger
5IndexIntegerstart index
6LenIntegerelement count

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

Remarks:

Store the results in calling object elements [Index]..[Index+Len-1]. Size and clVector.Complex properties of the calling object must be set explicitly. An exception is raised if array borders are overrun or underrun.

Overload 5: function Mul(const Vec: TOpenCLMtxVec; const Value: Double): TOpenCLMtxVec;

Multiply each element of Vec with Value.

#NameTypeDescription
1VecTOpenCLMtxVec
2ValueDouble

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

Remarks:

Store the result in the calling object. Size and clVector.Complex properties of the calling object are adjusted automatically.

Indexed: function Mul(const Vec: TOpenCLMtxVec; const Value: Double; VecIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with Value.

#NameTypeDescription
1VecTOpenCLMtxVec
2ValueDouble
3VecIndexInteger
4IndexIntegerstart index
5LenIntegerelement count

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

Remarks:

Store the result in calling object elements [Index]..[Index+Len-1]. Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. clVector.Complex propertiy of the calling object is set implicitly.

Overload 6: function Mul(const Value: Double): TOpenCLMtxVec;

Multiply object elements with Value.

#NameTypeDescription
1ValueDouble

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

Remarks:

Multiplies all calling object elements with Value in-place.

Examples
var v: clVector;
begin
    v.CopyFromArray(TSingleArray.Create(2,3,5));  // v = [2,3,5]
    v.Mul(3); // v = [6,9,15]
end;
See Also: clVector.Add

Indexed: function Mul(const Value: Double; Index: Integer; Len: Integer): TOpenCLMtxVec;

Multipy calling object elements [Index]..[Index+Len-1] with Value in-place.

#NameTypeDescription
1ValueDouble
2IndexIntegerstart index
3LenIntegerelement count

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

Remarks:

An exception is raised if array borders are overrun or underrun.