Skip to content

[NFCI][SYCL] Split vec's unary ops into individual mixins #16946

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

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

aelovikov-intel
Copy link
Contributor

We don't want constraints on non-template hidden friend operators to be implemented by templatizing it. It would be trivial with C++20 concepts, but we're limited to C++17. The proposed class hierarchy for vecto_arith helper had intended that, but implementation was only partial.

We want to fix that while implementing the proposed specification changes to the vec/swizzle so setup infrastructure to do so now, to minimize the amount of "preview-breaking-changes" customizations later.

The idea is to split each operator into an individual unrestrained mixin, so that the constraints could be implemented on top of it via detail::ApplyIf helper. This particular PR only implements such a change for unary operators. The rest will be implemented in a subsequent change to ease review process.

We don't want constraints on non-template hidden friend operators to be
implemented by templatizing it. It would be trivial with C++20 concepts,
but we're limited to C++17. The proposed class hierarchy for
`vecto_arith` helper had intended that, but implementation was only
partial.

We want to fix that while implementing the proposed specification
changes to the vec/swizzle so setup infrastructure to do so now, to
minimize the amount of "preview-breaking-changes" customizations later.

The idea is to split each operator into an individual unrestrained
mixin, so that the constraints could be implemented on top of it via
`detail::ApplyIf` helper. This particular PR only implements such a
change for unary operators. The rest will be implemented in a subsequent
change to ease review process.
@aelovikov-intel
Copy link
Contributor Author

Timed Out Tests (1):
SYCL :: Regression/multithread_write_accessor.cpp

is known: #16877

@aelovikov-intel aelovikov-intel merged commit 36ce10e into intel:sycl Feb 11, 2025
14 of 15 checks passed
@aelovikov-intel aelovikov-intel deleted the vec-unary-mixins branch February 11, 2025 00:02
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Feb 11, 2025
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Feb 11, 2025
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Feb 11, 2025
aelovikov-intel added a commit that referenced this pull request Feb 11, 2025
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