1 // Copyright(C) 2020, 2021 National Technology & Engineering Solutions 2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with 3 // NTESS, the U.S. Government retains certain rights in this software. 4 // 5 // See packages/seacas/LICENSE for details 6 7 #pragma once 8 #include <Ioss_CodeTypes.h> 9 #include <cstdlib> 10 #include <vector> 11 12 struct DataPool 13 { 14 // Data space shared by most field input/output routines... 15 std::vector<char> data; 16 std::vector<int> data_int; 17 std::vector<int64_t> data_int64; 18 std::vector<double> data_double; 19 std::vector<Complex> data_complex; 20 #ifdef SEACAS_HAVE_KOKKOS 21 Kokkos::View<char *> data_view_char; 22 Kokkos::View<int *> data_view_int; 23 Kokkos::View<int64_t *> data_view_int64; 24 Kokkos::View<double *> data_view_double; 25 // Kokkos::View<Kokkos_Complex *> data_view_complex cannot be a global variable, 26 // Since Kokkos::initialize() has not yet been called. Also, a Kokkos:View cannot 27 // have type std::complex entities. 28 Kokkos::View<char **> data_view_2D_char; 29 Kokkos::View<int **> data_view_2D_int; 30 Kokkos::View<int64_t **> data_view_2D_int64; 31 Kokkos::View<double **> data_view_2D_double; 32 // Kokkos::View<Kokkos_Complex **> data_view_2D_complex cannot be a global variable, 33 // Since Kokkos::initialize() has not yet been called. Also, a Kokkos:View cannot 34 // have type std::complex entities. 35 Kokkos::View<char **, Kokkos::LayoutRight, Kokkos::HostSpace> data_view_2D_char_layout_space; 36 Kokkos::View<int **, Kokkos::LayoutRight, Kokkos::HostSpace> data_view_2D_int_layout_space; 37 Kokkos::View<int64_t **, Kokkos::LayoutRight, Kokkos::HostSpace> data_view_2D_int64_layout_space; 38 Kokkos::View<double **, Kokkos::LayoutRight, Kokkos::HostSpace> data_view_2D_double_layout_space; 39 // Kokkos::View<Kokkos_Complex **, Kokkos::LayoutRight, Kokkos::HostSpace> 40 // data_view_2D_complex_layout_space cannot be a global variable, 41 // Since Kokkos::initialize() has not yet been called. Also, a Kokkos:View cannot 42 // have type std::complex entities. 43 #endif 44 }; 45