Skip to content

Commit df1c443

Browse files
Swap branches in #ifndef
1 parent daeb87b commit df1c443

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sycl/include/sycl/detail/handler_proxy.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ namespace detail {
2020

2121
class AccessorBaseHost;
2222

23-
#ifndef __SYCL_DEVICE_ONLY__
24-
__SYCL_EXPORT void associateWithHandler(handler &, AccessorBaseHost *,
25-
access::target);
26-
#else
23+
#ifdef __SYCL_DEVICE_ONLY__
2724
// In device compilation accessor isn't inherited from AccessorBaseHost, so
2825
// can't detect by it. Since we don't expect it to be ever called in device
2926
// execution, just use blind void *.
3027
inline void associateWithHandler(handler &, void *, access::target) {}
28+
#else
29+
__SYCL_EXPORT void associateWithHandler(handler &, AccessorBaseHost *,
30+
access::target);
3131
#endif
3232
} // namespace detail
3333
} // namespace sycl

sycl/include/sycl/handler.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,14 @@ class __SYCL_EXPORT handler {
495495

496496
bool is_host() { return MIsHost; }
497497

498-
#ifndef __SYCL_DEVICE_ONLY__
499-
void associateWithHandler(detail::AccessorBaseHost *AccBase,
500-
access::target AccTarget);
501-
#else
498+
#ifdef __SYCL_DEVICE_ONLY__
502499
// In device compilation accessor isn't inherited from AccessorBaseHost, so
503500
// can't detect by it. Since we don't expect it to be ever called in device
504501
// execution, just use blind void *.
505502
void associateWithHandler(void *AccBase, access::target AccTarget);
503+
#else
504+
void associateWithHandler(detail::AccessorBaseHost *AccBase,
505+
access::target AccTarget);
506506
#endif
507507

508508
// Recursively calls itself until arguments pack is fully processed.

0 commit comments

Comments
 (0)