Skip to content

Conversation

@cybaol
Copy link

@cybaol cybaol commented Feb 11, 2025

Use simde package to support riscv64
Closes #93

@wszqkzqk
Copy link

wszqkzqk commented Feb 11, 2025

See: https://github.com/simd-everywhere/simde

If you define SIMDE_ENABLE_NATIVE_ALIASES before including SIMDe you can use the same names as the native functions. Unfortunately, this is somewhat error-prone due to portability issues in the APIs, so it's recommended to only do this for testing. When SIMDE_ENABLE_NATIVE_ALIASES is undefined only the versions prefixed with simde_ will be available; for example, the MMX _mm_add_pi8 intrinsic becomes simde_mm_add_pi8, and __m64 becomes simde__m64.

Perhaps a more appropriate approach would be to use simde's functions instead of x86's. 🤔Then it may be possible to use simde for all platforms to provide the same behavior.

... it is important to note that you do not need two separate versions (one using SIMDe, the other native). If the native functions are available SIMDe will use them, and compilers easily optimize away any overhead from SIMDe; all they have to do is some basic inlining.

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.

Is there any plan to support RISCV-64?

2 participants