Use IMultiIO interface instead of concrete NetIOMP

This commit is contained in:
Andrew Morris
2025-01-29 14:05:52 +11:00
parent 3f2c1a86dc
commit 9af7281d6d
6 changed files with 86 additions and 54 deletions

View File

@@ -11,10 +11,10 @@ int main(int argc, char** argv) {
parse_party_and_port(argv, &party, &port);
const static int nP = 4;
NetIOMP io(nP, party, port);
std::shared_ptr<IMultiIO> io = std::make_shared<NetIOMP>(nP, party, port);
BristolFormat cf(circuit_file_location.c_str());
CMPC* mpc = new CMPC(nP, &io, party, &cf);
CMPC* mpc = new CMPC(io, &cf);
cout <<"Setup:\t"<<party<<"\n";
mpc->function_independent();
@@ -63,7 +63,7 @@ int main(int argc, char** argv) {
}
mpc->online(&input, &output);
uint64_t band2 = count_multi_io(io);
uint64_t band2 = count_multi_io(*io);
cout <<"bandwidth\t"<<party<<"\t"<<band2<<endl;
cout <<"ONLINE:\t"<<party<<"\n";