-
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
boolean reduction value_type changes answer #225
Comments
Reduction value_type needs to be a word-aligned plain-old-data types. Unfortunately 'bool' can be compiled to a fraction of a word, which is probably the source of the error. We should introduce a static_assert to catch / enforce this requirement. |
Thank you for the explanation. I'll switch to word-sized value_types in my code. A compile-time check would be much appreciated. |
The types can be larger than a word (i.e., int) just not smaller. Re-opening until we get the static_assert into the code, then will close. |
Pushed to Master and Trilinos: you can not do reductions with types smaller than 32bit now |
Just FYI, I had to increase this further from |
I'm trying to write some custom parallel_reduce functors which will compute whether a condition is true for all items in an array. I tried to use "bool" as the value_type and implement methods based on the && operator. Strangely, it gives the wrong output when value_type is bool but I can fix it by using an integer value_type:
Am I misusing Kokkos here ?
If this is something that should work, I have a two-file standalone example that replicates the issue. All the above is using Kokkos with CUDA on Shannon.
The text was updated successfully, but these errors were encountered: