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

Function Mul

FHE/Matrix.cpp:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49matrix Mul(const matrix& A,const matrix& B)
50{
51 unsigned int m=A.size(),n=B[0].size(),t=A[0].size();
52 if (t!=B.size()) { throw invalid_length(); }
53 matrix C(m, vector<bigint>(n) );
54 for (unsigned int i=0; i<m; i++)
55 { for (unsigned int j=0; j<n; j++)
56 { C[i][j]=0;
57 for (unsigned int k=0; k<t; k++)
58 { C[i][j]+=A[i][k]*B[k][j]; }
59 }
60 }
61 return C;
62}
63
64
65/* Uses Algorithm 2.7 from Pohst-Zassenhaus to compute H and U st

Callers 14

initMethod · 0.70
compute_rootsMethod · 0.70
FFT_Iter2_bodyFunction · 0.70
mulFunction · 0.70
mul_by_X_iMethod · 0.70
change_repMethod · 0.70
SubsFunction · 0.70
NaiveFFTFunction · 0.70
FFTFunction · 0.70
FFT_IterFunction · 0.70
FFT2Function · 0.70
BFFTFunction · 0.70

Calls 2

invalid_lengthClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected