Skip to content

Commit

Permalink
fix error of cast between two non-generic address spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraPerego committed Sep 16, 2024
1 parent 3b2ef74 commit 9c5217e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/alpaka/atomic/AtomicGenericSycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ namespace alpaka
template<typename THierarchy, typename T, typename TOp>
inline auto callAtomicOp(T* const addr, TOp&& op)
{
if(auto ptr = get_global_ptr(addr); ptr != nullptr)
if(auto ptr = get_local_ptr(addr); ptr != nullptr)
{
auto ref = global_ref<T, THierarchy>{*addr};
auto ref = local_ref<T, THierarchy>{*addr};
return op(ref);
}
else
{
auto ref = local_ref<T, THierarchy>{*addr};
auto ref = global_ref<T, THierarchy>{*addr};
return op(ref);
}
}
Expand Down

0 comments on commit 9c5217e

Please sign in to comment.