OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
SparseGridGpu_iterator< dim, SparseGridType > Class Template Reference

Detailed Description

template<unsigned int dim, typename SparseGridType>
class SparseGridGpu_iterator< dim, SparseGridType >

Definition at line 158 of file SparseGridGpu_iterator.hpp.

Public Member Functions

 SparseGridGpu_iterator (const SparseGridType &sparseGrid)
 Constructor.
 
bool isNext () const
 Check if there is the next element.
 
SparseGridGpu_iterator< dim, SparseGridType > & operator++ ()
 Get the next element.
 
sparse_grid_gpu_index< SparseGridType > get () const
 return the actual point
 
void reinitialize (const SparseGridGpu_iterator< dim, SparseGridType > &it)
 Reinitialize the iterator.
 
SparseGridGpu_iterator< dim, SparseGridType > & operator= (const SparseGridGpu_iterator< dim, SparseGridType > &it)
 

Private Types

typedef std::remove_reference< decltype(sparseGrid->private_get_index_array())>::type index_array_type
 array type for the indexes
 
typedef std::remove_reference< decltype(sparseGrid->private_get_data_array())>::type data_array_type
 array type for the data
 
typedef boost::mpl::at< typenamedata_array_type::value_type::type, boost::mpl::int_< 0 > >::type chunk_type
 
typedef boost::mpl::int_< boost::mpl::size< typename data_array_type::value_type::type >::type::value-1 > pMask
 

Private Member Functions

void SelectValid ()
 Select the first valid point chunk.
 

Private Attributes

unsigned int chunk
 actual chunk
 
unsigned int pnt
 actual point inside the chunk
 
const SparseGridType * sparseGrid
 original SparseGrid
 
const index_array_typeids
 vector of the chunk indexes
 
const data_array_typedata
 vector containing each chunks datas
 

Member Typedef Documentation

◆ chunk_type

template<unsigned int dim, typename SparseGridType >
typedef boost::mpl::at<typenamedata_array_type::value_type::type,boost::mpl::int_<0>>::type SparseGridGpu_iterator< dim, SparseGridType >::chunk_type
private

Definition at line 182 of file SparseGridGpu_iterator.hpp.

◆ data_array_type

template<unsigned int dim, typename SparseGridType >
typedef std::remove_reference<decltype(sparseGrid->private_get_data_array())>::type SparseGridGpu_iterator< dim, SparseGridType >::data_array_type
private

array type for the data

Definition at line 173 of file SparseGridGpu_iterator.hpp.

◆ index_array_type

template<unsigned int dim, typename SparseGridType >
typedef std::remove_reference<decltype(sparseGrid->private_get_index_array())>::type SparseGridGpu_iterator< dim, SparseGridType >::index_array_type
private

array type for the indexes

Definition at line 170 of file SparseGridGpu_iterator.hpp.

◆ pMask

template<unsigned int dim, typename SparseGridType >
typedef boost::mpl::int_<boost::mpl::size<typename data_array_type::value_type::type>::type::value-1> SparseGridGpu_iterator< dim, SparseGridType >::pMask
private

Definition at line 185 of file SparseGridGpu_iterator.hpp.

Constructor & Destructor Documentation

◆ SparseGridGpu_iterator() [1/2]

template<unsigned int dim, typename SparseGridType >
SparseGridGpu_iterator< dim, SparseGridType >::SparseGridGpu_iterator ( )
inline

Definition at line 209 of file SparseGridGpu_iterator.hpp.

◆ SparseGridGpu_iterator() [2/2]

template<unsigned int dim, typename SparseGridType >
SparseGridGpu_iterator< dim, SparseGridType >::SparseGridGpu_iterator ( const SparseGridType &  sparseGrid)
inline

Constructor.

Parameters
idsvector of ids \para data vector of chunk data

Definition at line 225 of file SparseGridGpu_iterator.hpp.

Member Function Documentation

◆ get()

template<unsigned int dim, typename SparseGridType >
sparse_grid_gpu_index< SparseGridType > SparseGridGpu_iterator< dim, SparseGridType >::get ( ) const
inline

return the actual point

Returns
the index of the actual point

Definition at line 274 of file SparseGridGpu_iterator.hpp.

◆ isNext()

template<unsigned int dim, typename SparseGridType >
bool SparseGridGpu_iterator< dim, SparseGridType >::isNext ( ) const
inline

Check if there is the next element.

Check if there is the next element

Returns
true if there is the next, false otherwise

Definition at line 242 of file SparseGridGpu_iterator.hpp.

◆ operator++()

template<unsigned int dim, typename SparseGridType >
SparseGridGpu_iterator< dim, SparseGridType > & SparseGridGpu_iterator< dim, SparseGridType >::operator++ ( )
inline

Get the next element.

Get the next element

Returns
the next grid_key

Definition at line 254 of file SparseGridGpu_iterator.hpp.

◆ operator=()

template<unsigned int dim, typename SparseGridType >
SparseGridGpu_iterator< dim, SparseGridType > & SparseGridGpu_iterator< dim, SparseGridType >::operator= ( const SparseGridGpu_iterator< dim, SparseGridType > &  it)
inline

Definition at line 291 of file SparseGridGpu_iterator.hpp.

◆ reinitialize()

template<unsigned int dim, typename SparseGridType >
void SparseGridGpu_iterator< dim, SparseGridType >::reinitialize ( const SparseGridGpu_iterator< dim, SparseGridType > &  it)
inline

Reinitialize the iterator.

Parameters
it_subsubiterator

Definition at line 286 of file SparseGridGpu_iterator.hpp.

◆ SelectValid()

template<unsigned int dim, typename SparseGridType >
void SparseGridGpu_iterator< dim, SparseGridType >::SelectValid ( )
inlineprivate

Select the first valid point chunk.

Definition at line 188 of file SparseGridGpu_iterator.hpp.

Field Documentation

◆ chunk

template<unsigned int dim, typename SparseGridType >
unsigned int SparseGridGpu_iterator< dim, SparseGridType >::chunk
private

actual chunk

Definition at line 161 of file SparseGridGpu_iterator.hpp.

◆ data

template<unsigned int dim, typename SparseGridType >
const data_array_type* SparseGridGpu_iterator< dim, SparseGridType >::data
private

vector containing each chunks datas

Definition at line 179 of file SparseGridGpu_iterator.hpp.

◆ ids

template<unsigned int dim, typename SparseGridType >
const index_array_type* SparseGridGpu_iterator< dim, SparseGridType >::ids
private

vector of the chunk indexes

Definition at line 176 of file SparseGridGpu_iterator.hpp.

◆ pnt

template<unsigned int dim, typename SparseGridType >
unsigned int SparseGridGpu_iterator< dim, SparseGridType >::pnt
private

actual point inside the chunk

Definition at line 164 of file SparseGridGpu_iterator.hpp.

◆ sparseGrid

template<unsigned int dim, typename SparseGridType >
const SparseGridType* SparseGridGpu_iterator< dim, SparseGridType >::sparseGrid
private

original SparseGrid

Definition at line 167 of file SparseGridGpu_iterator.hpp.


The documentation for this class was generated from the following file: