A
lgorithmique
N
umérique
D
istribuée
Private GIT Repository
projects
/
Cipher_code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new
[Cipher_code.git]
/
IDA_new
/
ida_gf65_paper3.cpp
diff --git
a/IDA_new/ida_gf65_paper3.cpp
b/IDA_new/ida_gf65_paper3.cpp
index cc004048e99cf5b880449cafef8654adad757842..ccc7a69445235395833bfc28eb1a17401325dd88 100644
(file)
--- 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");
}
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;
{
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;
}
return product;
}
@@
-413,6
+414,7
@@
void saveFile8(mylong *data, const char *fileName,long size_file) {
}
}
+
int main(int argc, char **argv)
{
unsigned int w;
int main(int argc, char **argv)
{
unsigned int w;
@@
-502,13
+504,18
@@
int main(int argc, char **argv)
display(matG, n, t);
*/
display(matG, n, t);
*/
+ int nb_iter=1000;
+
// sleep(2);
// sleep(2);
+ float toto=0.001;
auto start = std::chrono::system_clock::now();
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();
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);
// display(matC,t,t);
@@
-629,15
+636,17
@@
int main(int argc, char **argv)
// sleep(2);
start = std::chrono::system_clock::now();
// sleep(2);
start = std::chrono::system_clock::now();
- for(int i=0;i<1000;i++) {
- int volatile tt=y;
- matS2=matrix_multiply(&gf, matInvGs, matCs, tt, tt, tt, 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();
}
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);
/* printf("Matrix S2:\n");
// display(matS2, len, t);