set_num_threads(n) caps the number of OpenMP threads used by
every subsequent kernel dispatch. get_num_threads() reports the
current cap.
Value
set_num_threads invisibly returns n. get_num_threads
returns the current OpenMP max-threads value.
Details
dafr's kernels default to the system's OpenMP maximum (typically
OMP_NUM_THREADS or the machine's CPU count). CRAN policy allows
at most two cores for package checks, and .onLoad() detects
CRAN-like environments (via _R_CHECK_LIMIT_CORES_ or an
OMP_THREAD_LIMIT ≤ 2) and caps to 2 automatically. Interactive
users can raise or lower the cap at any time.