forked from data61/MP-SPDZ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFieldMachine.h
48 lines (40 loc) · 1.33 KB
/
FieldMachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* DishonestMajorityFieldMachine.h
*
*/
#ifndef PROCESSOR_FIELDMACHINE_H_
#define PROCESSOR_FIELDMACHINE_H_
#include "RingMachine.h"
#include "HonestMajorityMachine.h"
#include "Tools/ezOptionParser.h"
#include "Math/gfp.h"
#include "OnlineOptions.hpp"
template<template<class T> class U, class V = HonestMajorityMachine>
class HonestMajorityFieldMachine
{
public:
HonestMajorityFieldMachine(int argc, const char** argv);
HonestMajorityFieldMachine(int argc, const char** argv, ez::ezOptionParser& opt,
int nplayers = 3);
};
template<template<class T> class U, template<class T> class V, class W, class X = gf2n>
class FieldMachine
{
public:
FieldMachine(int argc, const char** argv, ez::ezOptionParser& opt,
OnlineOptions& online_opts, int nplayers = 0);
};
template<template<class U> class T, template<class U> class V = T,
class W = gf2n, class X = DishonestMajorityMachine>
class DishonestMajorityFieldMachine
{
public:
DishonestMajorityFieldMachine(int argc, const char** argv,
ez::ezOptionParser& opt, bool live_prep_default = true)
{
OnlineOptions& online_opts = OnlineOptions::singleton;
online_opts = {opt, argc, argv, T<gfp0>(), live_prep_default};
FieldMachine<T, V, X, W>(argc, argv, opt, online_opts);
}
};
#endif /* PROCESSOR_FIELDMACHINE_H_ */