| 316 | } |
| 317 | |
| 318 | std::vector< size_t > |
| 319 | CpuStatTimer::pruneOutliers( size_t id , cl_double multiple ) |
| 320 | { |
| 321 | //if( clkTicks.empty( ) ) |
| 322 | // return std::vector< size_t >( ); |
| 323 | |
| 324 | //cl_double mean = getMean( id ); |
| 325 | //cl_double stdDev = getStdDev( id ); |
| 326 | |
| 327 | //clkVector& clks = clkTicks.at( id ); |
| 328 | |
| 329 | //// Look on p. 379, "The C++ Standard Library" |
| 330 | //// std::remove_if does not actually erase, it only copies elements, it returns new 'logical' end |
| 331 | //clkVector::iterator newEnd = std::remove_if( clks.begin( ), clks.end( ), PruneRange< cl_double,cl_ulong >( mean, multiple*stdDev ) ); |
| 332 | |
| 333 | //clkVector::difference_type dist = std::distance( newEnd, clks.end( ) ); |
| 334 | |
| 335 | //if( dist != 0 ) |
| 336 | // clks.erase( newEnd, clks.end( ) ); |
| 337 | |
| 338 | //assert( dist < std::numeric_limits< cl_uint >::max( ) ); |
| 339 | |
| 340 | return std::vector< size_t >( ); |
| 341 | } |
| 342 | |
| 343 | size_t |
| 344 | CpuStatTimer::pruneOutliers( cl_double multiple ) |