clMatrix.Abs Method

Overload List

#SignatureDescription
1TOpenCLMtxVec AbsAbsolute values.
└ indexed: TOpenCLMtxVec Abs(Int32 Index, Int32 Len)
2TOpenCLMtxVec Abs(TOpenCLMtxVec X)Calculate the absolute value for all X object and store the results in the calling object.
└ indexed: TOpenCLMtxVec Abs(TOpenCLMtxVec X, Int32 XIndex, Int32 Index, Int32 Len)

Overload 1: TOpenCLMtxVec Abs

Absolute values.

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

Remarks:

Calculate the absolute value of all calling object elements in-place.

Examples
clMatrix a;
a.CopyFromArray(2,2,TSingleArray.Create(1,-2,3,4));
a.Abs;
See Also: clMatrix.Mag

Indexed: TOpenCLMtxVec Abs(Int32 Index, Int32 Len)

Calculate the absolute value for calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element 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 Abs(TOpenCLMtxVec X)

Calculate the absolute value for all X object and store the results in the calling object.

#NameTypeDescription
1XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

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

Remarks:

Size and Dew.Math.clMatrix.Complex properties of calling object are adjusted automatically.

Indexed: TOpenCLMtxVec Abs(TOpenCLMtxVec X, Int32 XIndex, Int32 Index, Int32 Len)

Calculate the absolute value of X object elements [XIndex]..[XIndex+Len-1].

#NameTypeDescription
1XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2XIndexInt32X start index
3IndexInt32start index
4LenInt32element count

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

Remarks:

Store the results in calling object elements [Index]..[Index+Len-1]. An exception is raised if array borders are overrun or underrun.