Files
MP-SPDZ/FHE/tools.h
Marcel Keller cc0711c224 MP-SPDZ.
2018-10-11 17:20:26 +11:00

22 lines
306 B
C++

/*
* tools.h
*
*/
#ifndef FHE_TOOLS_H_
#define FHE_TOOLS_H_
#include <vector>
using namespace std;
template <class T>
T sum(const vector<T>& summands)
{
T res = summands[0];
for (size_t i = 1; i < summands.size(); i++)
res += summands[i];
return res;
}
#endif /* FHE_TOOLS_H_ */