TOpenCLValue.ThreshTop Method

TOpenCLValue ThreshTop(TOpenCLValue Src, Double Value)

Threshold top operation.

#NameTypeDescription
1SrcTOpenCLValuesource TOpenCLValue
2ValueDoublescalar

Returns: TOpenCLValue

Remarks:

Perform threshold operation Src. The Value parameter is an upper bound for threshold operation. Src value bigger than Value will be replaced with Value.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TOpenCLValue a, b;
        clMtxVec.CreateIt(out a, out b);
        try
        {
            b.Copy(0.1);
            a.ThreshTop(b, 0.2); // a = [0.2]
        }
        finally
        {
            clMtxVec.FreeIt(ref a, ref b);
        }
    }
}
See Also: TOpenCLValue.ThreshTop