]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a place incorrectly using std::is_trivial. 17935/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 18 Dec 2024 03:06:46 +0000 (20:06 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 18 Dec 2024 03:06:46 +0000 (20:06 -0700)
include/deal.II/base/partitioner.templates.h

index 1456185e435f66e847425aa210d70647ce02be03..e582618649a093bf0321a21fcf7f24b7e6a13d91 100644 (file)
@@ -777,21 +777,14 @@ namespace Utilities
               Kokkos::deep_copy(
                 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>(
                   ghost_array.data(), n_ghost_indices()),
-                0);
+                Number(0));
             }
           else
 #    endif
             {
-              if constexpr (std::is_trivial_v<Number>)
-                {
-                  std::memset(ghost_array.data(),
-                              0,
-                              sizeof(Number) * n_ghost_indices());
-                }
-              else
-                std::fill(ghost_array.data(),
-                          ghost_array.data() + n_ghost_indices(),
-                          0);
+              std::fill(ghost_array.data(),
+                        ghost_array.data() + n_ghost_indices(),
+                        Number(0));
             }
         }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.