From c6ee68872c88407800229b77a2225b2790033fc6 Mon Sep 17 00:00:00 2001 From: Incardona Pietro <incardon@mpi-cbg.de> Date: Fri, 25 Feb 2022 14:28:28 +0100 Subject: [PATCH] Fixing SparseGridGPU serialization --- src/SparseGridGpu/SparseGridGpu.hpp | 8 +++++++- src/Vector/map_vector_std.hpp | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/SparseGridGpu/SparseGridGpu.hpp b/src/SparseGridGpu/SparseGridGpu.hpp index f50c4c39..9c6a23db 100644 --- a/src/SparseGridGpu/SparseGridGpu.hpp +++ b/src/SparseGridGpu/SparseGridGpu.hpp @@ -2829,7 +2829,13 @@ public: //Functions to check if the packing object is complex static bool pack() { - return false; + return true; + } + + //Functions to check if the packing object is complex + static bool packRequest() + { + return true; } /*! \brief Asking to pack a SparseGrid GPU without GPU context pack the grid on CPU and host memory diff --git a/src/Vector/map_vector_std.hpp b/src/Vector/map_vector_std.hpp index 2d4a875f..2cf717e2 100644 --- a/src/Vector/map_vector_std.hpp +++ b/src/Vector/map_vector_std.hpp @@ -1006,6 +1006,18 @@ public: return base_type::get(id); } + /*! \brief Get an element of the vector + * + * \param id element to get + * + * \return the element reference + * + */ + inline T & operator[](size_t id) + { + return base_type::get(id); + } + /*! \brief Get an element of the vector * * \param id element to get -- GitLab