alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
AtomicNoOp.hpp
Go to the documentation of this file.
1
/* Copyright 2022 Axel Huebl, Benjamin Worpitz, Matthias Werner, René Widera, Jan Stephan, Bernhard Manfred Gruber
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/atomic/Traits.hpp
"
8
9
namespace
alpaka
10
{
11
//! The NoOp atomic ops.
12
class
AtomicNoOp
13
{
14
};
15
16
namespace
trait
17
{
18
//! The NoOp atomic operation.
19
template
<
typename
TOp,
typename
T,
typename
THierarchy>
20
struct
AtomicOp
<TOp,
AtomicNoOp
, T, THierarchy>
21
{
22
ALPAKA_FN_HOST
static
auto
atomicOp
(
AtomicNoOp
const
&
/* atomic */
, T*
const
addr, T
const
& value) -> T
23
{
24
return
TOp()(addr, value);
25
}
26
27
ALPAKA_FN_HOST
static
auto
atomicOp
(
28
AtomicNoOp
const
&
/* atomic */
,
29
T*
const
addr,
30
T
const
& compare,
31
T
const
& value) -> T
32
{
33
return
TOp()(addr, compare, value);
34
}
35
};
36
}
// namespace trait
37
}
// namespace alpaka
Traits.hpp
alpaka::AtomicNoOp
The NoOp atomic ops.
Definition
AtomicNoOp.hpp:13
ALPAKA_FN_HOST
#define ALPAKA_FN_HOST
Definition
Common.hpp:43
alpaka
The alpaka accelerator library.
Definition
AccCpuOmp2Blocks.hpp:52
alpaka::trait::AtomicOp< TOp, AtomicNoOp, T, THierarchy >::atomicOp
static ALPAKA_FN_HOST auto atomicOp(AtomicNoOp const &, T *const addr, T const &value) -> T
Definition
AtomicNoOp.hpp:22
alpaka::trait::AtomicOp< TOp, AtomicNoOp, T, THierarchy >::atomicOp
static ALPAKA_FN_HOST auto atomicOp(AtomicNoOp const &, T *const addr, T const &compare, T const &value) -> T
Definition
AtomicNoOp.hpp:27
alpaka::trait::AtomicOp
The atomic operation trait.
Definition
Traits.hpp:60
include
alpaka
atomic
AtomicNoOp.hpp
Generated on Tue Sep 22 2026 12:51:57 for alpaka by
1.12.0