MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / FieldMachine

Method FieldMachine

Processor/FieldMachine.hpp:33–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32template<template<class U> class T, template<class U> class V, class W, class X>
33FieldMachine<T, V, W, X>::FieldMachine(int argc, const char** argv,
34 ez::ezOptionParser& opt, OnlineOptions& online_opts, int nplayers)
35{
36 assert(nplayers or T<gfpvar>::variable_players);
37 W machine(argc, argv, opt, online_opts, X(), nplayers);
38 int n_limbs = online_opts.prime_limbs();
39 cerr << "Trying to run " << online_opts.prime_length()
40 << "-bit computation (" << n_limbs * 64 << "-bit representation)"
41 << endl;
42 switch (n_limbs)
43 {
44#undef X
45#define X(L) \
46 case L: \
47 machine.template run<T<gfp_<0, L>>, V<X>>(); \
48 break;
49#ifndef FEWER_PRIMES
50 X(1) X(2) X(3) X(4)
51#endif
52#if GFP_MOD_SZ > 4 or defined(FEWER_PRIMES)
53 X(GFP_MOD_SZ)
54#endif
55#undef X
56 default:
57 cerr << "Not compiled for " << online_opts.prime_length() << "-bit primes" << endl;
58 cerr << "Put 'MOD = -DGFP_MOD_SZ=" << n_limbs
59 << "' in CONFIG.mine and run " << "'make " << argv[0] << "'"
60 << endl;
61 exit(1);
62 }
63}
64
65#endif /* PROCESSOR_FIELDMACHINE_HPP_ */

Callers

nothing calls this directly

Calls 2

prime_limbsMethod · 0.80
prime_lengthMethod · 0.80

Tested by

no test coverage detected