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

Method Stop

src/clsparseTimer/clsparseTimer-host.cpp:206–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void
207clsparseHostTimer::Stop( size_t id )
208{
209 cl_ulong n;
210
211#if defined( _WIN32 )
212 ::QueryPerformanceCounter( reinterpret_cast<LARGE_INTEGER*>( &n ) );
213#else
214 struct timeval s;
215 gettimeofday( &s, 0 );
216 n = (cl_ulong)s.tv_sec * 1000000 + (cl_ulong)s.tv_usec;
217#endif
218
219 n -= clkStart.at( id );
220 clkStart.at( id ) = 0;
221 AddSample( id, n );
222}
223
224void
225clsparseHostTimer::AddSample( const size_t id, const cl_ulong n )

Callers

nothing calls this directly

Calls 1

atMethod · 0.80

Tested by

no test coverage detected