-
Notifications
You must be signed in to change notification settings - Fork 19
Add switches for some functions to compile differently for host vs device #434
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
Changes from all commits
01a2ab5
e56041e
a5b1aa5
53c3632
14ed096
86c2499
d3d4cfc
d15f43f
bec2cf5
7b7d971
46ab3a2
6a0ec48
d336dd6
e95f74f
cbd2512
2f7b1df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,8 +148,13 @@ class EosBase { | |
|
||
// Generic evaluator | ||
template <typename Functor_t> | ||
constexpr void Evaluate(Functor_t &f) const { | ||
CRTP copy = *(static_cast<CRTP const *>(this)); | ||
PORTABLE_INLINE_FUNCTION void EvaluateDevice(const Functor_t f) const { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't recall the exact error, but I recall making this a forwarding reference fixed some issues I had seen. Probably worth trying. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can try that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually the current version works, so if you're happy with the split function signature (as discussed below) lets keep it as is. However, if you really dislike the split function signature I can take a look and try games with forwarding references, etc. |
||
const CRTP copy = *(static_cast<CRTP const *>(this)); | ||
f(copy); | ||
} | ||
template <typename Functor_t> | ||
void EvaluateHost(Functor_t &f) const { | ||
const CRTP copy = *(static_cast<CRTP const *>(this)); | ||
f(copy); | ||
Yurlungur marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.