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:40
alpaka
The alpaka accelerator library.
Definition
AccCpuOmp2Blocks.hpp:49
alpaka::atomicOp
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto atomicOp(TAtomic const &atomic, T *const addr, T const &value, THierarchy const &=THierarchy()) -> T
Executes the given operation atomically.
Definition
Traits.hpp:73
include
alpaka
atomic
AtomicNoOp.hpp
Generated on Tue Feb 4 2025 09:02:23 for alpaka by
1.9.8