Skip to content

Commit

Permalink
omp: omptarget/atomic_helper: add atomic_read for complex<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy committed Nov 5, 2024
1 parent 8794c0d commit d351388
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/targets/omptarget/atomic_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ namespace quda
return v;
}
template <typename T>
inline complex<T> atomic_read(complex<T> &x)
{
complex<T> v (atomic_read(x.x), atomic_read(x.y));
return v;
}
template <typename T>
inline deviation_t<T> atomic_read(deviation_t<T> &x)
{
deviation_t<T> v;
Expand Down

0 comments on commit d351388

Please sign in to comment.