TOpenCLValue ThresholdGT_LT(TOpenCLValue Vec, Double GTLevel, Double GTValue, Double LTLevel, Double LTValue)
Threshold greater than and less than operation.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLValue | source TOpenCLValue |
| 2 | GTLevel | Double | scalar |
| 3 | GTValue | Double | scalar |
| 4 | LTLevel | Double | scalar |
| 5 | LTValue | Double | scalar |
Returns: TOpenCLValue
Remarks:
Perform threshold operation on Vec value. The LTValue parameter is an lower bound for threshold operation. The GTValue parameter is an upper bound for threshold operation. Vec value less than LTLevel will be replaced with LTValue. Vec value bigger than GTLevel will be replaced with GTValue. Operation is available only for not complex values.
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(3);
a.ThresholdGT_LT(b, 2.3,3.4,1,0.5); // a = [3.4]
}
finally
{
clMtxVec.FreeIt(ref a, ref b);
}
}
}
See Also: TOpenCLValue.ThresholdLT, TOpenCLValue.ThresholdGT