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

How to solve can't convert vector values between diferrent type #2

Open
doublekang2018 opened this issue Dec 18, 2023 · 2 comments
Open

Comments

@doublekang2018
Copy link

I'm trying to use your header file to run a SSE SIMD code on MIIPS CPU(Loongson 3A3000),it turns out with some errors.
error: can’t convert between vector values of different size
return vreinterpret_m128(__builtin_msa_fadd_w(vreinterpret_v4f32(a), vreinterpret_v4f32(b)));

error:can’t convert between vector values of different size
extension(({union {int32_t i; typeof(x) v;} $ = {.v = x}; $.i;}))

I don't know how to solve these problems, can you help me?
thank you so much.

@i-evi
Copy link
Owner

i-evi commented Dec 19, 2023

@doublekang2018 This header file converts intel SSE intrinsic to MIPS MSA implementation. It requires your compiler to support MIPS MSA builtin functions (gcc 7.1+), and a cpu that supports MIPS MSA ASE, such as loongson 3A4000 or Ingenic x2000. As I know, the loongson 3A3000 dose not support MIPS MSA, if you just want to run SSE code on the loongson 3A3000 platform, you can try the SIMDe project.

@doublekang2018
Copy link
Author

Yes,it works perfectly on loongson 3A4000 cpu,thank you so much ! It helps me to convert my sse code to mips without any change.

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

No branches or pull requests

2 participants