mirror of
https://github.com/privacy-scaling-explorations/emp-wasm.git
synced 2026-01-10 10:37:54 -05:00
change parameter to be about sending instead of directly specifying bucket
This commit is contained in:
@@ -39,11 +39,11 @@ class ABitMP { public:
|
||||
|
||||
for(int i = 1; i <= nP; ++i) for(int j = 1; j <= nP; ++j) if(i < j) {
|
||||
if(i == party) {
|
||||
abit1[j].emplace(io->get(j, false));
|
||||
abit2[j].emplace(io->get(j, true));
|
||||
abit1[j].emplace(io->get(j, false));
|
||||
abit2[j].emplace(io->get(j, true));
|
||||
} else if (j == party) {
|
||||
abit2[i].emplace(io->get(i, false));
|
||||
abit1[i].emplace(io->get(i, true));
|
||||
abit2[i].emplace(io->get(i, true));
|
||||
abit1[i].emplace(io->get(i, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,10 +94,13 @@ class NetIOMP { public:
|
||||
else
|
||||
ios2[src]->recv_data(data, len);
|
||||
}
|
||||
IOChannel& get(size_t idx, bool b = false){
|
||||
if (b)
|
||||
return *ios[idx];
|
||||
else return *ios2[idx];
|
||||
IOChannel& get(int party2, bool send) {
|
||||
assert(party2 != 0);
|
||||
assert(party2 != party);
|
||||
|
||||
bool firstBucket = send == (party < party2);
|
||||
|
||||
return firstBucket ? *ios[party2] : *ios2[party2];
|
||||
}
|
||||
|
||||
void flush(int idx = 0) {
|
||||
|
||||
Reference in New Issue
Block a user