Skip to content

draft: introduce concepts to pattern/forall.hpp#1990

Open
johnbowen42 wants to merge 4 commits intofeature/bowen/cpp20from
feature/bowen/cpp-20-concepts
Open

draft: introduce concepts to pattern/forall.hpp#1990
johnbowen42 wants to merge 4 commits intofeature/bowen/cpp20from
feature/bowen/cpp-20-concepts

Conversation

@johnbowen42
Copy link
Contributor

In this draft PR, I am experimenting with the idea of replacing SFINAE within RAJA with concepts and requires statements, where further disambiguation is needed

@johnbowen42 johnbowen42 changed the base branch from develop to feature/bowen/cpp20 February 19, 2026 00:01
concepts::negate<type_traits::is_indexset_policy<ExecutionPolicy>>,
type_traits::is_range<Container>>
forall(Res r, ExecutionPolicy&& p, Container&& c, LoopBody&& loop_body)
RAJA_INLINE RAJA::resources::EventProxy<Res> forall(Res r,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RAJA_INLINE RAJA::resources::EventProxy<Res> forall(Res r,
requires(!IndexSetPolicy<ExecutionPolicy>)
RAJA_INLINE RAJA::resources::EventProxy<Res> forall(Res r,

template<ForallPolicy ExecutionPolicy,
Resource Res,
RandomAccessRange Container,
Integer IndexType,
Copy link
Member

Choose a reason for hiding this comment

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

Index type and container appear in other templates above, should they also use Integer and RandomAccessRange?

@rhornung67 rhornung67 marked this pull request as ready for review February 20, 2026 20:48
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.

2 participants