| 74 | // Currently, RangeType is expected to be a floating point type, and ValType an integer type |
| 75 | template< typename RangeType, typename ValType > |
| 76 | struct 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 | |
| 95 | CpuStatTimer& |
nothing calls this directly
no outgoing calls
no test coverage detected