Skip to main content

BatchQueryMerkle

Trait BatchQueryMerkle 

Source
pub trait BatchQueryMerkle:
    Copy
    + Sized
    + 'static {
    // Required method
    fn reconstruct_from_f(out: &[F], base: usize) -> Self;
}
Expand description

Trait for reconstructing a digest from a flat slice of F elements as produced by the query_digest_layers CUDA kernel.

Both Digest = [F; 8] (BabyBear Poseidon2) and Bn254Digest = [Bn254Scalar; 1] occupy exactly DIGEST_SIZE * size_of::<F>() = 32 bytes, so the same kernel can be reused for both.

Required Methods§

Source

fn reconstruct_from_f(out: &[F], base: usize) -> Self

Reconstruct one digest from DIGEST_SIZE consecutive F-valued words in out starting at index base.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§