Conversation
|
Hi @llnl/raja-core I've pushed up the discussed changes. |
Co-authored-by: Jason Burmark <MrBurmark@users.noreply.github.com>
| ``RAJA::TypedRangeStrideSegment``. | ||
| * When one of the bounds is a RAJA strong index type, such as a type created | ||
| with ``RAJA_INDEX_VALUE``, that strong type is preserved for the loop | ||
| variable when possible. |
There was a problem hiding this comment.
When possible? Doesn't it always use the strong type if one is provided?
The only case I'm worried about is something like a strong index type with underlying type int combined with a long choosing long instead of being an error.
| with ``RAJA_INDEX_VALUE``, that strong type is preserved for the loop | ||
| variable when possible. | ||
| * Providing an explicit template argument, such as | ||
| ``RAJA::range<MyIndex>(end)``, overrides the deduced storage type. |
There was a problem hiding this comment.
It should still be an error to, for example, explicitly ask for int but provide a strong index type as an argument, or explicitly ask for a strong index type and provide a different strong index type as an argument.
There was a problem hiding this comment.
I wonder if we can use c++20's require to test that these cases fail?
There was a problem hiding this comment.
You definitely can, you could even make concepts to make it easier most likely.
#Summary
Many of my loops start at zero, this gives users a shortcut to generate the desired range segment.