Commit 42e37c66 authored by Gaurav Kukreja's avatar Gaurav Kukreja

Fixed the final bug to make everything work

Signed-off-by: 's avatarGaurav Kukreja <gaurav.kukreja@tum.de>
parent c0b88cc6
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
#include <omp.h> #include <omp.h>
#endif #endif
#define VEC_LENGTH 4 #define VEC_LENGTH 8
/** /**
* Constructor of a SWE_WavePropagationBlock. * Constructor of a SWE_WavePropagationBlock.
...@@ -124,8 +125,11 @@ SWE_WavePropagationBlock::computeNumericalFluxes () ...@@ -124,8 +125,11 @@ SWE_WavePropagationBlock::computeNumericalFluxes ()
float maxWaveSpeed = (float) 0.; float maxWaveSpeed = (float) 0.;
// compute the loop limits // compute the loop limits
const int end_ny_1_1 = ny + 1; // const int end_ny_1_1 = ny + 1;
const int end_ny_1_2 = ny + 2; // const int end_ny_1_2 = ny + 2;
const int end_ny_1_1 = ny & (~(VEC_LENGTH - 1));
const int end_ny_1_2 = (ny + 1) & (~(VEC_LENGTH - 1));
#if WAVE_PROPAGATION_SOLVER==5 #if WAVE_PROPAGATION_SOLVER==5
// Note, that ny is used instead of (ny + 1). This is due to the fact, that in the loop below, j starts with 1! // Note, that ny is used instead of (ny + 1). This is due to the fact, that in the loop below, j starts with 1!
...@@ -321,7 +325,7 @@ SWE_WavePropagationBlock::computeNumericalFluxes () ...@@ -321,7 +325,7 @@ SWE_WavePropagationBlock::computeNumericalFluxes ()
#ifdef LOOP_OPENMP #ifdef LOOP_OPENMP
#pragma omp for schedule(static) nowait #pragma omp for schedule(static) nowait
#endif #endif
for (j = 1; j < end_ny_1_1; ++j) { for (j = 1; j < end_ny_1_1; j+=VEC_LENGTH) {
float maxEdgeSpeed; float maxEdgeSpeed;
wavePropagationSolver.computeNetUpdates_cilk ( wavePropagationSolver.computeNetUpdates_cilk (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment