mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-11 06:27:56 -05:00
22 lines
306 B
C++
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_ */
|