use miden::core::crypto::hashes::poseidon2
#! Processes the out-of-domain (OOD) evaluations of all committed polynomials.
#!
#! Takes as input an Poseidon2 hasher state and a pointer, and loads from the advice provider the OOD
#! evaluations and stores at memory region using pointer `ptr` while absorbing the evaluations
#! into the hasher state and simultaneously computing a random linear combination using Horner
#! evaluation.
#!
#!
#! Inputs: [R0, R1, C, ptr, acc0, acc1]
#! Outputs: [R0, R1, C, ptr, acc0`, acc1`]
#!
#! Cycles: 78
pub proc process_row_ood_evaluations
# Per-row OOD layout matches the LMCS aligned wire format (alignment = 8 for
# Poseidon2). Multi-AIR (CoreAir + ChipletsAir, after combined-circuit codegen
# uses LMCS-aligned per-AIR widths):
# main: ceil(51/8)·8 + ceil(22/8)·8 = 56 + 24 = 80 EFs
# aux: ceil(8/8)·8 + ceil(6/8)·8 = 8 + 8 = 16 EFs
# quot: 16 = 16 EFs
# total per row = 112 EFs = 224 felts
# 224 / 8 = 28 iterations.
repeat.28
adv_pipe
horner_eval_ext
# Bind the absorbed length (8) into the capacity before each absorb permutation.
movup.8 add.8 movdn.8
exec.poseidon2::permute
end
end