clMatrix.Scale Method

Overload List

#SignatureDescription
1TOpenCLMtxVec Scale(TCplx Factor)Multiply all calling object elements with a complex Value in-place.
└ indexed: TOpenCLMtxVec Scale(TCplx Factor, Int32 Index, Int32 Len)
2TOpenCLMtxVec Scale(Double Factor)Multiply object elements with Value.
└ indexed: TOpenCLMtxVec Scale(Double Factor, Int32 Index, Int32 Len)

Overload 1: TOpenCLMtxVec Scale(TCplx Factor)

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

#NameTypeDescription
1FactorTCplxscalar

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

Indexed: TOpenCLMtxVec Scale(TCplx Factor, Int32 Index, Int32 Len)

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

#NameTypeDescription
1FactorTCplxscalar
2IndexInt32start index
3LenInt32element 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: TOpenCLMtxVec Scale(Double Factor)

Multiply object elements with Value.

#NameTypeDescription
1FactorDoublescalar

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

Remarks:

Multiply all calling object elements with Value in-place. This method is the same as the Dew.Math.clMatrix.Mul method overloads multiplying with vector elements with a scalar.

Examples
clMatrix v;
v.CopyFromArray(2,2,TSingleArray.Create(2,3,5));  // v = new double[] {2,3,5}
v.Scale(3); // v = new double[] {6,9,15}
See Also: clMatrix.Add

Indexed: TOpenCLMtxVec Scale(Double Factor, Int32 Index, Int32 Len)

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

#NameTypeDescription
1FactorDoublescalar
2IndexInt32start index
3LenInt32element count

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

Remarks:

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