Replace cudaDeviceSyncronise with Kokkos::fence() function

This commit is contained in:
Tom Deakin 2016-06-30 16:32:52 +01:00
parent 8be4b26bb1
commit 04f321db85

View File

@ -74,7 +74,7 @@ void KOKKOSStream<T>::copy()
{ {
c[index] = a[index]; c[index] = a[index];
}); });
cudaDeviceSynchronize(); Kokkos::fence();
} }
template <class T> template <class T>
@ -89,7 +89,7 @@ void KOKKOSStream<T>::mul()
{ {
b[index] = scalar*c[index]; b[index] = scalar*c[index];
}); });
cudaDeviceSynchronize(); Kokkos::fence();
} }
template <class T> template <class T>
@ -103,8 +103,7 @@ void KOKKOSStream<T>::add()
{ {
c[index] = a[index] + b[index]; c[index] = a[index] + b[index];
}); });
Kokkos::fence();
cudaDeviceSynchronize();
} }
template <class T> template <class T>
@ -119,8 +118,7 @@ void KOKKOSStream<T>::triad()
{ {
a[index] = b[index] + scalar*c[index]; a[index] = b[index] + scalar*c[index];
}); });
Kokkos::fence();
cudaDeviceSynchronize();
} }
void listDevices(void) void listDevices(void)