The caller can pre-allocate memory, to improve performance. nEvents is an approximate value for how many seperate events the caller will think they will need, and nSamples is a hint on how many samples we think we will take per event
| 181 | // they will need, and nSamples is a hint on how many samples we think we will take |
| 182 | // per event |
| 183 | void |
| 184 | clsparseDeviceTimer::Reserve( size_t nE, size_t nS ) |
| 185 | { |
| 186 | nEvents = std::max< size_t >( 1, nE ); |
| 187 | nSamples = std::max< size_t >( 1, nS ); |
| 188 | |
| 189 | labelID.reserve( nEvents ); |
| 190 | timerData.resize( nEvents ); |
| 191 | } |
| 192 | |
| 193 | void |
| 194 | clsparseDeviceTimer::Reset( ) |