alpaka
Abstraction Library for Parallel Kernel Acceleration
AtomicHierarchy.hpp
Go to the documentation of this file.
1
/* Copyright 2020 Benjamin Worpitz, René Widera, Bernhard Manfred Gruber
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include "
alpaka/atomic/Traits.hpp
"
8
#include "
alpaka/meta/InheritFromList.hpp
"
9
#include "
alpaka/meta/Unique.hpp
"
10
11
#include <tuple>
12
13
namespace
alpaka
14
{
15
//! build a single class to inherit from different atomic implementations
16
//
17
// This implementation inherit from all three hierarchies.
18
// The multiple usage of the same type for different levels is allowed.
19
// The class provide the feature that each atomic operation can be focused
20
// to a hierarchy level in alpaka. A operation to a hierarchy is independent
21
// to the memory hierarchy.
22
//
23
// \tparam TGridAtomic atomic implementation for atomic operations between grids within a device
24
// \tparam TBlockAtomic atomic implementation for atomic operations between blocks within a grid
25
// \tparam TThreadAtomic atomic implementation for atomic operations between threads within a block
26
template
<
typename
TGr
id
Atomic,
typename
TBlockAtomic,
typename
TThreadAtomic>
27
using
AtomicHierarchy
=
alpaka::meta::InheritFromList
<
alpaka::meta::Unique
<std::tuple<
28
TGridAtomic,
29
TBlockAtomic,
30
TThreadAtomic,
31
interface::Implements<ConceptAtomicGrids, TGridAtomic>
,
32
interface::Implements<ConceptAtomicBlocks, TBlockAtomic>
,
33
interface::Implements<ConceptAtomicThreads, TThreadAtomic>
>>>;
34
}
// namespace alpaka
InheritFromList.hpp
Unique.hpp
Traits.hpp
alpaka::meta::InheritFromList
Definition:
InheritFromList.hpp:10
alpaka::meta::Unique
typename detail::UniqueImpl< TList >::type Unique
Trait that returns a list with only unique (no equal) types (a set). Duplicates will be filtered out.
Definition:
Unique.hpp:40
alpaka
The alpaka accelerator library.
Definition:
AccCpuOmp2Blocks.hpp:49
alpaka::interface::Implements
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
Definition:
Interface.hpp:15
include
alpaka
atomic
AtomicHierarchy.hpp
Generated on Thu Nov 21 2024 22:46:14 for alpaka by
1.9.1