RandomKernels

LLVM-oriented PRNG helpers shared with genetic algorithms and Monte Carlo. Prefer these over ``Random.ae`` inside ``@llvm`` / ``@gpu`` bodies: they are pure ``Int`` steps with no Python ``random`` object. Call sites that need a compiled kernel should re-export or wrap them under ``@llvm`` / ``@gpu`` (see ``examples/knapsack_ga.ae`` for a functional GA; use these helpers inside ``@llvm`` / ``@gpu`` kernels when you need a compiled PRNG).
Table of Contents

Functions

mod_nonneg

def mod_nonneg (value : Int) (modulus : Int) : Int

lcg_next

def lcg_next (state : Int) : Int

lcg_bounded

def lcg_bounded (state : Int) (bound : Int) : Int