Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@johnbowen42
Copy link
Contributor

This PR simplifies the ChunkSize overloads inside policy/openmp/params/forall.hpp with if constexpr

@johnbowen42 johnbowen42 requested review from a team, MrBurmark and artv3 October 2, 2025 16:39

#pragma omp for schedule(guided) reduction(combine : f_params)
for (decltype(distance_it) i = 0; i < distance_it; ++i)
if constexpr (ChunkSize <= 0)
Copy link
Member

Choose a reason for hiding this comment

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

Can you pick a consistent ordering? In some forall implementations, you do the ChunkSize > 0 case first and in others the ChunkSize <= 0 first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, good point. I will do that

@artv3
Copy link
Member

artv3 commented Oct 6, 2025

@johnbowen42 , not sure if this might be out of the scope of this PR. But there may also be a lot of duplicate capability here:

https://github.com/LLNL/RAJA/blob/develop/include/RAJA/policy/openmp/forall.hpp

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.

4 participants