42 #ifndef KOKKOS_ATOMIC_MP_VECTOR_HPP
43 #define KOKKOS_ATOMIC_MP_VECTOR_HPP
46 #include "Kokkos_Core.hpp"
54 template <
typename Storage>
55 KOKKOS_INLINE_FUNCTION
61 typedef typename Storage::volatile_pointer pointer;
62 pointer dest_c = dest->coeff();
63 const ordinal_type sz = dest->size();
64 if (src.hasFastAccess(sz))
65 for (ordinal_type i=0; i<sz; ++i)
66 atomic_exchange(dest_c+i, src.fastAccessCoeff(i));
68 for (ordinal_type i=0; i<sz; ++i)
69 atomic_exchange(dest_c+i, src.coeff(i));
72 template <
typename Storage>
73 KOKKOS_INLINE_FUNCTION
79 typedef typename Storage::volatile_pointer pointer;
80 pointer dest_c = dest->coeff();
81 const ordinal_type sz = dest->size();
82 if (src.hasFastAccess(sz))
83 for (ordinal_type i=0; i<sz; ++i)
86 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)