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

Method Reserve

src/statTimer/statisticalTimer.CPU.cpp:162–178  ·  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

160// they will need, and nSamples is a hint on how many samples we think we will take
161// per event
162void
163CpuStatTimer::Reserve( size_t nEvents, size_t nSamples )
164{
165 this->nEvents = std::max< size_t >( 1, nEvents );
166 this->nSamples = std::max< size_t >( 1, nSamples );
167
168 Clear( );
169 labelID.reserve( nEvents );
170
171 clkStart.resize( nEvents );
172 clkTicks.resize( nEvents );
173
174 for( cl_uint i = 0; i < nEvents; ++i )
175 {
176 clkTicks.at( i ).reserve( nSamples );
177 }
178}
179
180void
181CpuStatTimer::setNormalize( bool norm )

Callers 1

transformFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected