]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use subview
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 29 Dec 2022 16:09:00 +0000 (17:09 +0100)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 29 Dec 2022 16:09:00 +0000 (17:09 +0100)
include/deal.II/lac/la_parallel_vector.templates.h

index 331402a4e68df087837fdf854b496db7bba22784..da25f9a5b6d7fb9175e7bfd5a177a91e5f41abd5 100644 (file)
@@ -438,9 +438,9 @@ namespace LinearAlgebra
             });
           host_exec.fence();
           Kokkos::realloc(indices_dev, tmp_n_elements);
-          Kokkos::deep_copy(indices_dev,
-                            Kokkos::View<size_type *>(indices.data(),
-                                                      tmp_n_elements));
+          Kokkos::deep_copy(
+            indices_dev,
+            Kokkos::subview(indices, Kokkos::make_pair(0, tmp_n_elements)));
 
           if (operation == VectorOperation::add)
             Kokkos::parallel_for(

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.