-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
47 lines (35 loc) · 992 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "generate.h"
#include "calculate.h"
#include "show.h"
int main(int argc, char const *argv[])
{
int nbMult;
char* adrMap;
if (argc < 2)
{
printf("usage: %s nbMult\n",argv[0]);
return(EXIT_FAILURE);
}
sscanf(argv[1],"%u",(unsigned int*)&nbMult);
if (generateFile(nbMult) != 0)
{
printf("Erreur lors de la generation du fichier");
return(EXIT_FAILURE);
}
printf("==============================\n");
printf("|Generation du fichier reussi|\n");
printf("==============================\n");
printf("==============================\n");
printf("| Initialisation matrices |\n");
printf("==============================\n");
adrMap = loadFile();
printf("==============================\n");
printf("| Calcul des matrices |\n");
printf("==============================\n");
compute(adrMap);
printf("==============================\n");
printf("| Matrices resultantes |\n");
printf("==============================\n");
show();
return 0;
}