TOpenCLVector.Frac Method

Overload List

#SignatureDescription
1function Frac: TOpenCLMtxVec;Fractional part of values.
└ indexed: function Frac(Index: Integer; Len: Integer): TOpenCLMtxVec;
2function Frac(const X: TOpenCLMtxVec): TOpenCLMtxVec;Calculates the fractional part for all X object values.
└ indexed: function Frac(const X: TOpenCLMtxVec; XIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Overload 1: function Frac: TOpenCLMtxVec;

Fractional part of values.

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

Remarks:

Calculates the fractional part for all object values in-place.

Examples
var a: clVector;
    ind: Integer;
begin
    a.CopyFromArray(TSingleArray.Create(1,5.5,-1.6,6)); // a = [1, 5.5, -1.6, 6]
    a.Frac;  // a = [0, 0.5, -0.6, 0]
end;

Indexed: function Frac(Index: Integer; Len: Integer): TOpenCLMtxVec;

Calculates the fractional part for calling object elements [Index]..[Index+Len-1] in-place.

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement 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 Frac(const X: TOpenCLMtxVec): TOpenCLMtxVec;

Calculates the fractional part for all X object values.

#NameTypeDescription
1XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix

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

Remarks:

Stores the result in calling object. Size and TOpenCLBase.Complex properties of calling object are adjusted automatically.

Indexed: function Frac(const X: TOpenCLMtxVec; XIndex: Integer; Index: Integer; Len: Integer): TOpenCLMtxVec;

Calculates the fractional part for X object elements [XIndex]..[XIndex+Len-1].

#NameTypeDescription
1XTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2XIndexIntegerX start index
3IndexIntegerstart index
4LenIntegerelement count

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

Remarks:

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