TOpenCLMatrix::ThreshTop Method

Overload List

#SignatureDescription
1TOpenCLBase *ThreshTop(TOpenCLBase *Vec, const double Value, int VecIndex, int Index, int Len);
2TOpenCLMtxVec *ThreshTop(const double Value);Threshold top operation.
3TOpenCLMtxVec *ThreshTop(const double Value, int Index, int Len);Perfrom the threshold operation on calling object values [Index]..[Index+Len-1].
4TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Src, const double Value);Perform threshold operation on all Src object values.
5TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Vec, const double Value, int VecIndex, int Index, int Len);Perform a threshold operation Vec elements [VecIndex]..[VecIndex+Len-1].

Overload 1: TOpenCLBase *ThreshTop(TOpenCLBase *Vec, const double Value, int VecIndex, int Index, int Len);

#NameTypeDescription
1VecTOpenCLBase *
2Valueconst double
3VecIndexint
4Indexint
5Lenint
Declared in Dew::Math::TOpenCLBase · Dew.Math/clMtxVec.h · Cross-compiler

Overload 2: TOpenCLMtxVec *ThreshTop(const double Value);

Threshold top operation.

#NameTypeDescription
1Valueconst double
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
#include "Units.clMtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;

void Example()
{
    TOpenCLVector* a;
    CreateIt(a);
    a->CopyFromArray( DewArray<double>{2, 0.1, 3, 4});
    a->ThreshTop(0.2); // a = [0.2, 0.1, 0.2, 0.2]
    FreeIt(a);
}
See Also: TOpenCLMatrix::ThreshTop
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 3: TOpenCLMtxVec *ThreshTop(const double Value, int Index, int Len);

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

#NameTypeDescription
1Valueconst double
2Indexint
3Lenint
Remarks:

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

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 4: TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Src, const double Value);

Perform threshold operation on all Src object values.

#NameTypeDescription
1SrcTOpenCLMtxVec *
2Valueconst double
Remarks:

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

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 5: TOpenCLMtxVec *ThreshTop(TOpenCLMtxVec *Vec, const double Value, int VecIndex, int Index, int Len);

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

#NameTypeDescription
1VecTOpenCLMtxVec *
2Valueconst double
3VecIndexint
4Indexint
5Lenint
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.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler