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

Column view over one non-gate selector field of the row-major gate storage. More...

#include <execution_trace_block.hpp>

Inheritance diagram for bb::SelectorColumn< FF, NUM_WIRES >:
bb::Selector< FF >

Public Types

using Tile = GateTile< FF, NUM_WIRES >
 
using Tiles = std::vector< Tile >
 
using Field = std::array< FF, GATE_TILE_SIZE > Tile::*
 

Public Member Functions

 SelectorColumn (Tiles *tiles, const size_t *num_rows, Field field)
 
void set (size_t idx, int value) 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.
 
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
 
bool empty () const override
 
void copy_into (FF *dst, size_t start, size_t count) const override
 Bulk-copy count values of this column starting at start into dst (tile-wise, avoiding a virtual call per element).
 
- 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
 

Private Member Functions

FFat (size_t i)
 

Private Attributes

Tilestiles_
 
const size_t * num_rows_
 
Field field_
 

Detailed Description

template<typename FF, size_t NUM_WIRES>
class bb::SelectorColumn< FF, NUM_WIRES >

Column view over one non-gate selector field of the row-major gate storage.

Definition at line 193 of file execution_trace_block.hpp.

Member Typedef Documentation

◆ Field

template<typename FF , size_t NUM_WIRES>
using bb::SelectorColumn< FF, NUM_WIRES >::Field = std::array<FF, GATE_TILE_SIZE> Tile::*

Definition at line 197 of file execution_trace_block.hpp.

◆ Tile

template<typename FF , size_t NUM_WIRES>
using bb::SelectorColumn< FF, NUM_WIRES >::Tile = GateTile<FF, NUM_WIRES>

Definition at line 195 of file execution_trace_block.hpp.

◆ Tiles

template<typename FF , size_t NUM_WIRES>
using bb::SelectorColumn< FF, NUM_WIRES >::Tiles = std::vector<Tile>

Definition at line 196 of file execution_trace_block.hpp.

Constructor & Destructor Documentation

◆ SelectorColumn()

template<typename FF , size_t NUM_WIRES>
bb::SelectorColumn< FF, NUM_WIRES >::SelectorColumn ( Tiles tiles,
const size_t *  num_rows,
Field  field 
)
inline

Definition at line 199 of file execution_trace_block.hpp.

Member Function Documentation

◆ at()

template<typename FF , size_t NUM_WIRES>
FF & bb::SelectorColumn< FF, NUM_WIRES >::at ( size_t  i)
inlineprivate

Definition at line 234 of file execution_trace_block.hpp.

◆ back()

template<typename FF , size_t NUM_WIRES>
const FF & bb::SelectorColumn< FF, NUM_WIRES >::back ( ) const
inlineoverridevirtual

Get the last value in the selector.

Implements bb::Selector< FF >.

Definition at line 212 of file execution_trace_block.hpp.

◆ copy_into()

template<typename FF , size_t NUM_WIRES>
void bb::SelectorColumn< FF, NUM_WIRES >::copy_into ( FF dst,
size_t  start,
size_t  count 
) const
inlineoverridevirtual

Bulk-copy count values of this column starting at start into dst (tile-wise, avoiding a virtual call per element).

Implements bb::Selector< FF >.

Definition at line 217 of file execution_trace_block.hpp.

◆ empty()

template<typename FF , size_t NUM_WIRES>
bool bb::SelectorColumn< FF, NUM_WIRES >::empty ( ) const
inlineoverridevirtual

Implements bb::Selector< FF >.

Definition at line 215 of file execution_trace_block.hpp.

◆ operator[]()

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

Get value at specified index.

Implements bb::Selector< FF >.

Definition at line 208 of file execution_trace_block.hpp.

◆ set() [1/2]

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

Set the value at index using a field element.

Implements bb::Selector< FF >.

Definition at line 206 of file execution_trace_block.hpp.

◆ set() [2/2]

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

Set the value at index using integer.

Implements bb::Selector< FF >.

Definition at line 205 of file execution_trace_block.hpp.

◆ size()

template<typename FF , size_t NUM_WIRES>
size_t bb::SelectorColumn< FF, NUM_WIRES >::size ( ) const
inlineoverridevirtual

Implements bb::Selector< FF >.

Definition at line 214 of file execution_trace_block.hpp.

Member Data Documentation

◆ field_

template<typename FF , size_t NUM_WIRES>
Field bb::SelectorColumn< FF, NUM_WIRES >::field_
private

Definition at line 238 of file execution_trace_block.hpp.

◆ num_rows_

template<typename FF , size_t NUM_WIRES>
const size_t* bb::SelectorColumn< FF, NUM_WIRES >::num_rows_
private

Definition at line 237 of file execution_trace_block.hpp.

◆ tiles_

template<typename FF , size_t NUM_WIRES>
Tiles* bb::SelectorColumn< FF, NUM_WIRES >::tiles_
private

Definition at line 236 of file execution_trace_block.hpp.


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