TOpenCLVector.Sgn Method

Overload List

#SignatureDescription
1function Sgn: TOpenCLMtxVec; overload;Computes signum function of calling object elements.
└ indexed: function Sgn(Index, Len: integer): TOpenCLMtxVec; overload;
2function Sgn(const Src: TOpenCLMtxVec): TOpenCLMtxVec; overload;Computes signum function from Src elements and stores the result in the calling object.
└ indexed: function Sgn(const Src: TOpenCLMtxVec; SrcIndex,Index,Len: integer): TOpenCLMtxVec; overload;

Overload 1: function Sgn: TOpenCLMtxVec; overload;

Computes signum function of calling object elements.

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

Remarks:

Signum(X) is 1 for X > 0 , equal to zero for X = 0 and -1 for X < 0.

Indexed: function Sgn(Index, Len: integer): TOpenCLMtxVec; overload;

Computes signum function of calling object elements [Index..Index+Len-1].

#NameTypeDescription
1Indexintegerstart index
2Lenintegerelement count

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

Remarks:

Signum(X) is 1 for X > 0 , equal to zero for X = 0 and -1 for X < 0.

Overload 2: function Sgn(const Src: TOpenCLMtxVec): TOpenCLMtxVec; overload;

Computes signum function from Src elements and stores the result in the calling object.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

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

Remarks:

Size and TOpenCLBase.Complex properties of calling object are adjusted automatically. Signum(X) is 1 for X > 0 , equal to zero for X = 0 and -1 for X < 0.

Indexed: function Sgn(const Src: TOpenCLMtxVec; SrcIndex,Index,Len: integer): TOpenCLMtxVec; overload;

Computes signum function from Src elements [SrcIndex..SrcIndex+Len-1] and stores the result in the calling object [Index..Index+Len-1].

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2SrcIndexintegersource start index
3Indexintegerstart index
4Lenintegerelement count

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

Remarks:

Size and TOpenCLBase.Complex properties of calling object are adjusted automatically. Signum(X) is 1 for X > 0 , equal to zero for X = 0 and -1 for X < 0.