if(next_row < 0) { next_row += CORES_Y; }
else if(next_row >= CORES_Y) { next_row -= CORES_Y; }
#else
- /* full bounce-back on all sides */
- if(next_col < 0) { return; }
- else if(next_col >= CORES_X) { return; }
- if(next_row < 0) { return; }
- else if(next_row >= CORES_Y) { return; }
+ /* don't stream from outside the domain */
+ if(next_col < 0) { continue; }
+ else if(next_col >= CORES_X) { continue; }
+ if(next_row < 0) { continue; }
+ else if(next_row >= CORES_Y) { continue; }
#endif
/* f: local block, g: local or remote block */