nx_simd_usat_shift_test.nx
buildroot/runtime/nx_simd_usat_shift_test.nx
about
nx_simd_usat_shift_test.nx -- unsigned saturating arith + per-lane shifts (i16x16).
Two primitive families exercised in one smoke:
vsaddu / vssubu -- unsigned saturating add/sub. Required for
RGBA channel data (signed sat would clip at 32767 instead of
65535, mangling bright channels). Maps to vpaddusw/vpsubusw
on x86 and vsaddu.vv/vssubu.vv on RV-V.
vsll / vsrl / vsra -- per-lane immediate shifts. Image
processing channel shuffles (pack ARGB into 5-6-5), crypto
round shifts, fast pow-of-2 multiply/divide. Maps to
vpsllw/vpsrlw/vpsraw on x86 and vsll.vx/vsrl.vx/vsra.vx on RV-V.
dependencies 2 imports · 0 importers
imports: nx_kernel_v2.nxnx_log.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func pack4_i16(a: i64, b: i64, c: i64, d: i64) -> i64 |
| 25 | func t1_vsaddu_clamp_high() -> i64 |
| 55 | func t2_vssubu_clamp_low() -> i64 |
| 87 | func t3_vsll_shift_left() -> i64 |
| 107 | func t4_vsrl_shift_right_logical() -> i64 |
| 126 | func t5_vsra_shift_right_arithmetic() -> i64 |
| 144 | func main() -> nx_exit |