44[[nodiscard]]
inline T
pointAabbGapSq(
const T *point, std::span<const T> boxMin,
45 std::span<const T> boxMax)
noexcept {
46 static_assert(std::is_same_v<T, float>,
47 "pointAabbGapSq: T must be float; a double specialization is out of scope.");
49 const std::size_t d = boxMin.size();
50#ifdef CLUSTERING_USE_AVX2
51 return detail::pointAabbGapSqAvx2F32(point, boxMin.data(), boxMax.data(), d);
54 for (std::size_t j = 0; j < d; ++j) {
56 if (point[j] < boxMin[j]) {
57 gap = boxMin[j] - point[j];
58 }
else if (point[j] > boxMax[j]) {
59 gap = point[j] - boxMax[j];