fhelium.backend.triton._arithmetic
Integer Montgomery arithmetic shared by generated Triton kernels.
montgomery_mul
function View source
python
def montgomery_mul(a, b, q, k, radix_bits: tl.constexpr): ...1
Return native-compatible REDC: canonical for R32, lazy for R62.
montgomery_reduce
function View source
python
def montgomery_reduce(a, q, k, radix_bits: tl.constexpr): ...1
add_lazy
function View source
python
def add_lazy(a, b, q): ...1
subtract_lazy
function View source
python
def subtract_lazy(a, b, q): ...1
canonicalize
function View source
python
def canonicalize(a, q): ...1