11#ifndef EBGEOMETRY_POINTAOSOA_HPP
12#define EBGEOMETRY_POINTAOSOA_HPP
42template <class T, class Meta, size_t W = PointSoA::DefaultWidth<T>()>
45 static_assert(
W > 0,
"W must be positive");
46 static_assert(std::is_floating_point_v<T>,
"PointAoSoA requires a floating-point type T");
166#include "EBGeometry_PointAoSoAImplem.hpp"
Declaration of a true SoA point-position group for SIMD nearest-neighbor evaluation.
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
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31
Metadata-carrying wrapper around a single PointSoAT<T, W>.
Definition EBGeometry_PointAoSoA.hpp:44
BV computeBoundingVolume() const noexcept
Compute the bounding volume enclosing all valid points in this group.
T getMaximumDistance(const Vec3T< T > &a_point) const noexcept
Largest unsigned distance from a_point to the farthest point in this group.
std::array< Meta, W > m_metaData
Per-lane metadata, physically separate from m_positions. m_metaData[j] = metadata of point j....
Definition EBGeometry_PointAoSoA.hpp:152
const Meta & getMetaData(size_t a_lane) const noexcept
Get the metadata for one lane of this 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 points.
void pack(const Vec3T< T > *a_positions, const Meta *a_metaData, uint32_t a_count) noexcept
Pack a_count (position, metadata) pairs into this group.
uint32_t m_validCount
Number of valid (non-padded) points in this group (1..W).
Definition EBGeometry_PointAoSoA.hpp:161
T getMinimumDistance(const Vec3T< T > &a_point) const noexcept
Shortest unsigned distance from a_point to the closest point in this group.
T getMinimumDistance2(const Vec3T< T > &a_point) const noexcept
Shortest squared unsigned distance from a_point to the closest point in this group.
T getMaximumDistance2(const Vec3T< T > &a_point) const noexcept
Largest squared unsigned distance from a_point to the farthest point in this group.
PointSoAT< T, W > m_positions
The wrapped, position-only SoA block. SIMD-hot: this is all getDistance()/ getDistance2() ever touch.
Definition EBGeometry_PointAoSoA.hpp:146
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 points.
True SoA (Structure of Arrays) layout for W point positions, enabling SIMD distance evaluation agains...
Definition EBGeometry_PointSoA.hpp:104