OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
sparse_grid_gpu_index< SparseGridGpu_type > Class Template Reference

Element index contain a data chunk index and a point index. More...

Detailed Description

template<typename SparseGridGpu_type>
class sparse_grid_gpu_index< SparseGridGpu_type >

Element index contain a data chunk index and a point index.

Template Parameters
SparseGridGputype

Definition at line 17 of file SparseGridGpu_iterator.hpp.

#include <SparseGridGpu_iterator.hpp>

Public Member Functions

 sparse_grid_gpu_index (const SparseGridGpu_type &sparseGrid, int cnk_pos_id, int data_id)
 Constructor from SparseGridGpu.
 
Point< SparseGridGpu_type::dims, size_t > toPoint () const
 Convert to a point this index.
 
int get_cnk_pos_id () const
 Get chunk position id.
 
int get_data_id () const
 Get chunk local index (the returned index < getblockSize())
 
void set_cnk_pos_id (int cnk_pos_id)
 Set chunk position id.
 
void set_data_id (int data_id)
 Set chunk local index (the returned index < getblockSize())
 
grid_key_dx< SparseGridGpu_type::dims > operator+ (const Point< SparseGridGpu_type::dims, size_t > &p)
 return toPoint() + p
 
void set_d (size_t i, int n)
 set the position of this key in direction i to n
 
unsigned int get (unsigned int i) const
 

Private Attributes

int cnk_pos_id
 chunk position id
 
int data_id
 data id
 
const SparseGridGpu_type & sparseGrid
 SparseGridGpu used to add functionalities.
 

Constructor & Destructor Documentation

◆ sparse_grid_gpu_index()

template<typename SparseGridGpu_type >
sparse_grid_gpu_index< SparseGridGpu_type >::sparse_grid_gpu_index ( const SparseGridGpu_type &  sparseGrid,
int  cnk_pos_id,
int  data_id 
)
inline

Constructor from SparseGridGpu.

Definition at line 34 of file SparseGridGpu_iterator.hpp.

Member Function Documentation

◆ get()

template<typename SparseGridGpu_type >
unsigned int sparse_grid_gpu_index< SparseGridGpu_type >::get ( unsigned int  i) const
inline

Definition at line 149 of file SparseGridGpu_iterator.hpp.

◆ get_cnk_pos_id()

template<typename SparseGridGpu_type >
int sparse_grid_gpu_index< SparseGridGpu_type >::get_cnk_pos_id ( ) const
inline

Get chunk position id.

Return the position of the chunk in the chunks array

See also
SparseGridGpu
private_get_data_array
Returns
Get chunk position id

Definition at line 68 of file SparseGridGpu_iterator.hpp.

◆ get_data_id()

template<typename SparseGridGpu_type >
int sparse_grid_gpu_index< SparseGridGpu_type >::get_data_id ( ) const
inline

Get chunk local index (the returned index < getblockSize())

Returns
Get chunk position id

Definition at line 78 of file SparseGridGpu_iterator.hpp.

◆ operator+()

template<typename SparseGridGpu_type >
grid_key_dx< SparseGridGpu_type::dims > sparse_grid_gpu_index< SparseGridGpu_type >::operator+ ( const Point< SparseGridGpu_type::dims, size_t > &  p)
inline

return toPoint() + p

Parameters
pthe point p
Returns
toPoint() + p

Definition at line 111 of file SparseGridGpu_iterator.hpp.

◆ set_cnk_pos_id()

template<typename SparseGridGpu_type >
void sparse_grid_gpu_index< SparseGridGpu_type >::set_cnk_pos_id ( int  cnk_pos_id)
inline

Set chunk position id.

Parameters
cnk_pos_idchunk position id

Definition at line 89 of file SparseGridGpu_iterator.hpp.

◆ set_d()

template<typename SparseGridGpu_type >
void sparse_grid_gpu_index< SparseGridGpu_type >::set_d ( size_t  i,
int  n 
)
inline

set the position of this key in direction i to n

Parameters
idirection
nposition

Definition at line 130 of file SparseGridGpu_iterator.hpp.

◆ set_data_id()

template<typename SparseGridGpu_type >
void sparse_grid_gpu_index< SparseGridGpu_type >::set_data_id ( int  data_id)
inline

Set chunk local index (the returned index < getblockSize())

Parameters
data_idlocal id

Definition at line 99 of file SparseGridGpu_iterator.hpp.

◆ toPoint()

template<typename SparseGridGpu_type >
Point< SparseGridGpu_type::dims, size_t > sparse_grid_gpu_index< SparseGridGpu_type >::toPoint ( ) const
inline

Convert to a point this index.

See also
toPointS
Returns
a point unsigned long int

Definition at line 45 of file SparseGridGpu_iterator.hpp.

Field Documentation

◆ cnk_pos_id

template<typename SparseGridGpu_type >
int sparse_grid_gpu_index< SparseGridGpu_type >::cnk_pos_id
private

chunk position id

Definition at line 20 of file SparseGridGpu_iterator.hpp.

◆ data_id

template<typename SparseGridGpu_type >
int sparse_grid_gpu_index< SparseGridGpu_type >::data_id
private

data id

Definition at line 23 of file SparseGridGpu_iterator.hpp.

◆ sparseGrid

template<typename SparseGridGpu_type >
const SparseGridGpu_type& sparse_grid_gpu_index< SparseGridGpu_type >::sparseGrid
private

SparseGridGpu used to add functionalities.

Definition at line 26 of file SparseGridGpu_iterator.hpp.


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