TOpenCLMatrix.ThreshTop Method

Overload List

#SignatureDescription
1function ThreshTop(const Src: TOpenCLMtxVec; const Value: double): TOpenCLMtxVec; overload;Perform threshold operation on all Src object values.
└ indexed: function ThreshTop(const Vec: TOpenCLMtxVec; const Value: double; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;
2function ThreshTop(const Value: double): TOpenCLMtxVec; overload;Threshold top operation.
└ indexed: function ThreshTop(const Value: double; Index, Len: integer): TOpenCLMtxVec; overload;

Overload 1: function ThreshTop(const Src: TOpenCLMtxVec; const Value: double): TOpenCLMtxVec; overload;

Perform threshold operation on all Src object values.

#NameTypeDescription
1SrcTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2Valuedoublescalar

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

Remarks:

Store the results in calling object. Size and TOpenCLBase.Complex properties of the calling object are adjusted automatically.

Indexed: function ThreshTop(const Vec: TOpenCLMtxVec; const Value: double; VecIndex, Index, Len: integer): TOpenCLMtxVec; overload;

Perform a threshold operation Vec elements [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1VecTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2Valuedoublescalar
3VecIndexinteger
4Indexintegerstart index
5Lenintegerelement count

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

Remarks:

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

Overload 2: function ThreshTop(const Value: double): TOpenCLMtxVec; overload;

Threshold top operation.

#NameTypeDescription
1Valuedoublescalar

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

Remarks:

Perform threshold operation on all calling object values. The Value parameter is an upper bound for threshold operation. All values bigger than Value will be replaced with Value.

Examples
var a: clMatrix;
begin
    a.CopyFromArray(2,2,TSingleArray.Create(2,0.1,3,4));
    a.Threshtop(0.2); // a = [0.2,0.1,0.2,0.2]
end;

Indexed: function ThreshTop(const Value: double; Index, Len: integer): TOpenCLMtxVec; overload;

Perfrom the threshold operation on calling object values [Index]..[Index+Len-1].

#NameTypeDescription
1Valuedoublescalar
2Indexintegerstart index
3Lenintegerelement count

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

Remarks:

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