MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / getDeviceAndHostTimer

Method getDeviceAndHostTimer

include/CL/opencl.hpp:2484–2496  ·  view source on GitHub ↗

* Return a synchronized pair of host and device timestamps as seen by device. * Use to correlate the clocks and get the host timer only using getHostTimer * as a lower cost mechanism in between calls. * The resolution of the host timer may be queried with the * CL_PLATFORM_HOST_TIMER_RESOLUTION query. * The resolution of the device timer may be queried with the * CL_

Source from the content-addressed store, hash-verified

2482 * @return A pair of (device timer, host timer) timer values.
2483 */
2484 std::pair<cl_ulong, cl_ulong> getDeviceAndHostTimer(cl_int *error = nullptr)
2485 {
2486 std::pair<cl_ulong, cl_ulong> retVal;
2487 cl_int err =
2488 clGetDeviceAndHostTimer(this->get(), &(retVal.first), &(retVal.second));
2489 detail::errHandler(
2490 err,
2491 __GET_DEVICE_AND_HOST_TIMER_ERR);
2492 if (error) {
2493 *error = err;
2494 }
2495 return retVal;
2496 }
2497#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 210
2498
2499#if CL_HPP_TARGET_OPENCL_VERSION >= 120

Callers

nothing calls this directly

Calls 2

errHandlerFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected