|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Namespace for TriangleSoAT-related compile-time utilities. More...
Functions | |
| template<typename T > | |
| constexpr size_t | DefaultWidth () noexcept |
| Returns the SIMD-optimal SoA width (triangles per TriangleSoAT group) for type T on the current target ISA. | |
Namespace for TriangleSoAT-related compile-time utilities.
Returns the SIMD-optimal SoA width (triangles per TriangleSoAT group) for type T on the current target ISA.
Maps the floating-point type and the compile-time ISA to the W that fills one SIMD register exactly, matching the paths TriangleSoAT::signedDistance() actually implements. Not a member of TriangleSoAT itself: that class is templated on W, so a member couldn't be used to compute W's own default (the same reason BVH::DefaultBranchingRatio<T>() is a free function in namespace BVH rather than a member of TreeBVH).
| ISA | T=float | T=double |
|---|---|---|
| AVX-512F | 16 | 8 |
| AVX | 8 | 4 |
| otherwise | 4 | 4 |
Usage: size_t W = EBGeometry::TriangleSoA::DefaultWidth<T>() as a template-parameter default.
| T | Floating-point precision type (float or double). |