| 221 | } |
| 222 | |
| 223 | void |
| 224 | clsparseDeviceTimer::AddSample( std::vector< cl::Event > vecEvent ) |
| 225 | { |
| 226 | if( timerData.empty( ) ) |
| 227 | return; |
| 228 | |
| 229 | if( currRecord == 0 ) |
| 230 | { |
| 231 | timerData.at( currID ).push_back( StatDataVec( ) ); |
| 232 | timerData.at( currID ).back( ).reserve( nSamples ); |
| 233 | timerData.at( currID ).back( ).push_back( StatData( vecEvent ) ); |
| 234 | } |
| 235 | else |
| 236 | { |
| 237 | timerData.at( currID ).at( currSample ).push_back( StatData( vecEvent ) ); |
| 238 | ++currSample; |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | // This function's purpose is to provide a mapping from a 'friendly' human readable text string |
| 243 | // to an index into internal data structures. |