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

__m128 alternatives outside #ifdef __SSE__ ? #12

Closed
XieJiSS opened this issue Nov 25, 2021 · 2 comments · Fixed by #13
Closed

__m128 alternatives outside #ifdef __SSE__ ? #12

XieJiSS opened this issue Nov 25, 2021 · 2 comments · Fixed by #13

Comments

@XieJiSS
Copy link
Contributor

XieJiSS commented Nov 25, 2021

Some platforms do not have __m128.

Is it possible to replace it with unsigned __int128, etc.? I'm not sure whether this will break data alignment or not.

@swesterfeld
Copy link
Owner

I am assuming you report this because SpectMorph doesn't compile on your platform (which platform?). My suggestion would be to replace

      __m128 out[(block_size + 2) / 4 + 1];   // SSE alignment (should be done by compiler)
      float *spectrum = reinterpret_cast <float *> (&out[0]);

with

      alignas (16) float spectrum[block_size + 2]; // SSE alignment

This should ensure alignment without using any __foo tricks which may not be supported on some platforms. Please try if that fixes building SpectMorph for you.

@XieJiSS
Copy link
Contributor Author

XieJiSS commented Nov 28, 2021

@swesterfeld Yes, I'm trying to build SpectMorph on RISC-V (more specifically, rv64gc). Thanks for your help, now I can make it compiles successfully. I'll try to make a PR regarding this (and an additional fix for another compile error) ASAP.

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 a pull request may close this issue.

2 participants