pub fn hessian_vec<F: Float + BtapeThreadLocal, const N: usize>(
f: impl FnOnce(&[BReverse<F>]) -> BReverse<F>,
x: &[F],
) -> (F, Vec<F>, Vec<Vec<F>>)Available on crate feature
bytecode only.Expand description
Full Hessian matrix via batched forward-over-reverse.
Like hessian but processes N tangent directions simultaneously,
reducing the number of tape traversals from 2n to 2·ceil(n/N).