Browse Source

Remove static vars from utilities

Roman Shkarin 9 years ago
parent
commit
4e00eb9bd5
2 changed files with 8 additions and 4 deletions
  1. 4 0
      utilities.c
  2. 4 4
      utilities.h

+ 4 - 0
utilities.c

@@ -1,5 +1,9 @@
 #include "utilities.h"
 
+int N_RUNS = 4;
+const int DIMS[N_DIMS] = {1, 2, 3};
+int N_POWERS_INTERVALS[N_DIMS][2] = {{5, 11}, {8, 11}, {7, 7}};
+
 void write_headers_in_file (int n_dims, int only_time, FILE *fp)
 {    
     fprintf (fp, "# ");

+ 4 - 4
utilities.h

@@ -24,13 +24,13 @@ typedef enum _OutputType {
 
 #define N_DIMS 3
 #define MIN_POW2 1
-#define MAX_POW2 15
+#define MAX_POW2 20
 #define MIN_RUNS 1
 #define MAX_RUNS 100
 
-static int N_RUNS = 4;
-static const int DIMS[N_DIMS] = {1, 2, 3};
-static int N_POWERS_INTERVALS[N_DIMS][2] = {{5, 11}, {8, 11}, {7, 7}};
+extern int N_RUNS;
+extern const int DIMS[N_DIMS];
+extern int N_POWERS_INTERVALS[N_DIMS][2];
 
 #define PRINT_DIM(dim) printf ("%dD:", dim);