mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-20 09:38:55 +02:00
wip dont use
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
// OpenCL SDK includes
|
||||
#include "OpenCLUtilsCpp_Export.h"
|
||||
|
||||
// STL includes
|
||||
#include <chrono>
|
||||
|
||||
// OpenCL includes
|
||||
#include <CL/opencl.hpp>
|
||||
|
||||
namespace cl {
|
||||
namespace util {
|
||||
template <cl_int From, cl_int To, typename Dur = std::chrono::nanoseconds>
|
||||
auto get_duration(cl::Event& ev)
|
||||
{
|
||||
return std::chrono::duration_cast<Dur>(std::chrono::nanoseconds{
|
||||
ev.getProfilingInfo<To>() - ev.getProfilingInfo<From>() });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user