10#ifdef ALPAKA_ACC_SYCL_ENABLED
12# include <sycl/sycl.hpp>
18 template<
typename TAlpakaMemScope>
24 struct SyclFenceProps<
alpaka::memory_scope::Block>
26 static constexpr auto scope = sycl::memory_scope::work_group;
30 struct SyclFenceProps<
alpaka::memory_scope::Device>
32 static constexpr auto scope = sycl::memory_scope::device;
36 struct SyclFenceProps<
alpaka::memory_scope::Grid>
38 static constexpr auto scope = sycl::memory_scope::device;
43 class MemFenceGenericSycl :
public interface::Implements<ConceptMemFence, MemFenceGenericSycl>
51 struct MemFenceDefaultOrder<MemFenceGenericSycl>
53 using type = mem_order::AcqRel;
57 template<MemoryOrder TMemOrder, MemoryScope TMemScope>
58 struct MemFence<MemFenceGenericSycl, TMemOrder, TMemScope>
60 static auto mem_fence(MemFenceGenericSycl
const&, TMemOrder order, TMemScope
const&)
62 static constexpr auto scope = alpaka::detail::SyclFenceProps<TMemScope>::scope;
63 sycl::atomic_fence(MemOrderSycl::get(order), scope);
static constexpr AcqRel acq_rel
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto mem_fence(TMemFence const &fence, TMemOrder order, TMemScope const &scope) -> void
Issues memory fence instructions.