Skip to content

Commit

Permalink
Don’t use ldg_ptr in simple_ptr_holder as it breaks sid::as_const on …
Browse files Browse the repository at this point in the history
…C arrays
  • Loading branch information
fthaler committed Oct 30, 2024
1 parent 6cd93db commit 9e13ddf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/gridtools/sid/simple_ptr_holder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "../common/defs.hpp"
#include "../common/host_device.hpp"
#include "../common/ldg_ptr.hpp"

#define GT_FILENAME <gridtools/sid/simple_ptr_holder.hpp>
#include GT_ITERATE_ON_TARGETS()
Expand All @@ -39,7 +38,7 @@ namespace gridtools {
simple_ptr_holder() = default;
GT_TARGET GT_FORCE_INLINE constexpr simple_ptr_holder(T const &ptr) : m_val{ptr} {}
#endif
GT_TARGET GT_FORCE_INLINE constexpr decltype(auto) operator()() const { return as_ldg_ptr(m_val); }
GT_TARGET GT_FORCE_INLINE constexpr T const &operator()() const { return m_val; }
};

template <class T>
Expand Down

0 comments on commit 9e13ddf

Please sign in to comment.