mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 14:08:09 -05:00
BMR, Use your Brain, Semi/Semi2k.
This commit is contained in:
30
Processor/PrivateOutput.hpp
Normal file
30
Processor/PrivateOutput.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* PrivateOutput.cpp
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PrivateOutput.h"
|
||||
#include "Processor.h"
|
||||
|
||||
template<class T>
|
||||
void PrivateOutput<T>::start(int player, int target, int source)
|
||||
{
|
||||
open_type mask;
|
||||
proc.DataF.get_input(proc.get_S_ref(target), mask, player);
|
||||
proc.get_S_ref(target) += proc.get_S_ref(source);
|
||||
|
||||
if (player == proc.P.my_num())
|
||||
masks.push_back(mask);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void PrivateOutput<T>::stop(int player, int source)
|
||||
{
|
||||
if (player == proc.P.my_num())
|
||||
{
|
||||
open_type value;
|
||||
value.sub(proc.get_C_ref(source), masks.front());
|
||||
value.output(proc.Proc.private_output, false);
|
||||
masks.pop_front();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user