Support building on ARM with NEON histogram intrinsics #4

Merged
andrew merged 5 commits from weaselbot/weaseldb:weaselbot/issue-3 into main 2026-06-26 16:13:08 +00:00
Showing only changes of commit 14f8552906 - Show all commits
+2 -4
View File
@@ -1446,8 +1446,7 @@ update_histogram_buckets_simd(std::span<const double> thresholds,
}
}
#elif defined(__aarch64__)
static void
update_histogram_buckets_simd(std::span<const double> thresholds,
static void update_histogram_buckets_simd(std::span<const double> thresholds,
std::span<uint64_t> counts, double x,
size_t start_idx) {
const size_t size = thresholds.size();
@@ -1522,8 +1521,7 @@ void Histogram::observe(double x) {
p->mutex.unlock();
} else {
// Slow path: accumulate in pending (lock-free)
update_histogram_buckets(p->thresholds, p->pending.bucket_counts, x,
0);
update_histogram_buckets(p->thresholds, p->pending.bucket_counts, x, 0);
p->pending.sum += x;
p->pending.observations++;
}