11#ifndef EBGEOMETRY_TRIANGLESOA_HPP
12#define EBGEOMETRY_TRIANGLESOA_HPP
20#if defined(__SSE4_1__) || defined(__AVX__) || defined(__AVX512F__)
33namespace TriangleSoA {
58 static_assert(std::is_floating_point_v<T>,
"EBGeometry::TriangleSoA::DefaultWidth requires a floating-point T");
59#if defined(__AVX512F__)
60 if constexpr (std::is_same_v<T, double>) {
67 if constexpr (std::is_same_v<T, double>) {
99template <
class T,
size_t W>
102 static_assert(
W > 0,
"W must be positive");
103 static_assert(std::is_floating_point_v<T>,
"TriangleSoAT requires a floating-point type T");
114 template <
class Meta>
214#include "EBGeometry_TriangleSoAImplem.hpp"
Declaration of a triangle class with signed distance functionality.
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 (triangles per TriangleSoAT group) for type T on the current targe...
Definition EBGeometry_TriangleSoA.hpp:56
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31
SoA (Structure of Arrays) layout for W triangles, enabling SIMD evaluation.
Definition EBGeometry_TriangleSoA.hpp:101
T m_vz[3][W]
z-coordinates of vertex positions. m_vz[i][j] = z-coord of vertex i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:156
T m_enz[3][W]
z-components of edge normals. m_enz[i][j] = z of edge normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:201
T m_nx[W]
x-components of face normals. m_nx[j] = x-component of the face normal for triangle j.
Definition EBGeometry_TriangleSoA.hpp:161
uint32_t m_validCount
Number of valid (non-padded) triangles in this group (1..W).
Definition EBGeometry_TriangleSoA.hpp:209
T m_vnz[3][W]
z-components of vertex normals. m_vnz[i][j] = z of vertex normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:186
void pack(const Triangle< T, Meta > *tris, uint32_t count) noexcept
Pack count triangles from tris[0..count-1] into this SoA group.
T m_ny[W]
y-components of face normals.
Definition EBGeometry_TriangleSoA.hpp:166
T m_enx[3][W]
x-components of edge normals. m_enx[i][j] = x of edge normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:191
T m_vy[3][W]
y-coordinates of vertex positions. m_vy[i][j] = y-coord of vertex i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:151
T m_nz[W]
z-components of face normals.
Definition EBGeometry_TriangleSoA.hpp:171
T m_vx[3][W]
x-coordinates of vertex positions. m_vx[i][j] = x-coord of vertex i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:146
BV computeBoundingVolume() const noexcept
Compute the bounding volume enclosing all valid triangles in this group.
T m_eny[3][W]
y-components of edge normals. m_eny[i][j] = y of edge normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:196
T m_vny[3][W]
y-components of vertex normals. m_vny[i][j] = y of vertex normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:181
T m_vnx[3][W]
x-components of vertex normals. m_vnx[i][j] = x of vertex normal i for triangle j.
Definition EBGeometry_TriangleSoA.hpp:176
T signedDistance(const Vec3T< T > &a_point) const noexcept
Evaluate signed distance from a_point to the closest triangle in this group.