gr::Utils::OneRingNeighborhood Struct Reference

Compute the 3^dim neighborhood for a cell This implementation is not efficient and must be improved e.g., do no allocate any array, just call a function with the ids. More...

#include <utils.h>

+ Collaboration diagram for gr::Utils::OneRingNeighborhood:

Classes

struct  NeighborhoodType
 helper class More...
 

Public Member Functions

template<int dim>
void get (int queryId, int nElPerDim, typename NeighborhoodType< dim >::type &nei)
 
template<>
void get (int queryId, int nElPerDim, int offset, typename NeighborhoodType< 1 >::ptr first, typename NeighborhoodType< 1 >::ptr last)
 
template<>
void get (int queryId, int nElPerDim, int offset, typename NeighborhoodType< 2 >::ptr first, typename NeighborhoodType< 2 >::ptr last)
 
template<>
void get (int queryId, int nElPerDim, int, typename NeighborhoodType< 3 >::ptr first, typename NeighborhoodType< 3 >::ptr)
 

Detailed Description

Compute the 3^dim neighborhood for a cell This implementation is not efficient and must be improved e.g., do no allocate any array, just call a function with the ids.

Member Function Documentation

template<int dim>
void gr::Utils::OneRingNeighborhood::get ( int  queryId,
int  nElPerDim,
typename NeighborhoodType< dim >::type &  nei 
)
inline
Parameters
queryIdLinear index of the query
nbElementPerDimNumber of cells in the grid per dimension Total size of the grid is pow(nbElementPerDim, dim).
Returns
An array of the neighboring cells ids. When the query is on the grid boundaries, out of bounds cells ids are marked with -1 in the output array.

+ Here is the call graph for this function:

template<>
void gr::Utils::OneRingNeighborhood::get ( int  queryId,
int  nElPerDim,
int  offset,
typename NeighborhoodType< 1 >::ptr  first,
typename NeighborhoodType< 1 >::ptr  last 
)
inline

+ Here is the call graph for this function:

template<>
void gr::Utils::OneRingNeighborhood::get ( int  queryId,
int  nElPerDim,
int  offset,
typename NeighborhoodType< 2 >::ptr  first,
typename NeighborhoodType< 2 >::ptr  last 
)
inline

+ Here is the call graph for this function:

template<>
void gr::Utils::OneRingNeighborhood::get ( int  queryId,
int  nElPerDim,
int  ,
typename NeighborhoodType< 3 >::ptr  first,
typename NeighborhoodType< 3 >::ptr   
)
inline

+ Here is the call graph for this function:


The documentation for this struct was generated from the following file:
  • /home/travis/build/STORM-IRIT/OpenGR/src/gr/accelerators/utils.h