Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: storage/gpu.h functions within __CUDA_ARCH__ #1778

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/gridtools/storage/gpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace gridtools {
T *m_ptr;
Info m_info;

#if defined(GT_CUDA_ARCH) or (defined(GT_CUDACC) and defined(__clang__))
#ifdef GT_CUDACC
GT_FUNCTION_DEVICE auto *data() const { return m_ptr; }
GT_FUNCTION_DEVICE auto const &info() const { return m_info; }

Expand All @@ -53,7 +53,6 @@ namespace gridtools {
GT_FUNCTION_DEVICE decltype(auto) strides() const { return m_info.strides(); }
GT_FUNCTION_DEVICE decltype(auto) native_lengths() const { return m_info.native_lengths(); }
GT_FUNCTION_DEVICE decltype(auto) native_strides() const { return m_info.native_strides(); }

template <class... Args>
GT_FUNCTION_DEVICE auto operator()(Args &&...args) const
-> decltype(m_ptr[m_info.index(std::forward<Args>(args)...)]) {
Expand Down
Loading