From: Daniel Arndt Date: Wed, 28 Dec 2022 21:43:55 +0000 (+0100) Subject: Use create_mirror_view_and_copy X-Git-Tag: v9.5.0-rc1~697^2~10 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca56ecbecef43a138b711f60487b515dbbc18fef;p=dealii.git Use create_mirror_view_and_copy --- diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 756b2d92b8..c18a97f302 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -405,13 +405,12 @@ namespace LinearAlgebra ::dealii::MemorySpace::Default::kokkos_space{}, indices); // Move the data to the device - Kokkos::View - V_dev("V_dev", n_elements); - Kokkos::deep_copy( - exec, - V_dev, - Kokkos::View(V.begin(), n_elements)); - exec.fence(); + Kokkos::View V_view(V.begin(), + n_elements); + Kokkos::View auto + V_dev = Kokkos::create_mirror_view_and_copy( + ::dealii::MemorySpace::Default::kokkos_space{}, V_view); // Set the values in tmp_vector Kokkos::parallel_for(