class that store the information of the grid like number of point on each direction and define the index linearization by stride More...
class that store the information of the grid like number of point on each direction and define the index linearization by stride
N | dimensionality |
T | type of object is going to store the grid |
Definition at line 21 of file grid_zm.hpp.
#include <grid_zm.hpp>
Public Member Functions | |
void | setDimensions (const size_t(&dims)[N]) |
Reset the dimension of the grid. | |
template<typename S > | |
grid_zm (const grid_zm< N, S > &g) | |
construct a grid from another grid | |
grid_zm (const size_t &sz) | |
Construct a grid of a specified size. | |
grid_zm (const size_t(&sz)[N]) | |
Construct a grid of a specified size. | |
~grid_zm () | |
Destructor. | |
template<typename ids_type > | |
__device__ __host__ mem_id | LinId (const grid_key_dx< N, ids_type > &gk) const |
Linearization of the grid_key_dx. | |
__device__ __host__ grid_zm< N, T > & | operator= (const grid_zm< N, T > &g) |
Copy the grid from another grid. | |
bool | operator== (const grid_zm< N, T > &g) |
Check if the two grid_sm are the same. | |
bool | operator!= (const grid_zm< N, T > &g) |
Check if the two grid_sm are the same. | |
void | swap (grid_zm< N, T > &g) |
swap the grid_sm informations | |
size_t | size (unsigned int i) const |
size_t | size () const |
Friends | |
template<unsigned int , typename > | |
class | grid_zm |
It simply mean that all the classes grid are friend of all its specialization. | |
Additional Inherited Members | |
Private Member Functions inherited from grid_sm< N, T > | |
Box< N, size_t > | getBox () const |
Return the box enclosing the grid. | |
const Box< N, size_t > | getBoxKey () const |
Return the box enclosing the grid. | |
void | setDimensions (const size_t(&dims)[N]) |
Reset the dimension of the grid. | |
grid_sm () | |
Default constructor. | |
template<typename S > | |
__device__ __host__ | grid_sm (const grid_sm< N, S > &g) |
construct a grid from another grid | |
__device__ __host__ | grid_sm (const grid_sm< N, T > &g) |
copy constructor | |
size_t | totalSize (const size_t sz) |
__device__ __host__ size_t | totalSize (const size_t(&sz)[N]) |
grid_sm (const size_t &sz) | |
Construct a grid of a specified size. | |
__device__ __host__ | grid_sm (const size_t(&sz)[N]) |
Construct a grid of a specified size. | |
template<typename check = NoCheck, typename ids_type > | |
mem_id | LinId (const grid_key_dx< N, ids_type > &gk, const signed char sum_id[N]) const |
Linearization of the grid_key_dx with a specified shift. | |
template<typename check = NoCheck, typename ids_type > | |
mem_id | LinId (const grid_key_dx< N, ids_type > &gk, const signed char sum_id[N], const size_t(&bc)[N]) const |
Linearization of the grid_key_dx with a specified shift. | |
mem_id | LinIdPtr (size_t *k) const |
Linearization of the set of indexes. | |
__device__ __host__ mem_id | LinId (const size_t(&k)[N]) const |
Linearization of the grid_key_dx. | |
template<typename ids_type > | |
__device__ __host__ mem_id | LinId (const grid_key_dx< N, ids_type > &gk) const |
Linearization of the grid_key_dx. | |
template<typename a , typename ... lT, typename enabler = typename std::enable_if<sizeof...(lT) == N-1>::type> | |
__device__ __host__ mem_id | Lin (a v, lT...t) const |
linearize an arbitrary set of index | |
__device__ __host__ grid_key_dx< N > | InvLinId (mem_id id) const |
Construct. | |
mem_id | LinId (mem_id *id) const |
Linearization of an array of mem_id (long int) | |
__device__ __host__ | ~grid_sm () |
Destructor. | |
__device__ __host__ size_t | size () const |
Return the size of the grid. | |
__device__ __host__ grid_sm< N, T > & | operator= (const grid_sm< N, T > &g) |
Copy the grid from another grid. | |
bool | operator== (const grid_sm< N, T > &g) |
Check if the two grid_sm are the same. | |
bool | operator!= (const grid_sm< N, T > &g) |
Check if the two grid_sm are the same. | |
__device__ __host__ size_t | size_s (unsigned int i) const |
__device__ __host__ size_t | size (unsigned int i) const |
__device__ __host__ const size_t(& | getSize () const)[N] |
Return the size of the grid as an array. | |
__device__ __host__ void | getSize (size_t(&size)[N]) const |
Returns the size of the grid in the passed array. | |
grid_key_dx_iterator_sub< N > | getSubIterator (const grid_key_dx< N > &start, const grid_key_dx< N > &stop) const |
Return a sub-grid iterator. | |
void | swap (grid_sm< N, T > &g) |
swap the grid_sm informations | |
std::string | toString () const |
Produce a string from the object. | |
Definition at line 37 of file grid_zm.hpp.
|
inline |
construct a grid from another grid
g | grid info |
construct a grid from another grid, type can be different
Definition at line 47 of file grid_zm.hpp.
Construct a grid of a specified size.
Construct a grid of a specified size
sz | is an array that contain the size of the grid on each dimension |
Definition at line 61 of file grid_zm.hpp.
Construct a grid of a specified size.
Construct a grid of a specified size
sz | is an array that contain the size of the grid on each dimension |
Definition at line 73 of file grid_zm.hpp.
Destructor.
Definition at line 79 of file grid_zm.hpp.
|
inline |
Linearization of the grid_key_dx.
Linearization of the grid_key_dx given a key, it spit out a number that is just the 1D linearization of the key. In this case is the linearization of N index
gk | grid key to access the element of the grid |
Definition at line 89 of file grid_zm.hpp.
|
inline |
Check if the two grid_sm are the same.
g | element to check |
Definition at line 127 of file grid_zm.hpp.
|
inline |
Copy the grid from another grid.
g | grid from witch to copy |
Definition at line 101 of file grid_zm.hpp.
|
inline |
Check if the two grid_sm are the same.
g | element to check |
Definition at line 116 of file grid_zm.hpp.
|
inline |
Reset the dimension of the grid.
dims | store on each dimension the size of the grid |
Definition at line 32 of file grid_zm.hpp.
|
inline |
Get the total size of the grid
Definition at line 162 of file grid_zm.hpp.
|
inline |
Get the size of the grid on the direction i
i | direction |
Definition at line 150 of file grid_zm.hpp.
|
friend |
It simply mean that all the classes grid are friend of all its specialization.
Definition at line 168 of file grid_zm.hpp.