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

Column view over the gate selector of one kind in the row-major gate storage: rows whose gate_kind matches read their gate_value, all other rows read zero. More...

#include <execution_trace_block.hpp>

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

Public Types

using Tile = GateTile< FF, NUM_WIRES >
 
using Tiles = std::vector< Tile >
 

Public Member Functions

 GateSelectorColumn (Tiles *tiles, const size_t *num_rows, GateKind kind)
 
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).
 
GateKind kind () const
 
- 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
 

Static Private Member Functions

static const FFzero_value ()
 

Private Attributes

Tilestiles_
 
const size_t * num_rows_
 
GateKind kind_
 

Detailed Description

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

Column view over the gate selector of one kind in the row-major gate storage: rows whose gate_kind matches read their gate_value, all other rows read zero.

Definition at line 245 of file execution_trace_block.hpp.

Member Typedef Documentation

◆ Tile

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

Definition at line 247 of file execution_trace_block.hpp.

◆ Tiles

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

Definition at line 248 of file execution_trace_block.hpp.

Constructor & Destructor Documentation

◆ GateSelectorColumn()

template<typename FF , size_t NUM_WIRES>
bb::GateSelectorColumn< FF, NUM_WIRES >::GateSelectorColumn ( Tiles tiles,
const size_t *  num_rows,
GateKind  kind 
)
inline

Definition at line 250 of file execution_trace_block.hpp.

Member Function Documentation

◆ back()

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

Get the last value in the selector.

Implements bb::Selector< FF >.

Definition at line 277 of file execution_trace_block.hpp.

◆ copy_into()

template<typename FF , size_t NUM_WIRES>
void bb::GateSelectorColumn< 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 282 of file execution_trace_block.hpp.

◆ empty()

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

Implements bb::Selector< FF >.

Definition at line 280 of file execution_trace_block.hpp.

◆ kind()

template<typename FF , size_t NUM_WIRES>
GateKind bb::GateSelectorColumn< FF, NUM_WIRES >::kind ( ) const
inline

Definition at line 298 of file execution_trace_block.hpp.

◆ operator[]()

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

Get value at specified index.

Implements bb::Selector< FF >.

Definition at line 271 of file execution_trace_block.hpp.

◆ set() [1/2]

template<typename FF , size_t NUM_WIRES>
void bb::GateSelectorColumn< 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 257 of file execution_trace_block.hpp.

◆ set() [2/2]

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

Set the value at index using integer.

Implements bb::Selector< FF >.

Definition at line 256 of file execution_trace_block.hpp.

◆ size()

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

Implements bb::Selector< FF >.

Definition at line 279 of file execution_trace_block.hpp.

◆ zero_value()

template<typename FF , size_t NUM_WIRES>
static const FF & bb::GateSelectorColumn< FF, NUM_WIRES >::zero_value ( )
inlinestaticprivate

Definition at line 301 of file execution_trace_block.hpp.

Member Data Documentation

◆ kind_

template<typename FF , size_t NUM_WIRES>
GateKind bb::GateSelectorColumn< FF, NUM_WIRES >::kind_
private

Definition at line 309 of file execution_trace_block.hpp.

◆ num_rows_

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

Definition at line 308 of file execution_trace_block.hpp.

◆ tiles_

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

Definition at line 307 of file execution_trace_block.hpp.


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