Skip to content

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 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