Skip to content

Instantly share code, notes, and snippets.

View GeorgeWeb's full-sized avatar
Don't blame the compiler, assist it.

Georgi Mirazchiyski GeorgeWeb

Don't blame the compiler, assist it.
View GitHub Profile
GeorgeWeb / sycl_dev_profile.hpp
Last active April 18, 2022 11:55
Simple example of a 'SYCL profiling' wrapper class for kernels running on a device with OpenCL support
#include <chrono>
#include <vector>
#include <CL/sycl.hpp>
namespace sycl = cl::sycl;
using wall_clock_t = std::chrono::high_resolution_clock;
using time_point_t = std::chrono::time_point<wall_clock_t>;
template <typename T, class Period>
using time_interval_t = std::chrono::duration<T, Period>;