pub fn binary_fold_high<P, DataOut, DataIn>(
values: &mut FieldBuffer<P, DataOut>,
tensor: &FieldBuffer<P, DataIn>,
bits: impl RandomAccessSequence<bool> + Sync,
) -> Result<(), Error>
Expand description
Computes the fold high of a binary multilinear with a fold tensor.
Binary multilinear is represented transparently by a boolean sequence. Fold high meaning: for every hypercube vertex of the result, we specialize lower indexed variables of the binary multilinear to the vertex coordinates and take an inner product of the remaining multilinear and the tensor.
This method is single threaded.
ยงThrows
PowerOfTwoLengthRequired
if the bool sequence is not of power of two length.FoldLengthMismatch
if the tensor, result and binary multilinear lengths do not add up.