pub(crate) fn pullback<G: Cotangent, const A: usize>(
cotangent: &[G],
size: usize,
message: &str,
lengths: [usize; A],
parallel: Parallel,
f: impl Fn(usize, &G) -> Result<[Complex; A]> + Sync + Send,
) -> Result<[Vec<Complex>; A]>Expand description
Pull back an elementwise evaluation with A broadcast complex arguments of the
given lengths. The cotangent needs one finite entry per output (otherwise
message is returned); f(i, g) gives the argument cotangents of output i.