MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / Reserve

Method Reserve

src/clsparseTimer/clsparseTimer-device.cpp:183–191  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

181// they will need, and nSamples is a hint on how many samples we think we will take
182// per event
183void
184clsparseDeviceTimer::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
193void
194clsparseDeviceTimer::Reset( )

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected