diff --git a/KOKKOSStream.cpp b/KOKKOSStream.cpp index a9bfcd9..d73f7d5 100644 --- a/KOKKOSStream.cpp +++ b/KOKKOSStream.cpp @@ -74,7 +74,7 @@ void KOKKOSStream::copy() { c[index] = a[index]; }); - cudaDeviceSynchronize(); + Kokkos::fence(); } template @@ -89,7 +89,7 @@ void KOKKOSStream::mul() { b[index] = scalar*c[index]; }); - cudaDeviceSynchronize(); + Kokkos::fence(); } template @@ -103,8 +103,7 @@ void KOKKOSStream::add() { c[index] = a[index] + b[index]; }); - - cudaDeviceSynchronize(); + Kokkos::fence(); } template @@ -119,8 +118,7 @@ void KOKKOSStream::triad() { a[index] = b[index] + scalar*c[index]; }); - - cudaDeviceSynchronize(); + Kokkos::fence(); } void listDevices(void)