feature: restore IndexValue support and testing - #2049
Conversation
…dex support. Add support for arithmetic
|
@MrBurmark @artv3 @rchen20 @rhornung67 I refactored the kernel functional tests to support |
| RAJA::IndexValue<std::remove_cvref_t<T>, | ||
| typename std::remove_cvref_t<T>::value_type>, |
There was a problem hiding this comment.
Do we have any concern about using typename std::remove_cvref_t<T>::value_type on types that are not IndexValues and don't have value_type aliases?
| using IndexValueType = TYPE; \ | ||
| RAJA_HOST_DEVICE RAJA_INLINE TYPE() : parent::IndexValue() {} \ | ||
| RAJA_HOST_DEVICE RAJA_INLINE explicit TYPE(::RAJA::Index_type v) \ | ||
| RAJA_HOST_DEVICE RAJA_INLINE TYPE(::RAJA::Index_type v) \ |
There was a problem hiding this comment.
Don't we want this to be explicit?
| : RAJA::IndexValue<TYPE, IDXT>::IndexValue() \ | ||
| {} \ | ||
| RAJA_HOST_DEVICE RAJA_INLINE explicit TYPE(IDXT v) \ | ||
| RAJA_HOST_DEVICE RAJA_INLINE TYPE(IDXT v) \ |
| #ifndef __TEST_KERNEL_REDUCELOC_MAX2DVIEWTUPLE_HPP__ | ||
| #define __TEST_KERNEL_REDUCELOC_MAX2DVIEWTUPLE_HPP__ | ||
|
|
||
| namespace { |
There was a problem hiding this comment.
Why is this stuff copied everywhere?
| RAJA_INLINE IndexValue& operator=(IndexValue const&) = default; | ||
| RAJA_INLINE IndexValue& operator=(IndexValue&&) = default; | ||
|
|
||
| RAJA_INLINE IndexValue& operator=(const value_type& v) |
There was a problem hiding this comment.
Do we want to be able to easily assign to a strongly typed index?
Right now this PR puts in support for basic functionality of use of IndexValue with param based reductions, and restores test coverage of IndexValue types within tests/functional/kernel