MUDA
Loading...
Searching...
No Matches
kernel_label.h
1#pragma once
2#include <muda/tools/launch_info_cache.h>
3#include <string_view>
4namespace muda
5{
7{
8 public:
9 KernelLabel(std::string_view name, std::string_view file = "", size_t line = ~0ull)
10 {
11 if constexpr(muda::RUNTIME_CHECK_ON)
12 {
13 details::LaunchInfoCache::current_kernel_name(name);
14 details::LaunchInfoCache::current_kernel_file(file);
15 details::LaunchInfoCache::current_kernel_line(line);
16 }
17 }
18
20 {
21 if constexpr(muda::RUNTIME_CHECK_ON)
22 {
23 details::LaunchInfoCache::current_kernel_name("");
24 details::LaunchInfoCache::current_kernel_file("");
25 details::LaunchInfoCache::current_kernel_line(~0ull);
26 }
27 }
28};
29} // namespace muda
Definition kernel_label.h:7