utils.h File Reference
#include <string>
#include <stdexcept>
#include <cmath>
#include <array>
+ Include dependency graph for utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gr::Utils::OneRingNeighborhood::NeighborhoodType< dim >
 helper class More...
 
struct  gr::Utils::OneRingNeighborhood
 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...
 

Namespaces

 gr
 
 gr::Utils
 

Macros

#define M_PI   3.14159265358979323846
 

Functions

template<typename baseT , typename expoT >
constexpr baseT gr::Utils::POW (baseT base, expoT expo)
 Compile time pow. More...
 
template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT gr::Utils::UnrollIndexLoop (const ndIndexT &coord, IndexT cdim, SizeT gsize)
 Convert a normalized n-d vector to a linear index in a uniform regular grid This function is recursive, and unrolled at compile time (loop over n). More...
 
template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT gr::Utils::UnrollIndexLoop (const ndIndexT &coord, const ndIndexT &offset, IndexT cdim, SizeT gsize)
 Convert a normalized n-d vector to a linear index in a uniform regular grid, moved by moved by an offset defined as a integer move in the n-d grid. More...
 

Macro Definition Documentation

#define M_PI   3.14159265358979323846