CPU memory
Typedefs
-
using ext1d_t = Kokkos::dextents<int, 1>
-
using ext2d_t = Kokkos::dextents<int, 2>
-
using ext3d_t = Kokkos::dextents<int, 3>
-
using cpu_memview_policy = cpu_mdspan_impl
Variables
-
constexpr auto dyn = Kokkos::dynamic_extent
-
class cpu_mdspan_impl
- #include <cpu_memory.hpp>
CPU mdspan memory view policy.
It defines the policy to allocate/deallocate arrays and create Kokkos mdspan objects.
Public Static Functions
-
static inline mdspan_1d_double memview(double *data, int nlevs)
Create a 1D mdspan object from double pointer.
If a NULL pointer is provided, an empty mdspan is created (size 0)
-
static inline mdspan_2d_double memview(double *data, int nblocks, int nproma)
Create a 2D mdspan object from double pointer.
If a NULL pointer is provided, an empty mdspan is created (size 0)
-
static inline mdspan_3d_double memview(double *data, int nblocks, int nlevs, int nproma)
Create a 3D mdspan object from double pointer.
If a NULL pointer is provided, an empty mdspan is created (size 0)
-
static inline mdspan_2d_int memview(int *data, int nblocks, int nproma)
Create a 2D mdspan object from int pointer.
If a NULL pointer is provided, an empty mdspan is created (size 0)
-
static inline mdspan_3d_int memview(int *data, int nblocks, int nlevs, int nproma)
Create a 3D mdspan object from int pointer.
If a NULL pointer is provided, an empty mdspan is created (size 0)
-
static inline mdspan_1d_double memview_malloc(double *field, int dim1)
Allocate memory and create a 1D mdspan object from double pointer.
-
static inline mdspan_2d_double memview_malloc(double *field, int dim1, int dim2)
Allocate memory and create a 2D mdspan object from double pointer.
-
static inline mdspan_3d_double memview_malloc(double *field, int dim1, int dim2, int dim3)
Allocate memory and create a 3D mdspan object from double pointer.
-
static inline mdspan_1d_int memview_malloc(int *field, int dim1)
Allocate memory and create a 1D mdspan object from int pointer.
-
static inline mdspan_2d_int memview_malloc(int *field, int dim1, int dim2)
Allocate memory and create a 2D mdspan object from int pointer.
-
static inline mdspan_3d_int memview_malloc(int *field, int dim1, int dim2, int dim3)
Allocate memory and create a 3D mdspan object from int pointer.
-
static inline void memview_free(double *field)
Free memory from double pointer.
-
static inline void memview_free(int *field)
Free memory from int pointer.
-
static inline mdspan_1d_double memview(double *data, int nlevs)