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

Function clsparseGetTimer

src/clsparseTimer/clsparseTimer-extern.cpp:27–33  ·  view source on GitHub ↗

Even though the individual getInstance functions of the timer classes return references, we convert those to pointers before returning from here so that the clients can initialize their local variables to NULL, which references do not allow.

Source from the content-addressed store, hash-verified

25// we convert those to pointers before returning from here so that the clients can initialize
26// their local variables to NULL, which references do not allow.
27clsparseTimer* clsparseGetTimer(const clsparseTimerType type)
28{
29 if (type == CLSPARSE_CPU)
30 return &clsparseHostTimer::getInstance();
31
32 return &clsparseDeviceTimer::getInstance();
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected