10 #ifndef KOKKOS_ATOMIC_MP_VECTOR_HPP
11 #define KOKKOS_ATOMIC_MP_VECTOR_HPP
14 #include "Kokkos_Core.hpp"
22 template <
typename Storage>
23 KOKKOS_INLINE_FUNCTION
29 typedef typename Storage::volatile_pointer pointer;
30 pointer dest_c = dest->coeff();
31 const ordinal_type sz = dest->size();
32 if (src.hasFastAccess(sz))
33 for (ordinal_type i=0; i<sz; ++i)
34 atomic_exchange(dest_c+i, src.fastAccessCoeff(i));
36 for (ordinal_type i=0; i<sz; ++i)
37 atomic_exchange(dest_c+i, src.coeff(i));
40 template <
typename Storage>
41 KOKKOS_INLINE_FUNCTION
47 typedef typename Storage::volatile_pointer pointer;
48 pointer dest_c = dest->coeff();
49 const ordinal_type sz = dest->size();
50 if (src.hasFastAccess(sz))
51 for (ordinal_type i=0; i<sz; ++i)
54 for (ordinal_type i=0; i<sz; ++i)
KOKKOS_INLINE_FUNCTION void atomic_add(volatile Sacado::UQ::PCE< Storage > *const dest, const Sacado::UQ::PCE< Storage > &src)
KOKKOS_INLINE_FUNCTION void atomic_assign(volatile Sacado::UQ::PCE< Storage > *const dest, const Sacado::UQ::PCE< Storage > &src)