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
9namespace 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
21 {
22 };
23
25 {
26 };
27
29 {
30 };
31
33 {
34 };
35
37 {
38 };
39
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
static constexpr SeqCst seq_cst
static constexpr Acquire acquire
static constexpr Relaxed relaxed
static constexpr AcqRel acq_rel
static constexpr Release release
The alpaka accelerator library.