-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] <experimental/simd> Add implicit type conversion constructor for class simd/simd_mask #71132
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
Conversation
5e80afc
to
101322c
Compare
Gentle ping. @philnik777 |
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 % comments.
}; | ||
|
||
template <class U, class T, class SimdAbi = ex::simd_abi::compatible<T>, class = void> | ||
struct has_conversion_ctor : std::false_type {}; |
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.
is_convertible
?
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.
I tried it but it seems is_convertible
can not accurately test the type conversion constructor. When U
is the same as T
, simd[_mask]<U, Abi>
is the same as simd[_mask]<T, Abi>
. And the default copy constructor make them convertible no matter what the Abi
is.
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.
Sorry, my previous understanding may not right. The new commit may be what you want.
101322c
to
b601f16
Compare
✅ With the latest revision this PR passed the C/C++ code formatter. |
b601f16
to
f5bf3ab
Compare
… for class simd/simd_mask
f5bf3ab
to
acccf40
Compare
Local branch amd-gfx 461597c Merged main:0a9c6bea6b08 into amd-gfx:fad78e377956 Remote branch main ba89749 [libc++] <experimental/simd> Add implicit type conversion constructor for class simd/simd_mask (llvm#71132)
No description provided.