alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
MemoryOrder.hpp
Go to the documentation of this file.
1
/* Copyright 2025 Tapish Narwal
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include <concepts>
8
9
namespace
alpaka
10
{
11
namespace
mem_order
12
{
13
14
/**
15
* The user requested memory order may be converted to a stronger memory order guarantee if the backend does
16
* not support the requested memory ordering
17
* If the user requests a memory ordering which is stronger than what is possible, we throw an error statically
18
*/
19
20
struct
MemoryOrderTag
21
{
22
};
23
24
struct
SeqCst
:
MemoryOrderTag
25
{
26
};
27
28
struct
AcqRel
:
MemoryOrderTag
29
{
30
};
31
32
struct
Release
:
MemoryOrderTag
33
{
34
};
35
36
struct
Acquire
:
MemoryOrderTag
37
{
38
};
39
40
struct
Relaxed
:
MemoryOrderTag
41
{
42
};
43
44
static
constexpr
SeqCst
seq_cst
;
45
static
constexpr
AcqRel
acq_rel
;
46
static
constexpr
Release
release
;
47
static
constexpr
Acquire
acquire
;
48
static
constexpr
Relaxed
relaxed
;
49
50
}
// namespace mem_order
51
52
template
<
typename
T>
53
concept
MemoryOrder
= std::derived_from<T, mem_order::MemoryOrderTag>;
54
55
}
// namespace alpaka
alpaka::MemoryOrder
Definition
MemoryOrder.hpp:53
alpaka::mem_order::seq_cst
static constexpr SeqCst seq_cst
Definition
MemoryOrder.hpp:44
alpaka::mem_order::acquire
static constexpr Acquire acquire
Definition
MemoryOrder.hpp:47
alpaka::mem_order::relaxed
static constexpr Relaxed relaxed
Definition
MemoryOrder.hpp:48
alpaka::mem_order::acq_rel
static constexpr AcqRel acq_rel
Definition
MemoryOrder.hpp:45
alpaka::mem_order::release
static constexpr Release release
Definition
MemoryOrder.hpp:46
alpaka
The alpaka accelerator library.
Definition
AccCpuOmp2Blocks.hpp:52
alpaka::mem_order::AcqRel
Definition
MemoryOrder.hpp:29
alpaka::mem_order::Acquire
Definition
MemoryOrder.hpp:37
alpaka::mem_order::MemoryOrderTag
Definition
MemoryOrder.hpp:21
alpaka::mem_order::Relaxed
Definition
MemoryOrder.hpp:41
alpaka::mem_order::Release
Definition
MemoryOrder.hpp:33
alpaka::mem_order::SeqCst
Definition
MemoryOrder.hpp:25
include
alpaka
mem
order
MemoryOrder.hpp
Generated on Fri Mar 13 2026 06:24:56 for alpaka by
1.9.8