mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
Maintenance.
This commit is contained in:
@@ -26,6 +26,7 @@ public:
|
||||
void set_protocol(DealerSecret::Protocol& protocol)
|
||||
{
|
||||
P = &protocol.P;
|
||||
BufferPrep<DealerSecret>::P = P;
|
||||
}
|
||||
|
||||
void buffer_triples()
|
||||
|
||||
@@ -183,6 +183,8 @@ public:
|
||||
NoShare operator-(const NoShare&) const { fail(); return {}; }
|
||||
NoShare operator*(const NoValue&) const { fail(); return {}; }
|
||||
|
||||
NoShare operator^(const NoShare&) const { fail(); return {}; }
|
||||
|
||||
NoShare operator&(int) const { fail(); return {}; }
|
||||
NoShare operator>>(int) const { fail(); return {}; }
|
||||
|
||||
|
||||
@@ -123,7 +123,9 @@ BreakType Program::execute(Processor<T>& Proc, U& dynamic_memory,
|
||||
}
|
||||
time++;
|
||||
#ifdef DEBUG_COMPLEXITY
|
||||
cout << "complexity at " << time << ": " << Proc.complexity << endl;
|
||||
cout << T::part_type::name() << " complexity at " << time << ": " <<
|
||||
Proc.complexity << " after " << hex <<
|
||||
instruction.get_opcode() << dec << endl;
|
||||
#endif
|
||||
}
|
||||
while (Proc.complexity < (size_t) OnlineOptions::singleton.batch_size);
|
||||
|
||||
@@ -39,6 +39,7 @@ void RepPrep<T>::set_protocol(typename T::Protocol& protocol)
|
||||
return;
|
||||
|
||||
this->protocol = new ReplicatedBase(protocol.P);
|
||||
this->P = &protocol.P;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
||||
@@ -89,7 +89,7 @@ void Secret<T>::random(int n_bits, int128 share)
|
||||
{
|
||||
(void)share;
|
||||
if (n_bits > 128)
|
||||
throw not_implemented();
|
||||
throw runtime_error("too many bits");
|
||||
resize_regs(n_bits);
|
||||
for (int i = 0; i < n_bits; i++)
|
||||
get_reg(i).random();
|
||||
|
||||
@@ -37,6 +37,7 @@ void SemiPrep::set_protocol(SemiSecret::Protocol& protocol)
|
||||
protocol.P.N, -1, OnlineOptions::singleton.batch_size,
|
||||
1, params, {}, &protocol.P);
|
||||
triple_generator->multi_threaded = false;
|
||||
this->P = &protocol.P;
|
||||
}
|
||||
|
||||
void SemiPrep::buffer_triples()
|
||||
|
||||
@@ -103,9 +103,7 @@ void ThreadMaster<T>::run()
|
||||
|
||||
machine.print_timers();
|
||||
|
||||
cerr << "Data sent = " << stats.sent * 1e-6 << " MB" << endl;
|
||||
|
||||
machine.print_global_comm(*P, stats);
|
||||
machine.print_comm(*P, stats);
|
||||
|
||||
delete P;
|
||||
}
|
||||
|
||||
@@ -105,6 +105,11 @@ public:
|
||||
*this = a + b;
|
||||
}
|
||||
|
||||
This operator^(const This& other) const
|
||||
{
|
||||
return *this + other;
|
||||
}
|
||||
|
||||
This& operator^=(const This& other)
|
||||
{
|
||||
*this += other;
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
X(THRESHOLD, I0 = T::threshold(Thread<T>::s().P->num_players())) \
|
||||
X(PLAYERID, I0 = Thread<T>::s().P->my_num()) \
|
||||
X(CRASH, if (I0.get()) throw crash_requested()) \
|
||||
X(ACTIVE, ) \
|
||||
|
||||
#define INSTRUCTIONS BIT_INSTRUCTIONS GC_INSTRUCTIONS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user