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"
29template<
unsigned int dim>
35 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++)
uint64_t hkey
Actual position.
grid_key_dx< dim > gk
Actual position in the grid.
grid_key_dx_iterator_hilbert< dim > & operator++()
Get the next element.
grid_key_dx_iterator_hilbert(int32_t m)
Constructor.
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.
bool isNext()
Check if there is the next element.
void reset()
Reset the iterator (it restart from the beginning)
grid_key_dx is the key to access any element in the grid
__device__ __host__ void set_d(index_type i, index_type id)
Set the i index.