is a functor which (tada) updates a single row (or the fraction described by the Streak) in the grid. More...
#include <linepointerupdatefunctor.h>
Public Member Functions | |
void | operator() (const Streak< DIM > &streak, const CoordBox< DIM > &box, const CELL **pointers, CELL *newLine, int nanoStep) |
is a functor which (tada) updates a single row (or the fraction described by the Streak) in the grid.
It will manufacture suitable LinePointerNeighborhood objects, depending on the line's location with respect to the grid dimensions and topology. It requires the line pointers to be arranged as expected by the PointerNeighborhood, but with a twist. Here is an 2D example with the 9-point Moore stencil:
12 3 4X----------------------------->6 78 9
Legend:
This layout allows us to capture the western and eastern boundary conditions for the first and last cell in the row via dedicated pointers (1, 4, 7 and 3, 6, 9). For the cells in between only the middle pointers (2, X, 8) are used, but with an offset. Exception: when 2 or 8 point to a cell outside of the grid (i.e. Grid::edgeCell) then no offset is used. This is only possible with constant boundary conditions as periodic boundary conditions would automatically wrap accesses to cells within the grid.
void LibGeoDecomp::LinePointerUpdateFunctor< CELL, DIM, HIGH, CUR_DIM, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >::operator() | ( | const Streak< DIM > & | streak, | |
const CoordBox< DIM > & | box, | |||
const CELL ** | pointers, | |||
CELL * | newLine, | |||
int | nanoStep | |||
) | [inline] |