19 #ifndef __RECURSIVEPARAMS_H__
20 #define __RECURSIVEPARAMS_H__
28 std::vector<const PercyParams*> iterations, nservers_t
tau = 0);
33 std::vector<dbsize_t> iteration_indices (dbsize_t index)
const;
36 std::vector<const PercyParams*> get_iterations ()
const {
39 const PercyParams * get_iteration (nqueries_t index)
const {
40 return (index < iterations.size() ? iterations[index] : NULL);
42 nqueries_t depth ()
const {
43 return iterations.size();
47 dbsize_t
request_size (nqueries_t num_queries = 1)
const;
56 std::vector<Dimension> worker_dims)
const;
62 virtual void write (std::ostream &os)
const;
69 std::vector<const PercyParams*> iterations;
83 std::vector<const PercyClientParams*> get_iterations ()
const {
87 return (index < iterations.size() ? iterations[index] : NULL);
89 nqueries_t depth ()
const {
90 return iterations.size();
98 std::vector<const PercyClientParams*> iterations;
119 std::vector<nservers_t> worker_sids = std::vector<nservers_t>(),
120 bool fork =
false,
bool first_only =
false,
127 bool dist_first_only ()
const {
return first_only; }
128 bool is_worker ()
const {
return _is_worker; }
130 std::vector<const PercyServerParams*> get_iterations ()
const {
134 return (index < iterations.size() ? iterations[index] : NULL);
136 nqueries_t depth ()
const {
137 return iterations.size();
140 std::vector<const RecursiveParams*> get_worker_rparams ()
const {
141 return worker_rparams;
151 std::vector<const PercyServerParams*> iterations;
154 std::vector<const RecursiveParams*> worker_rparams;
nservers_t tau() const
Get the level of tau-independence.
Definition: percyparams.h:117
Client parameters.
Definition: percyparams.h:189
dbsize_t word_size() const
Get the word size used to split blocks.
Definition: percyparams.h:110
dbsize_t request_size(nqueries_t num_queries=1) const
Get the size of a client to server request.
Definition: recursiveparams.h:24
nservers_t num_threads() const
Get the number of threads being used.
Definition: percyparams.h:305
nservers_t sid
Server ID.
Definition: percyparams.h:378
DistSplit
The method used to partition work between threads/workers.
Definition: percyparams.h:58
nservers_t num_servers() const
Get the number of servers being queried.
Definition: percyparams.h:217
virtual void print_distributed(std::ostream &os) const
Print the distributed properties of the server.
Definition: recursiveparams.h:73
dbsize_t num_blocks() const
Get the number of blocks in the database.
Definition: percyparams.h:102
virtual bool is_recursive() const
Check if the protocol is recursive.
Definition: recursiveparams.h:58
virtual bool check_compatible(std::istream &is) const
Read the parameters from a stream (as written by write()) and check that they are compatible with the...
PercyMode mode
Protocol being used.
Definition: percyparams.h:176
bool be_byzantine
Whether or not the server is Byzantine.
Definition: percyparams.h:380
DistSplit tsplit
The method of partitioning work between threads.
Definition: percyparams.h:386
An abstract base class for a protocol's parameters.
Definition: percyparams.h:80
virtual void write(std::ostream &os) const
Write the parameters to a stream to check compatibility.
virtual std::vector< const PercyParams * > create_worker_params(std::vector< Dimension > worker_dims) const
Create protocol parameters for threads/workers.
virtual void print_mode_specific(std::ostream &os) const
Print mode-specific parameters.
Definition: recursiveparams.h:52
Partition the database records.
Definition: percyparams.h:60
DistSplit wsplit
The method of partitioning work between workers.
Definition: percyparams.h:392
bool is_null() const
Check if the client is a null client.
Definition: percyparams.h:230
PercyMode
A PIR protocol.
Definition: percyparams.h:40
Server parameters.
Definition: percyparams.h:251
dbsize_t block_size() const
Get the size of each block in the database in bytes.
Definition: percyparams.h:104
dbsize_t response_size(nqueries_t num_queries=1) const
Get the size of a server to client response.
nservers_t num_workers() const
Get the number of worker processes being used.
Definition: percyparams.h:316
Defines the basic structure of protocol parameters (PercyParams), client parameters (PercyClientParam...
Definition: recursiveparams.h:102