11#ifndef EBGEOMETRY_POINTSOA_HPP
12#define EBGEOMETRY_POINTSOA_HPP
20#if defined(__SSE4_1__) || defined(__AVX__) || defined(__AVX512F__)
55 static_assert(std::is_floating_point_v<T>,
"EBGeometry::PointSoA::DefaultWidth requires a floating-point T");
56#if defined(__AVX512F__)
57 if constexpr (std::is_same_v<T, double>) {
64 if constexpr (std::is_same_v<T, double>) {
102template <class T, size_t W = PointSoA::DefaultWidth<T>()>
105 static_assert(
W > 0,
"W must be positive");
106 static_assert(std::is_floating_point_v<T>,
"PointSoAT requires a floating-point type T");
220#include "EBGeometry_PointSoAImplem.hpp"
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
constexpr size_t DefaultWidth() noexcept
Returns the SIMD-optimal SoA width (points per PointSoAT group) for type T on the current target ISA.
Definition EBGeometry_PointSoA.hpp:53
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31
True SoA (Structure of Arrays) layout for W point positions, enabling SIMD distance evaluation agains...
Definition EBGeometry_PointSoA.hpp:104
BV computeBoundingVolume() const noexcept
Compute the bounding volume enclosing all valid positions in this group.
T m_z[W]
z-coordinates of point positions.
Definition EBGeometry_PointSoA.hpp:207
void pack(const Vec3T< T > *a_positions, uint32_t a_count) noexcept
Pack a_count positions from a_positions[0..a_count-1] into this SoA group.
std::array< T, W > getDistances(const Vec3T< T > &a_point) const noexcept
Unsigned distances from a_point to every one of the W lane positions.
T getMaximumDistance2(const Vec3T< T > &a_point) const noexcept
Largest squared unsigned distance from a_point to the farthest position in this group.
T getMinimumDistance2(const Vec3T< T > &a_point) const noexcept
Shortest squared unsigned distance from a_point to the closest position in this group.
T getMaximumDistance(const Vec3T< T > &a_point) const noexcept
Largest unsigned distance from a_point to the farthest position in this group.
std::array< T, W > getDistances2(const Vec3T< T > &a_point) const noexcept
Squared unsigned distances from a_point to every one of the W lane positions.
T m_y[W]
y-coordinates of point positions.
Definition EBGeometry_PointSoA.hpp:202
uint32_t m_validCount
Number of valid (non-padded) positions in this group (1..W).
Definition EBGeometry_PointSoA.hpp:215
T m_x[W]
x-coordinates of point positions. m_x[j] = x-coord of point j.
Definition EBGeometry_PointSoA.hpp:197
T getMinimumDistance(const Vec3T< T > &a_point) const noexcept
Shortest unsigned distance from a_point to the closest position in this group.