File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -363,10 +363,11 @@ which is enqueued as dependent on user's one. The flag state is checked later
363
363
in host-task. This is achieved with approximately the following changes:
364
364
365
365
```c++
366
- #include <assert_happened.hpp> // contains extern decl of AssertHappenedMem
367
-
368
366
#ifndef NDEBUG
369
367
class AssertFlagCopier;
368
+ #ifdef __SYCL_DEVICE_ONLY__
369
+ int __devicelib_assert_read(void);
370
+ #endif
370
371
#endif
371
372
372
373
class queue {
@@ -389,7 +390,9 @@ class queue {
389
390
auto Acc = Buffer->get_access<access::mode::write>(CGH);
390
391
391
392
CGH.single_task<AssertFlagCopier>([=] {
392
- Acc[0].Flag = atomic_load(&AssertHappenedMem.Flag);
393
+ #ifdef __SYCL_DEVICE_ONLY__
394
+ Acc[0].Flag = __devicelib_assert_read();
395
+ #endif
393
396
});
394
397
});
395
398
You can’t perform that action at this time.
0 commit comments