Skip to main content

ProfilingBackend

Struct ProfilingBackend 

Source
pub struct ProfilingBackend { /* private fields */ }
Expand description

Profiling backend for ZKBoo circuits.

Implementations§

Source§

impl ProfilingBackend

Source

pub fn new() -> Self

Create a new profiling backend.

Source

pub fn into_profiler(self) -> Frontend<Self>

Wraps this profiling backend into a Frontend.

Alias of Backend::into_frontend.

Trait Implementations§

Source§

impl Backend for ProfilingBackend

Source§

type FinalizeArg = ()

Type for data to be passed to the backend finalizer.
Source§

type FinalizeResult = ProfilingData

Type for the finalization result of the backend.
Source§

fn finalize(self, _arg: Self::FinalizeArg) -> Self::FinalizeResult

Finalizes the backend, returning a finalization result.
Source§

fn input<W: Word, const N: usize>( &mut self, _word: CompositeWord<W, N>, ) -> WordIdx<W, N>

Allocates an input word in the backend, returning the allocated index. Read more
Source§

fn alloc<W: Word, const N: usize>(&mut self) -> WordIdx<W, N>

Allocates a word in the backend, returning the allocated index. ⚠️ Warning: the word value is uninitialised.
Source§

fn constant<W: Word, const N: usize>( &mut self, _word: CompositeWord<W, N>, _out: WordIdx<W, N>, )

Writes a constant word to the given index.
Source§

fn from_le_words<W: Word, const N: usize>( &mut self, _ins: [WordIdx<W, 1>; N], _out: WordIdx<W, N>, )

Packs a little-endian array of machine words into a single composite word, storing the result at the given output index.
Source§

fn to_le_words<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _outs: [WordIdx<W, 1>; N], )

Unpacks a composite word into a little-endian array of machine words, storing the result at the given output indices.
Source§

fn output<W: Word, const N: usize>(&mut self, _out: WordIdx<W, N>)

Pushes the given word onto the outputs.
Source§

fn increase_refcount<W: Word, const N: usize>(&mut self, idx: WordIdx<W, N>)

Increases the reference count of the word at the given index. The token parameter restricts this method from external use.
Source§

fn decrease_refcount<W: Word, const N: usize>(&mut self, idx: WordIdx<W, N>)

Decreases the reference count of the word at the given index. The token parameter restricts this method from external use.
Source§

fn not<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _out: WordIdx<W, N>, )

Performs a bitwise NOT operation on the word at the given input index, storing the result at the given output index.
Source§

fn bitxor<W: Word, const N: usize>( &mut self, _inl: WordIdx<W, N>, _inr: WordIdx<W, N>, _out: WordIdx<W, N>, )

Performs a bitwise XOR operation on the words at the given input indices, storing the result at the given output index.
Source§

fn bitand<W: Word, const N: usize>( &mut self, _inl: WordIdx<W, N>, _inr: WordIdx<W, N>, _out: WordIdx<W, N>, )

Performs a bitwise AND operation on the words at the given input indices, storing the result at the given output index.
Source§

fn bitxor_const<W: Word, const N: usize>( &mut self, _inl: WordIdx<W, N>, _inr: CompositeWord<W, N>, _out: WordIdx<W, N>, )

Performs a bitwise XOR operation on the word at the given input index with given constant, storing the result at the given output index.
Source§

fn bitand_const<W: Word, const N: usize>( &mut self, _inl: WordIdx<W, N>, _inr: CompositeWord<W, N>, _out: WordIdx<W, N>, )

Performs a bitwise AND operation on the word at the given input index with given constant, storing the result at the given output index.
Source§

fn unbounded_shl<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _shift: usize, _out: WordIdx<W, N>, )

Performs a left shift operation on the word at the given input index, storing the result at the given output index.
Source§

fn unbounded_shr<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _shift: usize, _out: WordIdx<W, N>, )

Performs a right shift operation on the word at the given input index, storing the result at the given output index.
Source§

fn rotate_left<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _shift: usize, _out: WordIdx<W, N>, )

Performs a left rotate operation on the word at the given input index, storing the result at the given output index.
Source§

fn rotate_right<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _shift: usize, _out: WordIdx<W, N>, )

Performs a right rotate operation on the word at the given input index, storing the result at the given output index.
Source§

fn reverse_bits<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _out: WordIdx<W, N>, )

Performs a bit-reversal operation on the word at the given input index, storing the result at the given output index.
Source§

fn swap_bytes<W: Word, const N: usize>( &mut self, _in_: WordIdx<W, N>, _out: WordIdx<W, N>, )

Performs a byte-reversal operation on the word at the given input index, storing the result at the given output index.
Source§

fn cast<W: Word, T: Word>(&mut self, _in_: WordIdx<W, 1>, _out: WordIdx<T, 1>)

Casts the word at the given input index to another word type, storing the result at the given output index.
Source§

fn carry<W: Word, const N: usize>( &mut self, _p: WordIdx<W, N>, _g: WordIdx<W, N>, _carry_in: bool, _out: WordIdx<W, N>, )

Computes the carry bits from the given propagate and generate words, storing the result at the given output index. Read more
Source§

fn into_frontend(self) -> Frontend<Self>

Wraps this backend into a Frontend.
Source§

fn alloc_constant<W, const N: usize>( &mut self, word: CompositeWord<W, N>, ) -> WordIdx<W, N>
where W: Word,

Allocates a constant work in the backend, returning the allocated index.
Source§

impl Debug for ProfilingBackend

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.