diff options
author | David CARLIER <[email protected]> | 2020-12-25 06:48:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-24 22:48:57 -0800 |
commit | 8c4c14ea73297af6709ee45beea41eafaaeb5374 (patch) | |
tree | 73e403dca90873eb3c650f1021f7f97b84d94354 | |
parent | 6ae0115bf7cb07e54f6e3b32bea08ebbd8cebea6 (diff) |
fast_roundf implementations in asm for ARM64. (#511)
-rw-r--r-- | common/alnumeric.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/alnumeric.h b/common/alnumeric.h index 8d13f9bf..e16d7c1c 100644 --- a/common/alnumeric.h +++ b/common/alnumeric.h @@ -329,6 +329,12 @@ inline float fast_roundf(float f) noexcept __asm__ __volatile__("frndint" : "=t"(out) : "0"(f)); return out; +#elif (defined(__GNUC__) || defined(__clang__)) && defined(__aarch64__) + + float out; + __asm__ volatile("frintx %s0, %s1" : "=w"(out) : "w"(f)); + return out; + #else /* Integral limit, where sub-integral precision is not available for |