#pragma once // OpenCL SDK includes #include "OpenCLUtilsCpp_Export.h" // STL includes #include // OpenCL includes #include namespace cl { namespace util { template auto get_duration(cl::Event& ev) { return std::chrono::duration_cast(std::chrono::nanoseconds{ ev.getProfilingInfo() - ev.getProfilingInfo() }); } } }