|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Internal raw-double compute signatures for SIMD batch kernels. More...
#include <cstddef>Go to the source code of this file.
Namespaces | |
| namespace | srfm |
| namespace | srfm::simd |
| namespace | srfm::simd::detail |
Macros | |
| #define | SRFM_RESTRICT __restrict__ |
Functions | |
| void | srfm::simd::detail::compute_beta_scalar (const double *__restrict__ velocities, std::size_t n, double &running_max, double *__restrict__ out) noexcept |
| Scalar reference implementation of the beta batch kernel. | |
| void | srfm::simd::detail::compute_beta_avx2 (const double *__restrict__ velocities, std::size_t n, double &running_max, double *__restrict__ out) noexcept |
| AVX2 (256-bit, 4-wide) beta batch kernel. | |
| void | srfm::simd::detail::compute_beta_avx512 (const double *__restrict__ velocities, std::size_t n, double &running_max, double *__restrict__ out) noexcept |
| AVX-512F (512-bit, 8-wide) beta batch kernel. | |
| void | srfm::simd::detail::compute_gamma_scalar (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| Scalar reference implementation of the gamma batch kernel. | |
| void | srfm::simd::detail::compute_gamma_avx2 (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| AVX2 (256-bit, 4-wide) gamma batch kernel. | |
| void | srfm::simd::detail::compute_gamma_avx512 (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| AVX-512F (512-bit, 8-wide) gamma batch kernel. | |
Internal raw-double compute signatures for SIMD batch kernels.
Module: src/simd/ (internal — do NOT include from public headers) Owner: AGT-08 — 2026-03-01
Declare the low-level SIMD and scalar kernel signatures that operate on raw double pointers. These are implementation details; callers should use the public API in include/srfm/simd/simd_dispatch.hpp instead.
Beta batch: Computes beta_i = |velocities[i]| / running_max for all i in [0, n). running_max is updated in-place: at each chunk boundary it is set to max(running_max, max(|velocities[chunk]|)). This guarantees: • beta_i ∈ [0.0, BETA_MAX_SAFE] always • running_max is monotonically non-decreasing across calls
Gamma batch: Computes gamma_i = 1.0 / sqrt(1.0 − betas[i]²) for all i in [0, n). Input betas must be pre-validated (0 ≤ betas[i] ≤ BETA_MAX_SAFE). Clamping is applied before sqrt to prevent NaN.
• All functions are noexcept. • Tail elements (n % LANE != 0) are handled with a scalar fallback. • Output pointers must be writable for n doubles; they need not be aligned (all loads/stores use unaligned intrinsics). • Input and output pointers must not alias (SRFM_RESTRICT).
NOT Responsible For • Wrapping outputs into BetaVelocity / LorentzFactor (dispatch layer). • Selecting the correct kernel at runtime (simd_dispatch.cpp).
Definition in file simd_batch_detail.hpp.
| #define SRFM_RESTRICT __restrict__ |
Definition at line 50 of file simd_batch_detail.hpp.