-
Notifications
You must be signed in to change notification settings - Fork 407
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
Enable accessing Kokkos::Array elements in constant expressions #4916
Enable accessing Kokkos::Array elements in constant expressions #4916
Conversation
9b9cac6
to
e7b58e9
Compare
Retest this please |
Retest this please. |
Looks like this makes lots of files warn under NVCC 11.6:
|
|
There are also a lot of |
I looked into that a little bit, and I think nvcc is being screwy. The preprocessed source doesn't declare |
|
||
//<editor-fold desc="String examination"> | ||
// returns the length of a given string | ||
KOKKOS_FUNCTION constexpr std::size_t strlen(const char *str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be declared inline
. Will fix.
Fix #4905
The tricky part was the custom error messages for out of bounds accesses.
The string manipulation facility is a bit heavy handed but we will need something like that anyway to produce better error messages with memory access violations in
Kokkos::View
.I decided to call abort from the host-side as well instead of throwing a runtime error.