Function with_calibration_tape
fn with_calibration_tape<T>(
f: impl FnOnce(&mut Tape<f64>, &mut Vec<f64>) -> T,
) -> TExpand description
Runs f on this thread’s calibration tape and adjoint buffer: created on
the first call, kept at the largest capacity either ever reached, the tape
cleared on every recording. Its own rather than the trading layer’s — that
one is the tape a risk pass is recording on, and a calibration inside a
risk pass has already been routed away from here.
The buffer is kept for the same reason the tape is: a forty-pillar ladder’s is 2.5 MB, and a fresh allocation of that size per calibration is page faults the sweep then pays for.