Files
MP-SPDZ/FHE/tools.h
Marcel Keller 2008a8782d Overdrive.
2018-03-02 14:33:03 +00:00

24 lines
358 B
C++

// (C) 2018 University of Bristol. See License.txt
/*
* 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_ */