|
Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
|
Functions | |
| static double | hmax_pd_avx2 (__m256d v) noexcept |
| void | 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 | 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 | 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 | compute_gamma_avx2 (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| AVX2 (256-bit, 4-wide) gamma batch kernel. | |
| void | compute_gamma_avx512 (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| AVX-512F (512-bit, 8-wide) gamma batch kernel. | |
| void | compute_gamma_scalar (const double *__restrict__ betas, std::size_t n, double *__restrict__ out) noexcept |
| Scalar reference implementation of the gamma batch kernel. | |
| void | cpuid (std::uint32_t leaf, std::uint32_t subleaf, std::uint32_t out[4]) noexcept |
| std::uint64_t | xgetbv (std::uint32_t xcr) noexcept |
| Read XCR0 (used to verify OS XSAVE support for YMM/ZMM state). | |
| bool | os_saves_ymm () noexcept |
| Probe OS support for YMM (AVX) register save/restore. | |
| bool | os_saves_zmm () noexcept |
| Probe OS support for ZMM (AVX-512) register save/restore. | |
Variables | |
| static constexpr double | BETA_CLAMP_LIMIT |
| static constexpr std::uint64_t | ABS_MASK_U64 = 0x7FFF'FFFF'FFFF'FFFFu |
| static constexpr double | BETA_CLAMP_LIMIT |
| static constexpr double | BETA_CLAMP_LIMIT |
| static constexpr double | BETA_CLAMP_LIMIT |
| static constexpr double | BETA_CLAMP_LIMIT |
| static constexpr double | BETA_CLAMP_LIMIT |
|
noexcept |
AVX2 (256-bit, 4-wide) beta batch kernel.
Requires AVX2 support (detected at runtime). Falls back to scalar for tail elements when n % 4 != 0.
Definition at line 44 of file beta_avx2.cpp.
|
noexcept |
AVX-512F (512-bit, 8-wide) beta batch kernel.
Requires AVX-512F support (detected at runtime). Falls back to scalar for tail elements when n % 8 != 0.
Definition at line 33 of file beta_avx512.cpp.
|
noexcept |
Scalar reference implementation of the beta batch kernel.
Always available regardless of hardware. Used as the authoritative correctness reference and as the tail handler for wider kernels.
| velocities | Input price velocities (any finite double). |
| n | Number of elements. |
| running_max | Current running maximum of |velocity|; updated in-place. |
| out | Output beta values, one per input velocity. |
Definition at line 38 of file beta_scalar.cpp.
|
noexcept |
AVX2 (256-bit, 4-wide) gamma batch kernel.
Definition at line 40 of file gamma_avx2.cpp.
|
noexcept |
AVX-512F (512-bit, 8-wide) gamma batch kernel.
Definition at line 55 of file gamma_avx512.cpp.
|
noexcept |
Scalar reference implementation of the gamma batch kernel.
Computes gamma_i = 1.0 / sqrt(1.0 - betas[i]^2). Clamps betas[i] to BETA_CLAMP_SAFE before the sqrt to prevent NaN.
| betas | Input beta values in [0, BETA_MAX_SAFE]. |
| n | Number of elements. |
| out | Output gamma values, one per input beta. |
Definition at line 33 of file gamma_scalar.cpp.
|
inlinenoexcept |
Thin portable wrapper around the CPUID instruction.
| leaf | EAX input (function). |
| subleaf | ECX input (sub-function). 0 for most leaves. |
| out | Output array: [EAX, EBX, ECX, EDX]. |
Definition at line 74 of file cpu_features.hpp.
|
inlinestaticnoexcept |
Definition at line 36 of file beta_avx2.cpp.
|
inlinenoexcept |
Probe OS support for YMM (AVX) register save/restore.
Definition at line 105 of file cpu_features.hpp.
|
inlinenoexcept |
Probe OS support for ZMM (AVX-512) register save/restore.
Definition at line 117 of file cpu_features.hpp.
|
inlinenoexcept |
Read XCR0 (used to verify OS XSAVE support for YMM/ZMM state).
Definition at line 91 of file cpu_features.hpp.
|
staticconstexpr |
Definition at line 33 of file beta_avx2.cpp.
|
staticconstexpr |
Definition at line 30 of file beta_avx2.cpp.
|
staticconstexpr |
Definition at line 30 of file beta_avx512.cpp.
|
staticconstexpr |
Definition at line 35 of file beta_scalar.cpp.
|
staticconstexpr |
Definition at line 37 of file gamma_avx2.cpp.
|
staticconstexpr |
Definition at line 52 of file gamma_avx512.cpp.
|
staticconstexpr |
Definition at line 30 of file gamma_scalar.cpp.