Skip to content

feature: restore IndexValue support and testing - #2049

Draft
johnbowen42 wants to merge 10 commits into
developfrom
feature/bowen/restore-indexvalue-support
Draft

feature: restore IndexValue support and testing#2049
johnbowen42 wants to merge 10 commits into
developfrom
feature/bowen/restore-indexvalue-support

Conversation

@johnbowen42

@johnbowen42 johnbowen42 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

Comment thread include/RAJA/index/IndexValue.hpp Outdated
@johnbowen42

Copy link
Copy Markdown
Contributor Author

@MrBurmark @artv3 @rchen20 @rhornung67 I refactored the kernel functional tests to support IndexValue here, including some reworking of the parameter-based reductions. Let me know if you think this is too much for the upcoming release, if so we can bench this till later. We still need to plumb through support with forall and launch

Comment on lines +316 to +317
RAJA::IndexValue<std::remove_cvref_t<T>,
typename std::remove_cvref_t<T>::value_type>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread include/RAJA/index/IndexValue.hpp Outdated
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) \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want this to be explicit?

Comment thread include/RAJA/index/IndexValue.hpp Outdated
: RAJA::IndexValue<TYPE, IDXT>::IndexValue() \
{} \
RAJA_HOST_DEVICE RAJA_INLINE explicit TYPE(IDXT v) \
RAJA_HOST_DEVICE RAJA_INLINE TYPE(IDXT v) \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explicit

#ifndef __TEST_KERNEL_REDUCELOC_MAX2DVIEWTUPLE_HPP__
#define __TEST_KERNEL_REDUCELOC_MAX2DVIEWTUPLE_HPP__

namespace {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to be able to easily assign to a strongly typed index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants