Public Member Functions

LibGeoDecomp::LinePointerUpdateFunctor< CELL, DIM, HIGH, CUR_DIM, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH > Class Template Reference

is a functor which (tada) updates a single row (or the fraction described by the Streak) in the grid. More...

#include <linepointerupdatefunctor.h>

List of all members.

Public Member Functions

void operator() (const Streak< DIM > &streak, const CoordBox< DIM > &box, const CELL **pointers, CELL *newLine, int nanoStep)

Detailed Description

template<typename CELL, int DIM = APITraits::SelectTopology<CELL>::Value::DIM, bool HIGH = true, int CUR_DIM = (DIM - 1), bool BOUNDARY_TOP = false, bool BOUNDARY_BOTTOM = false, bool BOUNDARY_SOUTH = false, bool BOUNDARY_NORTH = false>
class LibGeoDecomp::LinePointerUpdateFunctor< CELL, DIM, HIGH, CUR_DIM, BOUNDARY_TOP, BOUNDARY_BOTTOM, BOUNDARY_SOUTH, BOUNDARY_NORTH >

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.


Member Function Documentation

template<typename CELL , int DIM = APITraits::SelectTopology<CELL>::Value::DIM, bool HIGH = true, int CUR_DIM = (DIM - 1), bool BOUNDARY_TOP = false, bool BOUNDARY_BOTTOM = false, bool BOUNDARY_SOUTH = false, bool BOUNDARY_NORTH = false>
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]

The documentation for this class was generated from the following file: