Skip to main content

Module numerics_host

Module numerics_host 

Source
Expand description

Host-side scalar special functions shared by the CPU parity references of the GPU backends.

The CUDA kernels emit their own NVRTC-visible numerics (see crate::numerics_device); this module is the matching host side used by the CPU parity oracles (bms_flex_row’s test oracle) and the CPU reference path (pirls_row’s probit CDF). Keeping a single definition here means the host erfc cannot drift between backends.

Constants§

INV_SQRT_2PI
1/√(2π), matching INV_SQRT_2PI in the kernel source bit-for-bit.
INV_SQRT_PI
1/√π, matching inv_sqrt_pi in the kernel source bit-for-bit.
LN_2
ln(2), matching LN_2 in the kernel source bit-for-bit.
SQRT_2
√2, matching SQRT_2 in the kernel source bit-for-bit.
SQRT_2_OVER_PI
√(2/π), matching sqrt_2_over_pi in the kernel source bit-for-bit.

Functions§

erfc
Complementary error function erfc(x) = 1 − erf(x) evaluated on the host.