Conversation
d461676 to
d3e305f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
9dd3cd5 to
8cdfb91
Compare
8cdfb91 to
2b80376
Compare
|
@serge-sans-paille this is ready |
| * Set to 1 if NEON is available at compile-time, to 0 otherwise. | ||
| */ | ||
| #if (defined(__ARM_NEON) && __ARM_ARCH >= 7) || XSIMD_WITH_NEON64 | ||
| #if (defined(__ARM_ARCH) && (__ARM_ARCH >= 7) && defined(__ARM_NEON)) || XSIMD_TARGET_ARM64 |
There was a problem hiding this comment.
Why did you add this __ARM_ARCH check?
There was a problem hiding this comment.
I thought that the following __ARM_ARCH >= 7 was unsound if __ARM_ARCH was not defined.
|
|
||
| namespace detail | ||
| { | ||
| #if XSIMD_WITH_LINUX_GETAUXVAL |
There was a problem hiding this comment.
you could restrict the #if to the function body, using the (void) type trick to fake usage.
There was a problem hiding this comment.
Sure, although that is the opposite of what we ended up doing for cpuid :)
|
|
||
| inline static linux_auxval read(getauxval_t type) noexcept | ||
| { | ||
| return linux_auxval(detail::linux_getauxval(type)); |
There was a problem hiding this comment.
the extra functional cast should not be needed.
There was a problem hiding this comment.
Ha no this is an (explicit) constructor call getauxval_t -> linux_auxval (current type).
| { | ||
| using linux_getauxval_t = unsigned long; | ||
|
|
||
| inline linux_getauxval_t linux_getauxval(linux_getauxval_t type) noexcept; |
There was a problem hiding this comment.
I don't think you need to forward declare this here and implement it in the bottom.
There was a problem hiding this comment.
It is used on line 54 (middle of the file).
I like the bottom of the file definition as much as possible when it is full of #if etc.
Follow up to #1251 with similar API.
For this we need to use getauxval on Linux (no current alternative for other OS but they may come in the future).
Seems like we will be able to reuse it for RISC-V.