fn quat_scan_backward<B: Backend>(
q_bshj4: F<B, 5>,
init_bhj4: F<B, 4>,
d_cum_bshj4: F<B, 5>,
) -> (F<B, 5>, F<B, 4>)Expand description
Recompute-based gradient of the quaternion cumulative product.
Given the saved inputs (q, init) and the upstream cotangent d_cum,
recomputes the prefix product P and returns (d_q, d_init) via the
closed-form unit-quaternion VJP documented in the module header. All ops are
parallel (a prefix product + a reverse-cumsum); there is no token loop.