From fffa86a26c70e8b50269a7e7cc2fe9fed9471bdf Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 1 Dec 2022 22:42:01 +0000 Subject: [PATCH] Remove Policy --- include/deal.II/lac/la_parallel_vector.h | 98 ++---------------------- 1 file changed, 5 insertions(+), 93 deletions(-) diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index a4fb949a74..ecf934145a 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -1438,92 +1438,6 @@ namespace LinearAlgebra #ifndef DOXYGEN - namespace internal - { - template - struct Policy - { - static inline typename Vector::iterator - begin(::dealii::MemorySpace::MemorySpaceData &) - { - return nullptr; - } - - static inline typename Vector::const_iterator - begin( - const ::dealii::MemorySpace::MemorySpaceData &) - { - return nullptr; - } - - static inline Number * - get_values( - ::dealii::MemorySpace::MemorySpaceData &) - { - return nullptr; - } - }; - - - - template - struct Policy - { - static inline - typename Vector::iterator - begin(::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - - static inline - typename Vector::const_iterator - begin(const ::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - - static inline Number * - get_values(::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - }; - - - - template - struct Policy - { - static inline - typename Vector::iterator - begin(::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - - static inline - typename Vector::const_iterator - begin(const ::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - - static inline Number * - get_values(::dealii::MemorySpace:: - MemorySpaceData &data) - { - return data.values.data(); - } - }; - } // namespace internal - - template inline bool Vector::has_ghost_elements() const @@ -1588,7 +1502,7 @@ namespace LinearAlgebra inline typename Vector::iterator Vector::begin() { - return internal::Policy::begin(data); + return data.values.data(); } @@ -1597,7 +1511,7 @@ namespace LinearAlgebra inline typename Vector::const_iterator Vector::begin() const { - return internal::Policy::begin(data); + return data.values.data(); } @@ -1606,8 +1520,7 @@ namespace LinearAlgebra inline typename Vector::iterator Vector::end() { - return internal::Policy::begin(data) + - partitioner->locally_owned_size(); + return data.values.data() + partitioner->locally_owned_size(); } @@ -1616,8 +1529,7 @@ namespace LinearAlgebra inline typename Vector::const_iterator Vector::end() const { - return internal::Policy::begin(data) + - partitioner->locally_owned_size(); + return data.values.data() + partitioner->locally_owned_size(); } @@ -1744,7 +1656,7 @@ namespace LinearAlgebra inline Number * Vector::get_values() const { - return internal::Policy::get_values(data); + return data.values.data(); } -- 2.39.5