MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
31 #include <unordered_set>
61 const std::atomic<bool>&
IsReady() const noexcept;
69 static std::string
PrintIds(
const std::vector<std::shared_ptr<Wire>>& wires);
105 void InitializationHelper();
BooleanWire(BooleanWire &)=delete
std::size_t n_simd_
Number of values that are logically processed in parallel.
Definition: wire.h:86
Backend & backend_
Definition: wire.h:83
CircuitType GetCircuitType() const final
Definition: wire.h:116
boost::fibers::mutex & GetMutex() noexcept
Get the mutex.
Definition: fiber_condition.h:76
void Clear()
Definition: wire.h:73
CircuitType
Definition: typedefs.h:165
~BooleanWire() override=default
std::int64_t wire_id_
Definition: wire.h:94
std::shared_ptr< Wire > WirePointer
Definition: register.h:40
virtual ~Wire()
Definition: wire.cpp:45
Wraps a boost::fibers::condition_variable with a boost::fibers::mutex and a condition checking functi...
Definition: fiber_condition.h:35
virtual void DynamicClear()
Definition: wire.h:102
void NotifyAll() const noexcept
Unblocks all threads waiting for condition_variable_.
Definition: fiber_condition.h:71
std::unordered_set< std::size_t > waiting_gate_ids_
Definition: wire.h:96
virtual bool IsConstant() const noexcept=0
std::size_t GetWireId() const
Definition: wire.h:65
const FiberCondition & GetIsReadyCondition() const noexcept
Definition: wire.h:63
std::atomic< bool > is_done_
Definition: wire.h:90
Wire(const Wire &)=delete
const RegisterPointer & GetRegister() const noexcept
Definition: backend.h:101
Definition: algorithm_description.cpp:35
FiberCondition is_done_condition_
Definition: wire.h:92
const auto & GetWaitingGatesIds() const noexcept
Definition: wire.h:59
std::shared_ptr< Gate > GatePointer
Definition: backend.h:64
virtual enum MpcProtocol GetProtocol() const =0
Backend & GetBackend() const
Definition: wire.h:67
virtual enum CircuitType GetCircuitType() const =0
void SetOnlineFinished()
Definition: wire.cpp:52
static void SignalReadyToDependency(std::size_t gate_id, Backend &backend)
Definition: wire.cpp:80
MpcProtocol
Definition: typedefs.h:140
std::shared_ptr< BooleanWire > BooleanWirePointer
Definition: wire.h:124
BooleanWire(Backend &backend, std::size_t number_of_simd)
Definition: wire.h:121
std::size_t GetNumberOfSimdValues() const
Definition: wire.cpp:36
const std::atomic< bool > & IsReady() const noexcept
Definition: wire.cpp:69
virtual std::size_t GetBitLength() const =0
void RegisterWaitingGate(std::size_t gate_id)
Definition: wire.cpp:47
const GatePointer & GetGate(std::size_t gate_id) const
Definition: backend.cpp:163
static std::string PrintIds(const std::vector< std::shared_ptr< Wire >> &wires)
Definition: wire.cpp:71