mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
Half-gate garbling, native 2D convolution, TensorFlow inference.
This commit is contained in:
17
GC/Program.h
17
GC/Program.h
@@ -24,11 +24,9 @@ enum BreakType {
|
||||
|
||||
template <class T> class Processor;
|
||||
|
||||
template <class T>
|
||||
class Program
|
||||
{
|
||||
vector<Instruction> p;
|
||||
int offline_data_used;
|
||||
|
||||
// Maximal register used
|
||||
unsigned max_reg[MAX_REG_TYPE];
|
||||
@@ -36,9 +34,6 @@ class Program
|
||||
// Memory size used directly
|
||||
unsigned max_mem[MAX_REG_TYPE];
|
||||
|
||||
// True if program contains variable-sized loop
|
||||
bool unknown_usage;
|
||||
|
||||
void compute_constants();
|
||||
|
||||
public:
|
||||
@@ -50,24 +45,14 @@ class Program
|
||||
void parse(const string& programe);
|
||||
void parse(istream& s);
|
||||
|
||||
int get_offline_data_used() const { return offline_data_used; }
|
||||
void print_offline_cost() const;
|
||||
|
||||
bool usage_unknown() const { return unknown_usage; }
|
||||
|
||||
unsigned num_reg(RegType reg_type) const
|
||||
{ return max_reg[reg_type]; }
|
||||
|
||||
const unsigned* direct_mem(RegType reg_type) const
|
||||
{ return &max_mem[reg_type]; }
|
||||
|
||||
template<class U>
|
||||
template<class T, class U>
|
||||
BreakType execute(Processor<T>& Proc, U& dynamic_memory, int PC = -1) const;
|
||||
|
||||
bool done(Processor<T>& Proc) const { return Proc.PC >= p.size(); }
|
||||
|
||||
template <class U>
|
||||
Program<U>& cast() { return *reinterpret_cast< Program<U>* >(this); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user