Skip to content

Commit 8332e50

Browse files
committed
throw if aspect it not supported
1 parent 8dff32b commit 8332e50

File tree

1 file changed

+3
-0
lines changed
  • sycl/include/sycl/ext/oneapi/experimental

1 file changed

+3
-0
lines changed

sycl/include/sycl/ext/oneapi/experimental/clock.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ enum class clock_scope : int {
2222
sub_group = 3
2323
};
2424

25+
#ifdef __SYCL_DEVICE_ONLY__
26+
[[__sycl_detail__::__uses_aspects__(sycl::aspect::ext_oneapi_clock)]]
27+
#endif // __SYCL_DEVICE_ONLY__
2528
uint64_t clock(clock_scope scope = clock_scope::sub_group) {
2629
#ifdef __SYCL_DEVICE_ONLY__
2730
return __spirv_ReadClockKHR(static_cast<int>(scope));

0 commit comments

Comments
 (0)