]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't use static variables in tests 14763/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 7 Feb 2023 02:40:44 +0000 (21:40 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 7 Feb 2023 02:40:44 +0000 (21:40 -0500)
tests/lac/parallel_vector_22.cc
tests/lac/parallel_vector_23.cc

index cfde38daf6b4621555fe6de7bafa9b36f0d1b392..0e2a3bac577317ab1b7ba1ee7fa663690882fd4c 100644 (file)
@@ -31,7 +31,7 @@ template <typename Number>
 double
 print_value(Number *values_dev, unsigned int index)
 {
-  static Kokkos::View<Number, Kokkos::HostSpace> cpu_value("cpu_value");
+  Kokkos::View<Number, Kokkos::HostSpace> cpu_value("cpu_value");
   Kokkos::deep_copy(cpu_value, Kokkos::View<Number>(values_dev + index));
   return cpu_value();
 }
index 064e50e71256d520196408fca644995eb5ccbc5d..001c650914c37ebaa0b63ce68fb5363cb8df4876 100644 (file)
@@ -32,7 +32,7 @@ template <typename Number>
 double
 print_value(Number *values_dev, unsigned int index)
 {
-  static Kokkos::View<Number, Kokkos::HostSpace> cpu_value("cpu_value");
+  Kokkos::View<Number, Kokkos::HostSpace> cpu_value("cpu_value");
   Kokkos::deep_copy(cpu_value, Kokkos::View<Number>(values_dev + index));
   return cpu_value();
 }

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.