d2q9: fix stupid bugs
authorSebastian <git@sraa.de>
Mon, 15 Sep 2014 19:07:31 +0000 (19:07 +0000)
committerSebastian <git@sraa.de>
Mon, 15 Sep 2014 19:07:31 +0000 (19:07 +0000)
d2q9/esrc/main.c
d2q9/hsrc/data.c

index 89a23af3e5c3e1ad36adceb688ea3b65ad206132..1a239ce385733ea334b196ed3e923b08ebfed992 100644 (file)
@@ -18,6 +18,9 @@ static uint8_t dummy_bank2[8192] USED SECTION(".data_bank2");
 static uint8_t dummy_bank3[8192] USED SECTION(".data_bank3");
 static block_t *block = (void*)0x2000;
 
+/* timer values */
+times_t timers = {0};
+
 /* barrier structures */
 volatile e_barrier_t  barriers[CORES];
          e_barrier_t *tgt_bars[CORES];
@@ -27,7 +30,7 @@ unsigned int row, col, core;
 
 #define READ_TIMER(X) \
        do { \
-               times[X] = E_CTIMER_MAX - e_ctimer_stop(E_CTIMER_0); \
+               timers[X] = E_CTIMER_MAX - e_ctimer_stop(E_CTIMER_0); \
                e_ctimer_set(E_CTIMER_0, E_CTIMER_MAX); \
                e_ctimer_start(E_CTIMER_0, E_CTIMER_CLK); \
        } while(0);
@@ -35,7 +38,6 @@ unsigned int row, col, core;
 int main()
 {
        const FLOAT omega = 1.0;
-       unsigned times[TIMERS] = {0};
 
        /* compile-time checks */
        BUILD_BUG(NODES * sizeof(node_t) > 24 * 1024);
@@ -94,7 +96,7 @@ int main()
                READ_TIMER(3);
 
                /* collide and stream the bulk */
-               collide_stream_bulk(*block, omega);
+               bulk(*block, omega);
                READ_TIMER(4);
 
                /* stream the boundaries: top, bottom */
index 678c0a2b430f64875312f6c2b2b0dc488656bcd8..35fc2b6791a4e9fd5cd26b57b5a074f838cb4e80 100644 (file)
@@ -230,7 +230,7 @@ void write_timers(times_t times[CORES_Y][CORES_X], uint32_t iter)
                for(int x = 0; x < CORES_X; x++) {
                        fprintf(file, "[%d,%d]: ", x, y);
                        for(int t = 0; t < TIMERS; t++) {
-                               fprintf(file, "%8d ", times[t][y][x]);
+                               fprintf(file, "%8d ", times[y][x][t]);
                        }
                        fprintf(file, "\n");
                }