From 04f321db8581a2b29a1d5766c70ed98b5011e164 Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Thu, 30 Jun 2016 16:32:52 +0100 Subject: [PATCH] Replace cudaDeviceSyncronise with Kokkos::fence() function --- KOKKOSStream.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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)