mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
51 lines
831 B
C++
51 lines
831 B
C++
/*
|
|
* ReplicatedParty.h
|
|
*
|
|
*/
|
|
|
|
#ifndef GC_SHAREPARTY_H_
|
|
#define GC_SHAREPARTY_H_
|
|
|
|
#include "ShareSecret.h"
|
|
#include "Processor.h"
|
|
#include "Program.h"
|
|
#include "Memory.h"
|
|
#include "ThreadMaster.h"
|
|
|
|
namespace GC
|
|
{
|
|
|
|
template<class T>
|
|
class ShareParty : public ThreadMaster<T>
|
|
{
|
|
static ShareParty<T>* singleton;
|
|
|
|
ez::ezOptionParser& opt;
|
|
OnlineOptions online_opts;
|
|
|
|
public:
|
|
static ShareParty& s();
|
|
|
|
typename T::mac_key_type mac_key;
|
|
|
|
ShareParty(int argc, const char** argv, ez::ezOptionParser& opt,
|
|
int default_batch_size = 0);
|
|
|
|
Thread<T>* new_thread(int i);
|
|
|
|
void post_run();
|
|
};
|
|
|
|
template<class T>
|
|
inline ShareParty<T>& ShareParty<T>::s()
|
|
{
|
|
if (singleton)
|
|
return *singleton;
|
|
else
|
|
throw runtime_error("no ShareParty singleton");
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* GC_SHAREPARTY_H_ */
|