Repository navigation
Add Constant Type and Operators - #222
Merged
Merged
Conversation
MrBurmark
commented
Aug 15, 2026
MrBurmark
requested review from
adayton1,
artv3,
bechols97,
johnbowen42,
rchen20,
rhornung67 and
trws
September 22, 2026 16:09
rhornung67
previously approved these changes
Sep 22, 2026
Member
There was a problem hiding this comment.
@MrBurmark I'm OK with this going in for the patch release, but I will leave the final call up to you. If this will require changes to user code, is it too much for a patch release? Also, where should we document those changes?
Member
Author
|
I'll remove the places that this was used in favor or integral_constant for compatibility. |
MrBurmark
commented
Sep 22, 2026
MrBurmark
commented
Sep 22, 2026
Avoid unexpected non-short-circuiting && and || Co-authored-by: Jason Burmark <MrBurmark@users.noreply.github.com>
MrBurmark
commented
Sep 22, 2026
MrBurmark
commented
Sep 22, 2026
MrBurmark
commented
Sep 22, 2026
Co-authored-by: Jason Burmark <MrBurmark@users.noreply.github.com>
Member
Author
|
I reverted the places where constant was used inplace of constant so user code doesn't have to change. |
bechols97
reviewed
Sep 22, 2026
adayton1
previously approved these changes
Sep 22, 2026
adayton1
reviewed
Sep 22, 2026
MrBurmark
commented
Sep 22, 2026
Member
|
Can you update the pull request description now that integral_constant is no longer being deprecated? |
Co-authored-by: Jason Burmark <MrBurmark@users.noreply.github.com>
Member
Author
done. |
MrBurmark
commented
Sep 22, 2026
Also change spacing to better reflect intent. Co-authored-by: Jason Burmark <MrBurmark@users.noreply.github.com>
adayton1
approved these changes
Sep 22, 2026
bechols97
approved these changes
Sep 22, 2026
rhornung67
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a constant type that takes a compile-time value as a template parameter. Support arithmetic between constants that produces a constant.
The ultimate goal with this is use it as part of a
RAJA::transparent_rangeclass that I'm thinking about adding that stores the input begin, end, and stride exactly as they were given. My hope is to improve some cases in RAJAPerf and beyond where the BASE and RAJA differ by knowledge of such exact values. For example we often assume that ranges start at 0 but RAJA ranges always have a runtime begin value, knowledge of which does not cross the host device barrier. This is responsible for some differences between kernel which takes its ranges on the host and launch which takes ranges on the device.