Gyselalib++
 
Loading...
Searching...
No Matches
ddc_aliases.hpp
1// SPDX-License-Identifier: MIT
2#pragma once
3
4#include <ddc/ddc.hpp>
5
15template <class... Dims>
16using Coord = ddc::Coordinate<Dims...>;
17
19template <class... GridTypes>
20using Idx = ddc::DiscreteElement<GridTypes...>;
21
23template <class... GridTypes>
24using IdxStep = ddc::DiscreteVector<GridTypes...>;
25
27template <class... GridTypes>
28using IdxRange = ddc::DiscreteDomain<GridTypes...>;
29
31template <
32 class ElementType,
33 class IdxRange,
34 class MemSpace = Kokkos::DefaultExecutionSpace::memory_space>
35using FieldMem = ddc::Chunk<ElementType, IdxRange, ddc::KokkosAllocator<ElementType, MemSpace>>;
36
38template <class IdxRange, class MemSpace = Kokkos::DefaultExecutionSpace::memory_space>
39using DFieldMem = FieldMem<double, IdxRange, MemSpace>;
40
42template <
43 class ElementType,
44 class IdxRange,
45 class MemorySpace = Kokkos::DefaultExecutionSpace::memory_space,
46 class LayoutStridedPolicy = Kokkos::layout_right>
47using Field = ddc::ChunkSpan<ElementType, IdxRange, LayoutStridedPolicy, MemorySpace>;
48
50template <
51 class IdxRange,
52 class MemorySpace = Kokkos::DefaultExecutionSpace::memory_space,
53 class LayoutStridedPolicy = Kokkos::layout_right>
54using DField = Field<double, IdxRange, MemorySpace, LayoutStridedPolicy>;
55
57template <
58 class ElementType,
59 class IdxRange,
60 class MemorySpace = Kokkos::DefaultExecutionSpace::memory_space,
61 class LayoutStridedPolicy = Kokkos::layout_right>
62using ConstField = ddc::ChunkView<ElementType, IdxRange, LayoutStridedPolicy, MemorySpace>;
63
65template <
66 class IdxRange,
67 class MemorySpace = Kokkos::DefaultExecutionSpace::memory_space,
68 class LayoutStridedPolicy = Kokkos::layout_right>
69using DConstField = ConstField<double, IdxRange, MemorySpace, LayoutStridedPolicy>;
70
72template <class GridType>
73using UniformGridBase = ddc::UniformPointSampling<GridType>;
74
76template <class GridType>
77using NonUniformGridBase = ddc::NonUniformPointSampling<GridType>;
78
80template <class ElementType, class... Dims>
81class Vector : public ddc::detail::TaggedVector<ElementType, Dims...>
82{
83public:
93 template <class... Params>
94 KOKKOS_FUNCTION Vector(Params... p) : ddc::detail::TaggedVector<ElementType, Dims...>(p...)
95 {
96 }
97};
98
100template <class... Dims>
101using DVector = Vector<double, Dims...>;
A type describing a vector e.g. (E_x, E_y)
Definition ddc_aliases.hpp:82
KOKKOS_FUNCTION Vector(Params... p)
A constructor for a Vector to build from individual elements: E.g.
Definition ddc_aliases.hpp:94