8 #ifndef OPENFPM_DATA_SRC_GRID_GRID_KEY_DX_ITERATOR_HILBERT_HPP_ 9 #define OPENFPM_DATA_SRC_GRID_GRID_KEY_DX_ITERATOR_HILBERT_HPP_ 13 #include "hilbertKey.h" 29 template<
unsigned int dim>
33 bool initialized =
false;
70 for (
size_t i = 0 ; i < dim ; i++)
97 uint64_t nextCoord[dim];
100 getIntCoordFromHKey(nextCoord,
m, dim,
hkey, &err);
103 for (
size_t i = 0; i < dim; i++)
119 if (
hkey < (
size_t)1 << (
m*dim))
149 for (
size_t i = 0 ; i < dim ; i++)
void reset()
Reset the iterator (it restart from the beginning)
uint64_t hkey
Actual position.
size_t m
Order of a hilbert curve.
const grid_key_dx< dim > & get()
Get the actual key.
grid_sm< dim, void > grid_base
Size of the hilbert grid in each dimension.
__device__ __host__ void set_d(index_type i, index_type id)
Set the i index.
grid_key_dx_iterator_hilbert< dim > & operator++()
Get the next element.
grid_key_dx< dim > gk
Actual position in the grid.
grid_key_dx_iterator_hilbert(int32_t m)
Constructor.
bool isNext()
Check if there is the next element.