Maintenance.

This commit is contained in:
Marcel Keller
2023-05-09 14:49:52 +10:00
parent c62ab2ca1e
commit 6cc3fccef0
135 changed files with 1658 additions and 1062 deletions

View File

@@ -26,6 +26,7 @@ public:
void set_protocol(DealerSecret::Protocol& protocol)
{
P = &protocol.P;
BufferPrep<DealerSecret>::P = P;
}
void buffer_triples()

View File

@@ -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 {}; }

View File

@@ -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);

View File

@@ -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>

View File

@@ -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();

View File

@@ -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()

View File

@@ -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;
}

View File

@@ -105,6 +105,11 @@ public:
*this = a + b;
}
This operator^(const This& other) const
{
return *this + other;
}
This& operator^=(const This& other)
{
*this += other;

View File

@@ -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