1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Date: Sat, 29 Jun 2024 16:18:00 +0000
Subject: Unconditionally define spread_bits64
Taken from Gentoo, https://github.com/gentoo/gentoo/commit/ea02b0311
Closes: #983953
---
src/chealpix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/chealpix.c b/src/chealpix.c
index 1a45df3..0a116b5 100644
--- a/src/chealpix.c
+++ b/src/chealpix.c
@@ -532,7 +532,6 @@ static long isqrt64(int64_t v) {
return (long) res;
}
-#ifndef __BMI2__
static int64_t spread_bits64(int v) {
return (int64_t) (utab[v & 0xff])
| ((int64_t) (utab[(v >> 8) & 0xff]) << 16)
@@ -548,6 +547,7 @@ static int64_t compress_bits64(int64_t v) {
| (ctab[(raw >> 40) & 0xff] << 20);
}
+#ifndef __BMI2__
static int64_t xyf2nest64(int64_t nside, int ix, int iy, int face_num) {
return (face_num * nside * nside) + spread_bits64(ix)
+ (spread_bits64(iy) << 1);
|