OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
VerletNNIteratorM.hpp
1 /*
2  * VerletNNIteratorM.hpp
3  *
4  * Created on: Oct 15, 2016
5  * Author: i-bird
6  */
7 
8 #ifndef OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETNNITERATORM_HPP_
9 #define OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETNNITERATORM_HPP_
10 
11 #include "VerletNNIterator.hpp"
12 
24 template<unsigned int dim, typename Ver, unsigned int sh_byte> class VerletNNIteratorM : public VerletNNIterator<dim,Ver>
25 {
27  typedef boost::high_bit_mask_t<sh_byte> mask_high;
28 
30  typedef boost::low_bits_mask_t<sizeof(size_t)*8-sh_byte> mask_low;
31 
32 
33 public:
34 
39  VerletNNIteratorM(size_t part_id, Ver & ver)
40  :VerletNNIterator<dim,Ver>(part_id,ver)
41  {
42  }
43 
49  inline size_t getP()
50  {
51  return VerletNNIterator<dim,Ver>::get() & mask_low::sig_bits_fast;
52  }
53 
59  inline size_t getV()
60  {
61  return (VerletNNIterator<dim,Ver>::get()) >> (sizeof(size_t)*8-sh_byte);
62  }
63 
64 
65 };
66 
67 
68 #endif /* OPENFPM_DATA_SRC_NN_VERLETLIST_VERLETNNITERATORM_HPP_ */
size_t getP()
Get the value of the cell.
Iterator for the neighborhood of the cell structures.
Iterator for the neighborhood of the cell structures.
boost::high_bit_mask_t< sh_byte > mask_high
Mask to get the high bits of a number.
Ver & ver
verlet list
size_t getV()
Get the value of the cell.
Ver::Mem_type_type::loc_index get()
Get the value of the cell.
boost::low_bits_mask_t< sizeof(size_t)*8-sh_byte > mask_low
Mask to get the low bits of a number.
VerletNNIteratorM(size_t part_id, Ver &ver)
Constructor for the Verlet iterator Multi-phase.