diff --git a/MParT/Utilities/ArrayConversions.h b/MParT/Utilities/ArrayConversions.h index 307196c4..1032016f 100644 --- a/MParT/Utilities/ArrayConversions.h +++ b/MParT/Utilities/ArrayConversions.h @@ -226,14 +226,14 @@ namespace mpart{ @param[in] inview A kokkos array in device memory. @return A kokkos array in host memory. Note that the layout (row-major or col-major) might be different than the default on the Host. The layout will match the device's default layout. */ - template - typename Kokkos::View::HostMirror ToHost(Kokkos::View const& inview){ - typename Kokkos::View::HostMirror outview = Kokkos::create_mirror_view(inview); + template + typename Kokkos::View::HostMirror ToHost(Kokkos::View const& inview){ + typename Kokkos::View::HostMirror outview = Kokkos::create_mirror_view(inview); Kokkos::deep_copy (outview, inview); return outview; } - template + template StridedMatrix ToHost(StridedMatrix const& inview){ typename StridedMatrix::HostMirror outview = Kokkos::create_mirror_view(inview); Kokkos::deep_copy (outview, inview); diff --git a/tests/Test_LinearAlgebra.cpp b/tests/Test_LinearAlgebra.cpp index 05b854c5..3067dfa9 100644 --- a/tests/Test_LinearAlgebra.cpp +++ b/tests/Test_LinearAlgebra.cpp @@ -390,7 +390,7 @@ TEST_CASE( "Testing LU Factorization on Device", "LinearAlgebra_LUDevice" ) { } SECTION("Solve LU out of place") { PartialPivLU Alu_d(constA_d); - auto C_d = Alu.solve(B_d); + auto C_d = Alu_d.solve(B_d); auto C_h = ToHost(C_d); for(unsigned int j=0; j constA_h = A; auto constA_d = ToDevice(constA_h); - auto B_d = ToDevice(B); + auto B_d = ToDevice(B_h); auto eigA = ConstKokkosToMat(constA_h); - auto eigB = KokkosToMat(B); + auto eigB = KokkosToMat(B_h); Eigen::MatrixXd eigX = eigA.llt().solve(eigB); Eigen::MatrixXd eigY = eigA.llt().matrixL().solve(eigB); @@ -452,7 +452,7 @@ TEST_CASE( "Testing Cholesky Factorization", "LinearAlgebra_Cholesky" ) { } SECTION("Solve Cholesky out of place") { Cholesky Achol_d(constA_d); - auto C_d = Achol.solve(B_d); + auto C_d = Achol_d.solve(B_d); auto C_h = ToHost(C_d); for(unsigned int j=0; j