printf("\n");
}
-mylong *matrix_multiply(gf_t *gf, mylong *m1, mylong *m2, int r1, int c1, int r2, int c2, int w)
+mylong *matrix_multiply(gf_t *gf, mylong *m1, mylong *m2, int r1, int c1, int r2, int c2, int w, float *toto)
{
mylong *product;
int i, j, k;
}
}
}
+ *toto=*toto+0.021;
return product;
}
display(matG, n, t);
*/
+ int nb_iter=1000;
+
// sleep(2);
+ float toto=0.001;
auto start = std::chrono::system_clock::now();
- matC=matrix_multiply(&gf, matG, matS, n, t, t, len, w);
+ for(int i=0;i<nb_iter;i++) {
+ matC=matrix_multiply(&gf, matG, matS, n, t, t, len, w,&toto);
+ }
auto end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end-start;
total_time+=elapsed_seconds.count();
-// cout << "elapsed time: " << elapsed_seconds.count() << "s\n";
+ cout << "elapsed time: " << elapsed_seconds.count() << " "<<toto<<" ";
// display(matC,t,t);
// sleep(2);
start = std::chrono::system_clock::now();
- for(int i=0;i<1000;i++) {
- float tt=i;
- tt=t;
- int tt2=tt;
- matS2=matrix_multiply(&gf, matInvGs, matCs, tt2, tt2, tt2, len, w);
+ toto=0.001;
+ for(int i=0;i<nb_iter;i++) {
+
+ matS2=matrix_multiply(&gf, matInvGs, matCs, t, t, t, len, w, &toto);
}
end = std::chrono::system_clock::now();
elapsed_seconds = end-start;
// cout << "elapsed time: " << elapsed_seconds.count() << "s\n";
total_time+=elapsed_seconds.count();
- cout/*<<"TOTAL TIME : "*/<<total_time;
+ cout/*<<"TOTAL TIME : "*/<<total_time<<" "<<toto;
/* printf("Matrix S2:\n");
// display(matS2, len, t);