X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/d7ccdf4277c5abed2330432a7f455f2cac913f37..102c40aa3d705c90bbf45f491dc3f0108d583baf:/IDA_new/ida_gf65_paper3.cpp?ds=inline diff --git a/IDA_new/ida_gf65_paper3.cpp b/IDA_new/ida_gf65_paper3.cpp index c3d6578..ccc7a69 100644 --- a/IDA_new/ida_gf65_paper3.cpp +++ b/IDA_new/ida_gf65_paper3.cpp @@ -58,7 +58,7 @@ void display(mylong *mat, int r, int c) { 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; @@ -73,6 +73,7 @@ mylong *matrix_multiply(gf_t *gf, mylong *m1, mylong *m2, int r1, int c1, int r2 } } } + *toto=*toto+0.021; return product; } @@ -412,8 +413,6 @@ void saveFile8(mylong *data, const char *fileName,long size_file) { } -#define cli() __asm volatile( "cli" ::: "memory" ) -#define sei() __asm volatile( "sei" ::: "memory" ) int main(int argc, char **argv) @@ -505,13 +504,18 @@ int main(int argc, char **argv) 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 elapsed_seconds = end-start; total_time+=elapsed_seconds.count(); -// cout << "elapsed time: " << elapsed_seconds.count() << "s\n"; + cout << "elapsed time: " << elapsed_seconds.count() << " "<