preCICE
Loading...
Searching...
No Matches
KokkosTypes.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Kokkos_Core.hpp>
4#include <cstdint>
5
6namespace precice::mapping {
7
8// Alias definitions
9
10using ExecutionSpace = Kokkos::DefaultExecutionSpace;
11using UnmanagedMemory = Kokkos::MemoryTraits<Kokkos::Unmanaged>;
12
13using offset_1d_type = ExecutionSpace::size_type;
14using offset_2d_type = ExecutionSpace::size_type;
15
16// For the meshes, we keep the last index contiguous in memory, PUM has anyway random access
17// in the global vectors
18template <typename MemorySpace = ExecutionSpace>
19using MeshView = Kokkos::View<double **, Kokkos::LayoutRight, MemorySpace>;
20
21// For all global data structures we store
22template <typename MemorySpace = ExecutionSpace>
23using VectorView = Kokkos::View<double *, MemorySpace>;
24
25template <typename MemorySpace = ExecutionSpace>
26using PivotView = Kokkos::View<int *, MemorySpace>;
27
28// The VertexIDs mapping the cluster vertices to global IDs
29template <typename MemorySpace = ExecutionSpace>
30using GlobalIDView = Kokkos::View<VertexID *, MemorySpace>;
31
32// Offsets for the flat views for 1D data (essentially for double **, where the last * is for the batches)
33template <typename MemorySpace = ExecutionSpace>
34using VectorOffsetView = Kokkos::View<offset_1d_type *, MemorySpace>;
35
36// Offsets for the flat views for 2D data (essentially for double ***, where the last * is for the batches)
37template <typename MemorySpace = ExecutionSpace>
38using MatrixOffsetView = Kokkos::View<offset_2d_type *, MemorySpace>;
39} // namespace precice::mapping
contains data mapping from points to meshes.
ExecutionSpace::size_type offset_2d_type
Kokkos::DefaultExecutionSpace ExecutionSpace
Kokkos::View< int *, MemorySpace > PivotView
Kokkos::View< offset_2d_type *, MemorySpace > MatrixOffsetView
Kokkos::View< offset_1d_type *, MemorySpace > VectorOffsetView
Kokkos::MemoryTraits< Kokkos::Unmanaged > UnmanagedMemory
Kokkos::View< VertexID *, MemorySpace > GlobalIDView
ExecutionSpace::size_type offset_1d_type
Kokkos::View< double *, MemorySpace > VectorView
Kokkos::View< double **, Kokkos::LayoutRight, MemorySpace > MeshView