Special Relativity in Financial Modeling 1.0.0
Lorentz transforms, spacetime classification, and geodesic price paths for quantitative finance
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
beta_avx512.cpp File Reference

AVX-512F (512-bit, 8-wide) implementation of the beta batch kernel. More...

#include "simd_batch_detail.hpp"
#include "momentum/momentum.hpp"
#include <immintrin.h>
#include <cmath>

Go to the source code of this file.

Namespaces

namespace  srfm
 
namespace  srfm::simd
 
namespace  srfm::simd::detail
 

Functions

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.
 

Variables

static constexpr double srfm::simd::detail::BETA_CLAMP_LIMIT
 

Detailed Description

AVX-512F (512-bit, 8-wide) implementation of the beta batch kernel.

Module: src/simd/ Owner: AGT-08 — 2026-03-01

Algorithm: Batch-max (8-wide SIMD)

  1. Pass 1 (vectorised): compute batch_max using 8-wide abs + _mm512_reduce_max_pd.
  2. Update scalar running_max.
  3. Pass 2 (vectorised): broadcast running_max, divide |v_i|/denom, clamp.
  4. Tail (scalar): handle n % 8 remaining elements.

Using the batch maximum as the single denominator for all elements in one call means the results are bit-identical to compute_beta_scalar() (which uses the same batch-max algorithm) regardless of SIMD width.

Note: Compiled with -mavx512f / /arch:AVX512.

Definition in file beta_avx512.cpp.