17 #define SYCL_EXT_ONEAPI_CUDA_ASYNC_BARRIER 1
20 inline namespace _V1 {
23 namespace experimental {
39 #ifdef __SYCL_DEVICE_ONLY__
40 __clc_BarrierInitialize(&state, expected_count);
44 throw runtime_error(
"Barrier is not supported on host device.",
45 PI_ERROR_INVALID_DEVICE);
50 #ifdef __SYCL_DEVICE_ONLY__
51 __clc_BarrierInvalidate(&state);
53 throw runtime_error(
"Barrier is not supported on host device.",
54 PI_ERROR_INVALID_DEVICE);
59 #ifdef __SYCL_DEVICE_ONLY__
60 return __clc_BarrierArrive(&state);
62 throw runtime_error(
"Barrier is not supported on host device.",
63 PI_ERROR_INVALID_DEVICE);
68 #ifdef __SYCL_DEVICE_ONLY__
69 return __clc_BarrierArriveAndDrop(&state);
71 throw runtime_error(
"Barrier is not supported on host device.",
72 PI_ERROR_INVALID_DEVICE);
77 #ifdef __SYCL_DEVICE_ONLY__
78 return __clc_BarrierArriveNoComplete(&state, count);
81 throw runtime_error(
"Barrier is not supported on host device.",
82 PI_ERROR_INVALID_DEVICE);
87 #ifdef __SYCL_DEVICE_ONLY__
88 return __clc_BarrierArriveAndDropNoComplete(&state, count);
91 throw runtime_error(
"Barrier is not supported on host device.",
92 PI_ERROR_INVALID_DEVICE);
97 #ifdef __SYCL_DEVICE_ONLY__
98 __clc_BarrierCopyAsyncArrive(&state);
100 throw runtime_error(
"Barrier is not supported on host device.",
101 PI_ERROR_INVALID_DEVICE);
106 #ifdef __SYCL_DEVICE_ONLY__
107 __clc_BarrierCopyAsyncArriveNoInc(&state);
109 throw runtime_error(
"Barrier is not supported on host device.",
110 PI_ERROR_INVALID_DEVICE);
115 #ifdef __SYCL_DEVICE_ONLY__
116 __clc_BarrierWait(&state, arrival);
119 throw runtime_error(
"Barrier is not supported on host device.",
120 PI_ERROR_INVALID_DEVICE);
125 #ifdef __SYCL_DEVICE_ONLY__
126 return __clc_BarrierTestWait(&state, arrival);
129 throw runtime_error(
"Barrier is not supported on host device.",
130 PI_ERROR_INVALID_DEVICE);
135 #ifdef __SYCL_DEVICE_ONLY__
136 __clc_BarrierArriveAndWait(&state);
138 throw runtime_error(
"Barrier is not supported on host device.",
139 PI_ERROR_INVALID_DEVICE);
144 #pragma push_macro("max")
148 static constexpr uint64_t
max() {
return (1 << 20) - 1; }
149 #pragma pop_macro("max")
barrier(const barrier &other)=delete
barrier & operator=(const barrier &other)=delete
arrival_token arrive_and_drop_no_complete(int32_t count)
void arrive_copy_async_no_inc()
static constexpr uint64_t max()
arrival_token arrive_and_drop()
void initialize(uint32_t expected_count)
bool test_wait(arrival_token arrival)
barrier & operator=(barrier &&other) noexcept=delete
arrival_token arrive_no_complete(int32_t count)
void wait(arrival_token arrival)
barrier(barrier &&other) noexcept=delete
conditional< sizeof(long)==8, long, long long >::type int64_t
_Abi const simd< _Tp, _Abi > & noexcept