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

Method Reset

src/benchmarks/cusparse-bench/src/statisticalTimer.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void
97StatisticalTimer::Reset( )
98{
99 if( nEvents == 0 || nSamples == 0 )
100 throw std::runtime_error( "StatisticalTimer::Reserve( ) was not called before Reset( )" );
101
102 clkStart.clear( );
103 clkTicks.clear( );
104
105 clkStart.resize( nEvents );
106 clkTicks.resize( nEvents );
107
108 for( unsigned int i = 0; i < nEvents; ++i )
109 {
110 clkTicks.at( i ).reserve( nSamples );
111 }
112
113 return;
114}
115
116// The caller can pre-allocate memory, to improve performance.
117// nEvents is an approximate value for how many seperate events the caller will think

Callers 1

mainFunction · 0.45

Calls 3

resizeMethod · 0.80
atMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected