4 ms·
IMO, this shouldn't be a TODO. This should be an #error based on the standard C macros for detecting endianness at compile-time.
by brandmeyer 5y ago
IMO, this shouldn't be a TODO. This should be an #error based on the standard C macros for detecting endianness at compile-time.
- oconnor663 5y agoThis is a good point, and I'd like to fix it. When I look for endianness macros, it doesn't seem like there's a common standard. Is there an approach you'd recommend?
- brandmeyer 5y agoIt seems that you're right - ISO C doesn't have standard macros for this. That said, since this code is ARM-specific, and you are already leveraging the ACLE header <arm_neon.h>, I think that a negative test for __ARM_BIG_ENDIAN is appropriate. https://developer.arm.com/documentation/101028/0012/5--Feature-test-macros https://developer.arm.com/documentation/101028/0012/5--Featu...
- oconnor663 5y agoI just put up https://github.com/BLAKE3-team/BLAKE3/pull/188 https://github.com/BLAKE3-team/BLAKE3/pull/188 for this. Let me know if you have any suggestions about how to test it?