-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove definition MDSPAN_USE_PAREN_OPERATOR=1 from DDC target #677
Conversation
5f4dd1f
to
6a1439e
Compare
6a1439e
to
bb724ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost LGTM.
I have a question about the logic of macro
Any preference between introducing a macro or a function ? |
I think macro is good enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
DDC should not force dependent projects to use
MDSPAN_USE_PAREN_OPERATOR=1
. Moreover this variable only makes sense in the Kokkos implementation of mdspan. A compiler provided implementation will likely not provide this variable neither the function call operator, see cppref.In this PR, DDC adapts to the mdspan implementation, defaulting on using the bracket operator.
Note that there is a bug with llvm 15/16, see the reproducer on godbolt. It has been reported on the mdspan repo, see here.
The two first commits provide alternative implementations that correctly call mdspan either with: