Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::crypto::merkle_tree::Signal Class Reference

Used in parallel insertions in the the IndexedTree. Workers signal to other following workes as they move up the level of the tree. More...

#include <signal.hpp>

Public Member Functions

 Signal (uint32_t initial_level=1)
 
 ~Signal ()=default
 
 Signal (const Signal &other)
 
 Signal (const Signal &&other)=delete
 
Signaloperator= (const Signal &other)
 
Signaloperator= (const Signal &&other)=delete
 
void wait_for_level (uint32_t level=0)
 Causes the thread to wait until the required level has been signalled.
 
void signal_level (uint32_t level=0)
 Signals that the given level has been passed.
 
void signal_decrement (uint32_t delta=1)
 

Private Attributes

std::atomic< uint32_t > signal_
 

Detailed Description

Used in parallel insertions in the the IndexedTree. Workers signal to other following workes as they move up the level of the tree.

Definition at line 17 of file signal.hpp.

Constructor & Destructor Documentation

◆ Signal() [1/3]

bb::crypto::merkle_tree::Signal::Signal ( uint32_t  initial_level = 1)
inline

Definition at line 19 of file signal.hpp.

◆ ~Signal()

bb::crypto::merkle_tree::Signal::~Signal ( )
default

◆ Signal() [2/3]

bb::crypto::merkle_tree::Signal::Signal ( const Signal other)
inline

Definition at line 22 of file signal.hpp.

◆ Signal() [3/3]

bb::crypto::merkle_tree::Signal::Signal ( const Signal &&  other)
delete

Member Function Documentation

◆ operator=() [1/2]

Signal & bb::crypto::merkle_tree::Signal::operator= ( const Signal &&  other)
delete

◆ operator=() [2/2]

Signal & bb::crypto::merkle_tree::Signal::operator= ( const Signal other)
inline

Definition at line 26 of file signal.hpp.

◆ signal_decrement()

void bb::crypto::merkle_tree::Signal::signal_decrement ( uint32_t  delta = 1)
inline

Definition at line 60 of file signal.hpp.

◆ signal_level()

void bb::crypto::merkle_tree::Signal::signal_level ( uint32_t  level = 0)
inline

Signals that the given level has been passed.

Parameters
levelThe level to be signalled

Definition at line 54 of file signal.hpp.

◆ wait_for_level()

void bb::crypto::merkle_tree::Signal::wait_for_level ( uint32_t  level = 0)
inline

Causes the thread to wait until the required level has been signalled.

Parameters
levelThe required level

Definition at line 40 of file signal.hpp.

Member Data Documentation

◆ signal_

std::atomic<uint32_t> bb::crypto::merkle_tree::Signal::signal_
private

Definition at line 67 of file signal.hpp.


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