42#ifndef KOKKOS_ATOMIC_UQ_ATOMIC_HPP
43#define KOKKOS_ATOMIC_UQ_ATOMIC_HPP
46#include "Kokkos_Core.hpp"
54template <
typename Storage>
60 typedef typename Storage::ordinal_type ordinal_type;
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));
72template <
typename Storage>
78 typedef typename Storage::ordinal_type ordinal_type;
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)