alpaka
Abstraction Library for Parallel Kernel Acceleration
AtomicCpu.hpp
Go to the documentation of this file.
1
/* Copyright 2024 Andrea Bocci, Felice Pantaleo
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/core/BoostPredef.hpp
"
8
9
// clang 9/10/11 together with nvcc<11.6.0 as host compiler fails at compile time when using boost::atomic_ref
10
#ifdef BOOST_COMP_CLANG_AVAILABLE
11
# if(BOOST_COMP_CLANG < BOOST_VERSION_NUMBER(12, 0, 0) && BOOST_COMP_NVCC \
12
&& BOOST_COMP_NVCC < BOOST_VERSION_NUMBER(11, 6, 0))
13
# if !defined(ALPAKA_DISABLE_ATOMIC_ATOMICREF)
14
# define ALPAKA_DISABLE_ATOMIC_ATOMICREF
15
# endif
16
# endif
17
#endif
// BOOST_COMP_CLANG_AVAILABLE
18
19
#include "
alpaka/atomic/AtomicAtomicRef.hpp
"
20
#include "
alpaka/atomic/AtomicStdLibLock.hpp
"
21
22
namespace
alpaka
23
{
24
#ifndef ALPAKA_DISABLE_ATOMIC_ATOMICREF
25
using
AtomicCpu
=
AtomicAtomicRef
;
26
#else
27
using
AtomicCpu
= AtomicStdLibLock<16>;
28
#endif
// ALPAKA_DISABLE_ATOMIC_ATOMICREF
29
30
}
// namespace alpaka
AtomicAtomicRef.hpp
AtomicStdLibLock.hpp
BoostPredef.hpp
alpaka::AtomicAtomicRef
The atomic ops based on atomic_ref for CPU accelerators.
Definition:
AtomicAtomicRef.hpp:38
alpaka
The alpaka accelerator library.
Definition:
AccCpuOmp2Blocks.hpp:49
include
alpaka
atomic
AtomicCpu.hpp
Generated on Thu Nov 21 2024 22:46:14 for alpaka by
1.9.1