RiscvAirId

Enum RiscvAirId 

Source
pub enum RiscvAirId {
Show 45 variants Cpu = 0, Program = 1, ShaExtend = 2, ShaCompress = 3, EdAddAssign = 4, EdDecompress = 5, Secp256k1Decompress = 6, Secp256k1AddAssign = 7, Secp256k1DoubleAssign = 8, Secp256r1Decompress = 9, Secp256r1AddAssign = 10, Secp256r1DoubleAssign = 11, KeccakPermute = 12, Bn254AddAssign = 13, Bn254DoubleAssign = 14, Bls12381AddAssign = 15, Bls12381DoubleAssign = 16, Uint256MulMod = 17, U256XU2048Mul = 18, Bls12381FpOpAssign = 19, Bls12381Fp2AddSubAssign = 20, Bls12381Fp2MulAssign = 21, Bn254FpOpAssign = 22, Bn254Fp2AddSubAssign = 23, Bn254Fp2MulAssign = 24, Bls12381Decompress = 25, SyscallCore = 26, SyscallPrecompile = 27, DivRem = 28, AddSub = 29, Bitwise = 30, Mul = 31, ShiftRight = 32, ShiftLeft = 33, Lt = 34, MemoryInstrs = 35, Auipc = 36, Branch = 37, Jump = 38, SyscallInstrs = 39, MemoryGlobalInit = 40, MemoryGlobalFinalize = 41, MemoryLocal = 42, Global = 43, Byte = 44,
}
Expand description

RV32IM AIR Identifiers.

These identifiers are for the various chips in the rv32im prover. We need them in the executor to compute the memory cost of the current shard of execution.

The CoreAirIds are the AIRs that are not part of precompile shards and not the program or byte AIR.

Variants§

§

Cpu = 0

The CPU chip.

§

Program = 1

The program chip.

§

ShaExtend = 2

The SHA-256 extend chip.

§

ShaCompress = 3

The SHA-256 compress chip.

§

EdAddAssign = 4

The Edwards add assign chip.

§

EdDecompress = 5

The Edwards decompress chip.

§

Secp256k1Decompress = 6

The secp256k1 decompress chip.

§

Secp256k1AddAssign = 7

The secp256k1 add assign chip.

§

Secp256k1DoubleAssign = 8

The secp256k1 double assign chip.

§

Secp256r1Decompress = 9

The secp256r1 decompress chip.

§

Secp256r1AddAssign = 10

The secp256r1 add assign chip.

§

Secp256r1DoubleAssign = 11

The secp256r1 double assign chip.

§

KeccakPermute = 12

The Keccak permute chip.

§

Bn254AddAssign = 13

The bn254 add assign chip.

§

Bn254DoubleAssign = 14

The bn254 double assign chip.

§

Bls12381AddAssign = 15

The bls12-381 add assign chip.

§

Bls12381DoubleAssign = 16

The bls12-381 double assign chip.

§

Uint256MulMod = 17

The uint256 mul mod chip.

§

U256XU2048Mul = 18

The u256 xu2048 mul chip.

§

Bls12381FpOpAssign = 19

The bls12-381 fp op assign chip.

§

Bls12381Fp2AddSubAssign = 20

The bls12-831 fp2 add sub assign chip.

§

Bls12381Fp2MulAssign = 21

The bls12-831 fp2 mul assign chip.

§

Bn254FpOpAssign = 22

The bn254 fp2 add sub assign chip.

§

Bn254Fp2AddSubAssign = 23

The bn254 fp op assign chip.

§

Bn254Fp2MulAssign = 24

The bn254 fp2 mul assign chip.

§

Bls12381Decompress = 25

The bls12-381 decompress chip.

§

SyscallCore = 26

The syscall core chip.

§

SyscallPrecompile = 27

The syscall precompile chip.

§

DivRem = 28

The div rem chip.

§

AddSub = 29

The add sub chip.

§

Bitwise = 30

The bitwise chip.

§

Mul = 31

The mul chip.

§

ShiftRight = 32

The shift right chip.

§

ShiftLeft = 33

The shift left chip.

§

Lt = 34

The lt chip.

§

MemoryInstrs = 35

The memory instructions chip.

§

Auipc = 36

The auipc chip.

§

Branch = 37

The branch chip.

§

Jump = 38

The jump chip.

§

SyscallInstrs = 39

The syscall instructions chip.

§

MemoryGlobalInit = 40

The memory global init chip.

§

MemoryGlobalFinalize = 41

The memory global finalize chip.

§

MemoryLocal = 42

The memory local chip.

§

Global = 43

The global chip.

§

Byte = 44

The byte chip.

Implementations§

Source§

impl RiscvAirId

Source

pub fn core() -> Vec<RiscvAirId>

Returns the AIRs that are not part of precompile shards and not the program or byte AIR.

Source

pub fn is_core(self) -> bool

TODO replace these three with subenums or something Whether the ID represents a core AIR.

Source

pub fn is_memory(self) -> bool

Whether the ID represents a memory AIR.

Source

pub fn is_precompile(self) -> bool

Whether the ID represents a precompile AIR.

Source

pub fn rows_per_event(&self) -> usize

The number of rows in the AIR produced by each event.

Source

pub fn as_str(&self) -> &'static str

Returns the string representation of the AIR.

Trait Implementations§

Source§

impl Clone for RiscvAirId

Source§

fn clone(&self) -> RiscvAirId

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RiscvAirId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RiscvAirId

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for RiscvAirId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
Source§

impl Enum for RiscvAirId

Source§

const LENGTH: usize = 45usize

Length of the enum.
Source§

fn from_usize(value: usize) -> Self

Takes an usize, and returns an element matching into_usize function.
Source§

fn into_usize(self) -> usize

Returns an unique identifier for a value within range of 0..Array::LENGTH.
Source§

impl<V> EnumArray<V> for RiscvAirId

Source§

type Array = [V; 45]

Representation of an enum map for type V.
Source§

impl<'_derivative_strum> From<&'_derivative_strum RiscvAirId> for &'static str

Source§

fn from(x: &'_derivative_strum RiscvAirId) -> &'static str

Converts to this type from the input type.
Source§

impl From<CoreAirId> for RiscvAirId

Source§

fn from(child: CoreAirId) -> Self

Converts to this type from the input type.
Source§

impl From<RiscvAirId> for &'static str

Source§

fn from(x: RiscvAirId) -> &'static str

Converts to this type from the input type.
Source§

impl FromStr for RiscvAirId

Source§

type Err = String

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for RiscvAirId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoEnumIterator for RiscvAirId

Source§

impl Ord for RiscvAirId

Source§

fn cmp(&self, other: &RiscvAirId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<CoreAirId> for RiscvAirId

Source§

fn eq(&self, other: &CoreAirId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<RiscvAirId> for CoreAirId

Source§

fn eq(&self, other: &RiscvAirId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for RiscvAirId

Source§

fn eq(&self, other: &RiscvAirId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for RiscvAirId

Source§

fn partial_cmp(&self, other: &RiscvAirId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for RiscvAirId

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<RiscvAirId> for CoreAirId

Source§

type Error = CoreAirIdConvertError

The type returned in the event of a conversion error.
Source§

fn try_from( parent: RiscvAirId, ) -> Result<Self, <Self as TryFrom<RiscvAirId>>::Error>

Performs the conversion.
Source§

impl Copy for RiscvAirId

Source§

impl Eq for RiscvAirId

Source§

impl StructuralPartialEq for RiscvAirId

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToString for T
where T: Display + ?Sized,

§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> JsonSchemaMaybe for T