alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
memFence.hpp
Go to the documentation of this file.
1/* Copyright 2025 Mehmet Yusufoglu, René Widera
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
11
12#include <type_traits>
13
14namespace alpaka::onAcc
15{
16 // Main entry point for thread fences
17 // The forwarder as a free function, forwarding to the internalCompute namespace
18 constexpr void memFence(auto const& acc, concepts::Scope auto const scope, concepts::MemoryOrder auto const order)
19 {
20 // All specialisations are in internalCompute namespace. Dispatching to the appropriate backend.
21 internalCompute::MemoryFence::Op<ALPAKA_TYPEOF(acc.getApi()), ALPAKA_TYPEOF(scope), ALPAKA_TYPEOF(order)>{}(
22 acc,
23 scope,
24 order);
25 }
26} // namespace alpaka::onAcc
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Definition common.hpp:154
functionality which is usable on the accelerator compute device from within a kernel.
Definition executor.hpp:38
constexpr void memFence(auto const &acc, concepts::Scope auto const scope, concepts::MemoryOrder auto const order)
Definition memFence.hpp:18