9 #ifdef ALPAKA_ACC_SYCL_ENABLED
11 # include <sycl/sycl.hpp>
17 template<
typename TAlpakaMemScope>
23 struct SyclFenceProps<
alpaka::memory_scope::Block>
25 static constexpr
auto scope = sycl::memory_scope::work_group;
29 struct SyclFenceProps<
alpaka::memory_scope::Device>
31 static constexpr
auto scope = sycl::memory_scope::device;
35 struct SyclFenceProps<
alpaka::memory_scope::Grid>
37 static constexpr
auto scope = sycl::memory_scope::device;
42 class MemFenceGenericSycl :
public interface::Implements<ConceptMemFence, MemFenceGenericSycl>
49 template<
typename TMemScope>
50 struct MemFence<MemFenceGenericSycl, TMemScope>
52 static auto mem_fence(MemFenceGenericSycl
const&, TMemScope
const&)
54 static constexpr
auto scope = alpaka::detail::SyclFenceProps<TMemScope>::scope;
55 sycl::atomic_fence(sycl::memory_order::acq_rel, scope);
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto mem_fence(TMemFence const &fence, TMemScope const &scope) -> void
Issues memory fence instructions.