Skip to content
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

Fix is_vector_type fail while building neon with clang or GCC > 10.0 #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yaozhongxiao
Copy link

GCC with version 10 onward does not treat intrinsic type(int8x16_t)
and __vector_type(vector_size(16) int8_t) are the same which lead
to is_vector_type failure.
Meanwhile, clang use attribute((neon_vector_type)) is not same
type with attribute((vector_size()))
Above all, is_vector_type should be judged by logical "or"
with the same<Tp, __vector_type> and same<Tp,__intrinsic_type>

ChangeLog:
  * experimental/bits/simd.h: refactor the is_vector_type taking
  vector_type and intrinsic_type as independent types

GCC with version 10 onward does not treat intrinsic type(int8x16_t)
and __vector_type(vector_size(16) int8_t) are the same which lead
to is_vector_type<Tp> failure.
Meanwhile, clang use __attribute__((neon_vector_type)) is not same
type with __attribute__((__vector_size__()))
Above all, is_vector_type should be judged by logical "or"
with the same<Tp, __vector_type> and same<Tp,__intrinsic_type>

ChangeLog:
  * experimental/bits/simd.h: refactor the is_vector_type taking
  vector_type and intrinsic_type as independent types
@yaozhongxiao
Copy link
Author

@mattkretz please help to confirm the issue and the solution, thanks.

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.

1 participant