MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / dediag

Method dediag

FHE/Diagonalizer.cpp:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60Diagonalizer::MatrixVector Diagonalizer::dediag(
61 const vector<Plaintext_<FFT_Data>>& products, int n_matrices)
62{
63 int n_cols_out = products.size();
64 MatrixVector res(n_matrices, {int(n_rows), n_cols_out});
65 for (int i = 0; i < n_cols_out; i++)
66 {
67 auto& c = products.at(i);
68 for (int j = 0; j < n_matrices; j++)
69 {
70 res.at(j).entries.init();
71 for (size_t k = 0; k < n_rows; k++)
72 res.at(j)[{k, i}] = c.element(j * n_rows + k);
73 }
74 }
75 return res;
76}

Callers 1

buffer_triplesMethod · 0.80

Calls 3

elementMethod · 0.80
sizeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected