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

Detailed Description

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

Definition at line 14 of file SparseGridGpu_iterator_sub.hpp.

Public Member Functions

 SparseGridGpu_iterator_sub ()
 Default constructor.
 
 SparseGridGpu_iterator_sub (const SparseGridType &sparseGrid, const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, int is_to_init)
 Constructor.
 
grid_key_dx< dim > getStart () const
 Return the starting point.
 
grid_key_dx< dim > getStop () const
 Return the stop point.
 
void reinitialize (const SparseGridGpu_iterator_sub< dim, SparseGridType > &it_sub)
 Reinitialize the iterator.
 
bool isNext () const
 Check if there is the next element.
 
SparseGridGpu_iterator_sub< dim, SparseGridType > & operator++ ()
 Get the next element.
 
sparse_grid_gpu_index< SparseGridType > get () const
 return the actual point
 
SparseGridGpu_iterator_sub< dim, SparseGridType > & operator= (const SparseGridGpu_iterator_sub< dim, SparseGridType > &it_sub)
 

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 initialize_chunk_it ()
 initialize the chunk interator
 
void SelectValid ()
 Select the first valid point chunk.
 
void initialize_chunk_sz ()
 Initialize chunk_sz member.
 

Private Attributes

unsigned int chunk
 actual chunk
 
const SparseGridType * sparseGrid
 original SparseGrid
 
grid_key_dx< dim, int > chunk_coord
 chunk coordinates
 
const std::remove_reference< decltype(sparseGrid->private_get_index_array())>::type * ids
 vector of the chunk indexes
 
const std::remove_reference< decltype(sparseGrid->private_get_data_array())>::type * data
 vector containing each chunks datas
 
Box< dim, int > sub_set
 
Box< dim, int > res
 
grid_key_dx_iterator_sub< dim > in_chunk_it
 
grid_sm< dim, void > chunk_sz
 

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_sub< dim, SparseGridType >::chunk_type
private

Definition at line 38 of file SparseGridGpu_iterator_sub.hpp.

◆ data_array_type

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

array type for the data

Definition at line 29 of file SparseGridGpu_iterator_sub.hpp.

◆ index_array_type

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

array type for the indexes

Definition at line 26 of file SparseGridGpu_iterator_sub.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_sub< dim, SparseGridType >::pMask
private

Definition at line 41 of file SparseGridGpu_iterator_sub.hpp.

Constructor & Destructor Documentation

◆ SparseGridGpu_iterator_sub() [1/2]

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

Default constructor.

Definition at line 129 of file SparseGridGpu_iterator_sub.hpp.

◆ SparseGridGpu_iterator_sub() [2/2]

template<unsigned int dim, typename SparseGridType >
SparseGridGpu_iterator_sub< dim, SparseGridType >::SparseGridGpu_iterator_sub ( const SparseGridType &  sparseGrid,
const grid_key_dx< dim > &  start,
const grid_key_dx< dim > &  stop,
int  is_to_init 
)
inline

Constructor.

Parameters
sparseGridoriginal sparse grid
startstarting point
stopstop point

Definition at line 145 of file SparseGridGpu_iterator_sub.hpp.

Member Function Documentation

◆ get()

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

return the actual point

Returns
the index of the actual point

Definition at line 230 of file SparseGridGpu_iterator_sub.hpp.

◆ getStart()

template<unsigned int dim, typename SparseGridType >
grid_key_dx< dim > SparseGridGpu_iterator_sub< dim, SparseGridType >::getStart ( ) const
inline

Return the starting point.

Returns
the start point

Definition at line 172 of file SparseGridGpu_iterator_sub.hpp.

◆ getStop()

template<unsigned int dim, typename SparseGridType >
grid_key_dx< dim > SparseGridGpu_iterator_sub< dim, SparseGridType >::getStop ( ) const
inline

Return the stop point.

Returns
the stop point

Definition at line 182 of file SparseGridGpu_iterator_sub.hpp.

◆ initialize_chunk_it()

template<unsigned int dim, typename SparseGridType >
void SparseGridGpu_iterator_sub< dim, SparseGridType >::initialize_chunk_it ( )
inlineprivate

initialize the chunk interator

Definition at line 59 of file SparseGridGpu_iterator_sub.hpp.

◆ initialize_chunk_sz()

template<unsigned int dim, typename SparseGridType >
void SparseGridGpu_iterator_sub< dim, SparseGridType >::initialize_chunk_sz ( )
inlineprivate

Initialize chunk_sz member.

Definition at line 114 of file SparseGridGpu_iterator_sub.hpp.

◆ isNext()

template<unsigned int dim, typename SparseGridType >
bool SparseGridGpu_iterator_sub< 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 204 of file SparseGridGpu_iterator_sub.hpp.

◆ operator++()

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

Get the next element.

Get the next element

Returns
the next grid_key

Definition at line 216 of file SparseGridGpu_iterator_sub.hpp.

◆ operator=()

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

Definition at line 237 of file SparseGridGpu_iterator_sub.hpp.

◆ reinitialize()

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

Reinitialize the iterator.

Parameters
it_subsubiterator

Definition at line 192 of file SparseGridGpu_iterator_sub.hpp.

◆ SelectValid()

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

Select the first valid point chunk.

Definition at line 95 of file SparseGridGpu_iterator_sub.hpp.

Field Documentation

◆ chunk

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

actual chunk

Definition at line 17 of file SparseGridGpu_iterator_sub.hpp.

◆ chunk_coord

template<unsigned int dim, typename SparseGridType >
grid_key_dx<dim,int> SparseGridGpu_iterator_sub< dim, SparseGridType >::chunk_coord
private

chunk coordinates

Definition at line 23 of file SparseGridGpu_iterator_sub.hpp.

◆ chunk_sz

template<unsigned int dim, typename SparseGridType >
grid_sm<dim,void> SparseGridGpu_iterator_sub< dim, SparseGridType >::chunk_sz
private

Definition at line 53 of file SparseGridGpu_iterator_sub.hpp.

◆ data

template<unsigned int dim, typename SparseGridType >
const std::remove_reference<decltype(sparseGrid->private_get_data_array())>::type* SparseGridGpu_iterator_sub< dim, SparseGridType >::data
private

vector containing each chunks datas

Definition at line 35 of file SparseGridGpu_iterator_sub.hpp.

◆ ids

template<unsigned int dim, typename SparseGridType >
const std::remove_reference<decltype(sparseGrid->private_get_index_array())>::type* SparseGridGpu_iterator_sub< dim, SparseGridType >::ids
private

vector of the chunk indexes

Definition at line 32 of file SparseGridGpu_iterator_sub.hpp.

◆ in_chunk_it

template<unsigned int dim, typename SparseGridType >
grid_key_dx_iterator_sub<dim> SparseGridGpu_iterator_sub< dim, SparseGridType >::in_chunk_it
private

Definition at line 50 of file SparseGridGpu_iterator_sub.hpp.

◆ res

template<unsigned int dim, typename SparseGridType >
Box<dim,int> SparseGridGpu_iterator_sub< dim, SparseGridType >::res
private

Definition at line 47 of file SparseGridGpu_iterator_sub.hpp.

◆ sparseGrid

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

original SparseGrid

Definition at line 20 of file SparseGridGpu_iterator_sub.hpp.

◆ sub_set

template<unsigned int dim, typename SparseGridType >
Box<dim,int> SparseGridGpu_iterator_sub< dim, SparseGridType >::sub_set
private

Definition at line 44 of file SparseGridGpu_iterator_sub.hpp.


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