From 02a569539fe9e50180e9760d4df0f856a4bf9238 Mon Sep 17 00:00:00 2001 From: "Yu-Hsiang M. Tsai" Date: Thu, 6 Mar 2025 15:46:01 +0100 Subject: [PATCH] fix the mismatch type of VectorCache and index_map --- core/distributed/index_map.cpp | 2 +- include/ginkgo/core/distributed/index_map.hpp | 3 ++- include/ginkgo/core/distributed/vector_cache.hpp | 5 +++-- include/ginkgo/core/matrix/dense.hpp | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/distributed/index_map.cpp b/core/distributed/index_map.cpp index edd1a3cc3cb..e83556b1489 100644 --- a/core/distributed/index_map.cpp +++ b/core/distributed/index_map.cpp @@ -192,7 +192,7 @@ index_map::index_map( } -#define GKO_DECLARE_INDEX_MAP(_ltype, _gtype) struct index_map<_ltype, _gtype> +#define GKO_DECLARE_INDEX_MAP(_ltype, _gtype) class index_map<_ltype, _gtype> GKO_INSTANTIATE_FOR_EACH_LOCAL_GLOBAL_INDEX_TYPE(GKO_DECLARE_INDEX_MAP); diff --git a/include/ginkgo/core/distributed/index_map.hpp b/include/ginkgo/core/distributed/index_map.hpp index c8c402b9038..09037d303a3 100644 --- a/include/ginkgo/core/distributed/index_map.hpp +++ b/include/ginkgo/core/distributed/index_map.hpp @@ -65,7 +65,8 @@ enum class index_space { * \tparam GlobalIndexType type for global indices */ template -struct index_map { +class index_map { +public: using partition_type = Partition; /** diff --git a/include/ginkgo/core/distributed/vector_cache.hpp b/include/ginkgo/core/distributed/vector_cache.hpp index ea7ef6afa4e..61ce22afe25 100644 --- a/include/ginkgo/core/distributed/vector_cache.hpp +++ b/include/ginkgo/core/distributed/vector_cache.hpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors +// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors // // SPDX-License-Identifier: BSD-3-Clause @@ -33,7 +33,8 @@ namespace detail { * not be copied when the outer object gets copied. */ template -struct VectorCache { +class VectorCache { +public: VectorCache() = default; ~VectorCache() = default; VectorCache(const VectorCache&) {} diff --git a/include/ginkgo/core/matrix/dense.hpp b/include/ginkgo/core/matrix/dense.hpp index 9e19109e82a..bac812b3408 100644 --- a/include/ginkgo/core/matrix/dense.hpp +++ b/include/ginkgo/core/matrix/dense.hpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors +// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors // // SPDX-License-Identifier: BSD-3-Clause