11#ifndef EBGEOMETRY_POINTAOSOA_HPP
12#define EBGEOMETRY_POINTAOSOA_HPP
42template <class T, 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");
62 pack(
const Vec3T<T>* a_positions,
const uint32_t* a_pointIds, uint32_t a_count)
noexcept;
175static_assert(std::is_trivially_copyable_v<
PointAoSoA<
float>>, "
PointAoSoA<
float> must be trivially copyable");
176static_assert(std::is_trivially_copyable_v<
PointAoSoA<
double>>, "
PointAoSoA<
double> must be trivially copyable");
180#include "EBGeometry_PointAoSoAImplem.hpp"
A fixed-size array that compiles for both host and device.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
#define EBGEOMETRY_HOST
Mark a function as callable from host code only (no-op on host compilers).
Definition EBGeometry_GPU.hpp:83
Declaration of a true SoA point-position group for SIMD nearest-neighbor evaluation.
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Fixed-size array with host- and device-callable members.
Definition EBGeometry_Array.hpp:33
A PointSoAT<T, W> group that also carries each point's cloud index.
Definition EBGeometry_PointAoSoA.hpp:44
uint32_t numValid() const noexcept
Number of real (non-padded) points in this group.
Definition EBGeometry_PointAoSoA.hpp:144
BV computeBoundingVolume() const noexcept
Compute the bounding volume enclosing all valid points 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 getMinimumDistance(const Vec3T< T > &a_point) const noexcept
Shortest unsigned distance from a_point to the closest point in this group.
PointSoAT< T, W > m_positions
The wrapped, position-only SoA block. SIMD-hot: this is all the distance queries ever touch....
Definition EBGeometry_PointAoSoA.hpp:166
uint32_t getPointId(size_t a_lane) const noexcept
Get the id of the point in one lane of this group.
void pack(const Vec3T< T > *a_positions, const uint32_t *a_pointIds, uint32_t a_count) noexcept
Pack a_count (position, point id) pairs into this group.
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.
Array< T, W > getDistances(const Vec3T< T > &a_point) const noexcept
Unsigned distances from a_point to every one of the W lane points.
Array< uint32_t, W > m_pointIds
Per-lane point ids, physically separate from m_positions. m_pointIds[j] = id of point j....
Definition EBGeometry_PointAoSoA.hpp:172
T getMaximumDistance(const Vec3T< T > &a_point) const noexcept
Largest unsigned distance from a_point to the farthest 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.
True SoA (Structure of Arrays) layout for W point positions, enabling SIMD distance evaluation agains...
Definition EBGeometry_PointSoA.hpp:128