Trait ChipUsageGetter

Source
pub trait ChipUsageGetter {
    // Required methods
    fn air_name(&self) -> String;
    fn current_trace_height(&self) -> usize;
    fn trace_width(&self) -> usize;

    // Provided methods
    fn constant_trace_height(&self) -> Option<usize> { ... }
    fn current_trace_cells(&self) -> usize { ... }
}
Expand description

A trait to get chip usage information.

Required Methods§

Source

fn air_name(&self) -> String

Source

fn current_trace_height(&self) -> usize

Height of used rows in the main trace.

Source

fn trace_width(&self) -> usize

Width of the main trace

Provided Methods§

Source

fn constant_trace_height(&self) -> Option<usize>

If the chip has a state-independent trace height that is determined upon construction, return this height. This is used to distinguish “static” versus “dynamic” usage metrics.

Source

fn current_trace_cells(&self) -> usize

For metrics collection

Implementations on Foreign Types§

Source§

impl<C: ChipUsageGetter> ChipUsageGetter for Rc<C>

Source§

impl<C: ChipUsageGetter> ChipUsageGetter for Arc<C>

Source§

impl<C: ChipUsageGetter> ChipUsageGetter for RefCell<C>

Source§

impl<C: ChipUsageGetter> ChipUsageGetter for Mutex<C>

Implementors§

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for Fp2AddSubChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for Fp2MulDivChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for ModularAddSubChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for ModularMulDivChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F, A, M> ChipUsageGetter for VmChipWrapper<F, A, M>
where A: VmAdapterChip<F> + Sync, M: VmCoreChip<F, A::Interface> + Sync,

impl<F: PrimeField32, const SBOX_REGISTERS: usize> ChipUsageGetter for Poseidon2PeripheryBaseChip<F, SBOX_REGISTERS>

impl<const CHUNK: usize, F: PrimeField32> ChipUsageGetter for MemoryMerkleChip<CHUNK, F>

impl<const M: usize> ChipUsageGetter for XorLookupChip<M>

impl<const NUM_BITS: usize> ChipUsageGetter for BitwiseOperationLookupChip<NUM_BITS>

impl<const NUM_BITS: usize> ChipUsageGetter for SharedBitwiseOperationLookupChip<NUM_BITS>

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcAddNeChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcDoubleChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 1, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: Field, const SBOX_REGISTERS: usize> ChipUsageGetter for NativePoseidon2Chip<F, SBOX_REGISTERS>

impl<F: PrimeField32, const BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for Fp12MulChip<F, BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, BLOCKS, BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcLineMulBy01234Chip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcLineMulBy02345Chip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS1: usize, const INPUT_BLOCKS2: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EvaluateLineChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapTwoReadsAdapterChip<F, INPUT_BLOCKS1, INPUT_BLOCKS2, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcLineMul013By013Chip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for EcLineMul023By023Chip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for MillerDoubleAndAddStepChip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 2, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,

impl<F: PrimeField32, const INPUT_BLOCKS: usize, const OUTPUT_BLOCKS: usize, const BLOCK_SIZE: usize> ChipUsageGetter for MillerDoubleStepChip<F, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE>
where VmChipWrapper<F, Rv32VecHeapAdapterChip<F, 1, INPUT_BLOCKS, OUTPUT_BLOCKS, BLOCK_SIZE, BLOCK_SIZE>, FieldExpressionCoreChip>: ChipUsageGetter,