OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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
24template<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
33public:
34
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_ */
Iterator for the neighborhood of the cell structures.
VerletNNIteratorM(size_t part_id, Ver &ver)
Constructor for the Verlet iterator Multi-phase.
size_t getP()
Get the value of the cell.
boost::high_bit_mask_t< sh_byte > mask_high
Mask to get the high bits of a number.
size_t getV()
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.
Iterator for the neighborhood of the cell structures.
Ver::Mem_type_type::local_index_type get()
Get the value of the cell.
Ver & ver
verlet list