MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / PruneRange

Class PruneRange

src/statTimer/statisticalTimer.CPU.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74// Currently, RangeType is expected to be a floating point type, and ValType an integer type
75template< typename RangeType, typename ValType >
76struct PruneRange
77{
78 RangeType lower, upper;
79
80 PruneRange( RangeType mean, RangeType stdev ): lower( mean-stdev ), upper( mean+stdev ) {}
81
82 bool operator( )( ValType val )
83 {
84 // These comparisons can be susceptible to signed/unsigned casting problems
85 // This is why we cast ValType to RangeType, because RangeType should always be floating and signed
86 if( static_cast< RangeType >( val ) < lower )
87 return true;
88 else if( static_cast< RangeType >( val ) > upper )
89 return true;
90
91 return false;
92 }
93};
94
95CpuStatTimer&

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected