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

Extend Trace mapping and allow GPU usage #503

Merged
merged 6 commits into from
May 24, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Workaround MSVC/NVCC not able to parse template syntax
  • Loading branch information
bernhardmgruber committed May 23, 2022
commit 7e5ab830f362da253502c9b453213f20cd1b1a26
4 changes: 4 additions & 0 deletions include/llama/View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,13 @@ namespace llama
return static_cast<const Mapping&>(*this);
}

#if !(defined(_MSC_VER) && defined(__NVCC__))
template<typename V>
auto operator()(llama::ArrayIndex<V, ArrayIndex::rank>) const
{
static_assert(!sizeof(V), "Passed ArrayIndex with SizeType different than Mapping::ArrayExtent");
}
#endif

/// Retrieves the \ref VirtualRecord at the given \ref ArrayIndex index.
LLAMA_FN_HOST_ACC_INLINE auto operator()(ArrayIndex ai) const -> decltype(auto)
Expand Down Expand Up @@ -451,11 +453,13 @@ namespace llama
return (*this)(ai);
}

#if !(defined(_MSC_VER) && defined(__NVCC__))
template<typename V>
auto operator[](llama::ArrayIndex<V, ArrayIndex::rank>) const
{
static_assert(!sizeof(V), "Passed ArrayIndex with SizeType different than Mapping::ArrayExtent");
}
#endif

/// Retrieves the \ref VirtualRecord at the 1D \ref ArrayIndex index constructed from the passed index.
LLAMA_FN_HOST_ACC_INLINE auto operator[](size_type index) const -> decltype(auto)
Expand Down