Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::SlabVectorSelector< FF > Class Template Reference

Selector backed by a slab allocator vector. More...

#include <execution_trace_block.hpp>

Inheritance diagram for bb::SlabVectorSelector< FF >:
bb::Selector< FF >

Public Member Functions

void emplace_back (int i) override
 Append an integer value to the selector.
 
void push_back (const FF &value) override
 Push a field element to the selector.
 
void set_back (int value) override
 Set the last value using integer.
 
void set (size_t idx, int i) override
 Set the value at index using integer.
 
void set (size_t idx, const FF &value) override
 Set the value at index using a field element.
 
void resize (size_t new_size) override
 Resize the selector.
 
bool operator== (const SlabVectorSelector &other) const
 
const FFoperator[] (size_t i) const override
 Get value at specified index.
 
const FFback () const override
 Get the last value in the selector.
 
size_t size () const override
 Get the number of elements.
 
bool empty () const override
 Check if the selector is empty.
 
- Public Member Functions inherited from bb::Selector< FF >
 Selector ()=default
 
virtual ~Selector ()=default
 
 Selector (const Selector &)=default
 
Selectoroperator= (const Selector &)=default
 
 Selector (Selector &&)=delete
 
Selectoroperator= (Selector &&)=delete
 
void emplace_back (const FF &value)
 Append a field element to the selector.
 

Private Attributes

SlabVector< FFdata
 

Detailed Description

template<typename FF>
class bb::SlabVectorSelector< FF >

Selector backed by a slab allocator vector.

Allows dynamic values with fast memory allocation from slabs.

Template Parameters
FFThe finite field element type.

Definition at line 194 of file execution_trace_block.hpp.

Member Function Documentation

◆ back()

template<typename FF >
const FF & bb::SlabVectorSelector< FF >::back ( ) const
inlineoverridevirtual

Get the last value in the selector.

Returns
Reference to the last field element.

Implements bb::Selector< FF >.

Definition at line 208 of file execution_trace_block.hpp.

◆ emplace_back()

template<typename FF >
void bb::SlabVectorSelector< FF >::emplace_back ( int  value)
inlineoverridevirtual

Append an integer value to the selector.

Parameters
valueMust be convertible to FF.

Implements bb::Selector< FF >.

Definition at line 198 of file execution_trace_block.hpp.

◆ empty()

template<typename FF >
bool bb::SlabVectorSelector< FF >::empty ( ) const
inlineoverridevirtual

Check if the selector is empty.

Implements bb::Selector< FF >.

Definition at line 211 of file execution_trace_block.hpp.

◆ operator==()

template<typename FF >
bool bb::SlabVectorSelector< FF >::operator== ( const SlabVectorSelector< FF > &  other) const
inline

Definition at line 205 of file execution_trace_block.hpp.

◆ operator[]()

template<typename FF >
const FF & bb::SlabVectorSelector< FF >::operator[] ( size_t  index) const
inlineoverridevirtual

Get value at specified index.

Parameters
indexIndex of the element.
Returns
Reference to the field element at index.

Implements bb::Selector< FF >.

Definition at line 207 of file execution_trace_block.hpp.

◆ push_back()

template<typename FF >
void bb::SlabVectorSelector< FF >::push_back ( const FF value)
inlineoverridevirtual

Push a field element to the selector.

Parameters
valueField element to add.

Implements bb::Selector< FF >.

Definition at line 199 of file execution_trace_block.hpp.

◆ resize()

template<typename FF >
void bb::SlabVectorSelector< FF >::resize ( size_t  new_size)
inlineoverridevirtual

Resize the selector.

Parameters
new_sizeThe new size.

Implements bb::Selector< FF >.

Definition at line 203 of file execution_trace_block.hpp.

◆ set() [1/2]

template<typename FF >
void bb::SlabVectorSelector< FF >::set ( size_t  idx,
const FF value 
)
inlineoverridevirtual

Set the value at index using a field element.

Parameters
idxIndex.
valueField element.

Implements bb::Selector< FF >.

Definition at line 202 of file execution_trace_block.hpp.

◆ set() [2/2]

template<typename FF >
void bb::SlabVectorSelector< FF >::set ( size_t  idx,
int  value 
)
inlineoverridevirtual

Set the value at index using integer.

Parameters
idxIndex.
valueInteger value.

Implements bb::Selector< FF >.

Definition at line 201 of file execution_trace_block.hpp.

◆ set_back()

template<typename FF >
void bb::SlabVectorSelector< FF >::set_back ( int  value)
inlineoverridevirtual

Set the last value using integer.

Parameters
valueInteger value.

Implements bb::Selector< FF >.

Definition at line 200 of file execution_trace_block.hpp.

◆ size()

template<typename FF >
size_t bb::SlabVectorSelector< FF >::size ( ) const
inlineoverridevirtual

Get the number of elements.

Implements bb::Selector< FF >.

Definition at line 210 of file execution_trace_block.hpp.

Member Data Documentation

◆ data

template<typename FF >
SlabVector<FF> bb::SlabVectorSelector< FF >::data
private

Definition at line 214 of file execution_trace_block.hpp.


The documentation for this class was generated from the following file: