IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ViewTypes.h
Go to the documentation of this file.
1
//
2
// Struct ViewType
3
// Kokkos::Views of different dimensions.
4
//
5
#ifndef IPPL_VIEW_TYPES_H
6
#define IPPL_VIEW_TYPES_H
7
8
#include <Kokkos_Core.hpp>
9
10
namespace
ippl
{
17
namespace
detail {
24
template
<
typename
T,
int
N>
25
struct
NPtr
{
26
typedef
typename
NPtr
<T, N - 1>::type* type;
27
};
28
32
template
<
typename
T>
33
struct
NPtr
<T, 1> {
34
typedef
T* type;
35
};
36
43
template
<
typename
T,
unsigned
Dim,
class
... Properties>
44
struct
ViewType
{
45
typedef
Kokkos::View<typename NPtr<T, Dim>::type, Properties...> view_type;
46
};
47
48
template
<
typename
MemorySpace>
49
using
hash_type =
typename
detail::ViewType<int, 1, MemorySpace>::view_type;
50
}
// namespace detail
51
}
// namespace ippl
52
53
#endif
ippl
Definition
Archive.h:20
ippl::detail::NPtr
Definition
ViewTypes.h:25
ippl::detail::ViewType
Definition
ViewTypes.h:44
ippl-src
src
Types
ViewTypes.h
Generated by
1.9.8