1 /* Main function to invoke cachesize_guess() or cachesize_cpuid() */
2 #include "cado.h" // IWYU pragma: keep
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include "version_info.h"
6
7 int cachesize_cpuid(int verbose);
8 int cachesize_guess(int verbose);
9
main(int argc,char ** argv)10 int main (int argc, char **argv)
11 {
12 int i, ret;
13 fprintf (stderr, "# %s.r%s", *argv, cado_revision_string);
14 for (i = 1; i < argc; i++)
15 fprintf (stderr, " %s", *(argv+i));
16 fprintf (stderr, "\n");
17
18 if (argc != 1) {
19 printf ("Usage: %s\n", *argv);
20 exit (1);
21 }
22
23 printf ("-- invoking cachesize_cpuid() --\n");
24 ret = cachesize_cpuid (1);
25 printf ("-- cachesize_cpuid() returns %d --\n", ret);
26
27 printf ("-- invoking cachesize_guess() --\n");
28 ret = cachesize_guess (1);
29 printf ("-- cachesize_guess() returns %d --\n", ret);
30
31 }
32