8 #ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLNNITERATORRUNTIMEM_HPP_ 9 #define OPENFPM_DATA_SRC_NN_CELLLIST_CELLNNITERATORRUNTIMEM_HPP_ 25 template<
unsigned int dim,
typename Cell,
unsigned int sh_
byte,
unsigned int impl>
28 typedef boost::low_bits_mask_t<
sizeof(size_t)*8-sh_byte> mask_low;
84 template<
unsigned int dim,
typename Cell,
unsigned int sh_
byte,
unsigned int impl>
87 typedef boost::low_bits_mask_t<
sizeof(size_t)*8-sh_byte> mask_low;
95 const typename Cell::internal_vector_pos_type &
pos;
107 while (this->start_id < this->
stop_id)
110 for (
long int i = dim-1 ; i >= 0 ; i--)
112 if (
pos.template get<0>(
p)[i] <
ps.get(q >> (
sizeof(
size_t)*8-sh_byte)).pos.template get<0>(q & mask_low::sig_bits_fast)[i])
114 else if (
pos.template get<0>(
p)[i] >
ps.get(q >> (
sizeof(
size_t)*8-sh_byte)).pos.template get<0>(q & mask_low::sig_bits_fast)[i])
117 if (q >> (
sizeof(
size_t)*8-sh_byte) !=
pp)
return;
118 if ((q & mask_low::sig_bits_fast) >=
p)
return;
145 const long int *
NNc,
148 const typename Cell::internal_vector_pos_type &
pos,
150 :
CellNNIterator<dim,Cell,RUNTIME,impl>(
cell,
NNc,NNc_size,
cl),
pp(
pp),
p(
p),
pos(
pos),
ps(
ps)
CellNNIteratorSymM< dim, Cell, sh_byte, RUNTIME, impl > & operator++()
take the next element
const long int cell
Center cell, or cell for witch we are searching the NN-cell.
CellNNIteratorSymM(size_t cell, size_t pp, size_t p, const long int *NNc, size_t NNc_size, Cell &cl, const typename Cell::internal_vector_pos_type &pos, const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type >> &ps)
Cell NN iterator.
Iterator for the neighborhood of the cell structures.
const Cell::internal_vector_pos_type & pos
Position of the particles p.
size_t pp
phase of the particle p
const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type > > & ps
Position of the particles in the phases.
Iterator for the neighborhood of the cell structures.
size_t getV()
Get the value of the cell.
Structure that contain a reference to a vector of particles.
const Cell::Mem_type_type::local_index_type * start_id
actual element id
size_t p
index of the particle p
Symmetric iterator for the neighborhood of the cell structures.
const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type > > & ps
Position of the particle p.
size_t pp
phase of particle p
const NNc_array< dim, NNc_size > & NNc
NN cell id.
size_t NNc_id
Actual NNc_id;.
size_t getV()
Get the value of the cell.
size_t p
index of the particle p
Implementation of 1-D std::vector like structure.
size_t getP()
Get the value of the cell.
const Cell::Mem_type_type::local_index_type * stop_id
stop id to read the end of the cell
Iterator for the neighborhood of the cell structures.
size_t getP()
Get the value of the cell.
CellNNIteratorM(size_t cell, const long int *NNc, size_t NNc_size, Cell &cl)
Cell NN iterator.