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

Method getUniqueID

src/statTimer/statisticalTimer.GPU.cpp:234–252  ·  view source on GitHub ↗

This function's purpose is to provide a mapping from a 'friendly' human readable text string to an index into internal data structures.

Source from the content-addressed store, hash-verified

232// This function's purpose is to provide a mapping from a 'friendly' human readable text string
233// to an index into internal data structures.
234size_t
235GpuStatTimer::getUniqueID( const std::string& label, cl_uint groupID )
236{
237 // I expect labelID will hardly ever grow beyond 30, so it's not of any use
238 // to keep this sorted and do a binary search
239
240 idPair sItem = std::make_pair( label, groupID );
241
242 idVector::iterator iter;
243 iter = std::find( labelID.begin(), labelID.end(), sItem );
244
245 if( iter != labelID.end( ) )
246 return std::distance( labelID.begin( ), iter );
247
248 labelID.push_back( sItem );
249
250 return labelID.size( ) - 1;
251
252}
253
254void GpuStatTimer::ReleaseEvents()
255{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected