alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
include
alpaka
onAcc
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
7
#include "
alpaka/core/common.hpp
"
8
#include "
alpaka/onAcc/internal/interface.hpp
"
9
#include "
alpaka/onAcc/memoryOrder.hpp
"
10
#include "
alpaka/onAcc/scope.hpp
"
11
12
#include <type_traits>
13
14
namespace
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
common.hpp
ALPAKA_TYPEOF
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Definition
common.hpp:154
alpaka::onAcc::concepts::MemoryOrder
Definition
memoryOrder.hpp:118
alpaka::onAcc::concepts::Scope
Definition
scope.hpp:99
alpaka::onAcc::order
Definition
memoryOrder.hpp:24
alpaka::onAcc::scope
Definition
scope.hpp:24
alpaka::onAcc
functionality which is usable on the accelerator compute device from within a kernel.
Definition
executor.hpp:38
alpaka::onAcc::memFence
constexpr void memFence(auto const &acc, concepts::Scope auto const scope, concepts::MemoryOrder auto const order)
Definition
memFence.hpp:18
interface.hpp
memoryOrder.hpp
scope.hpp
Generated on
for alpaka by
1.16.1