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

grid_key_dx is the key to access any element in the grid More...

Detailed Description

template<unsigned int dim, typename T>
class space_key_dx< dim, T >

grid_key_dx is the key to access any element in the grid

grid_key_dx is the key to access any element in the grid

Template Parameters
dimdimensionality of the grid
Ttype of the space float, double, complex, ...

Definition at line 22 of file space_key.hpp.

#include <space_key.hpp>

Public Member Functions

 space_key_dx ()
 Constructor.
 
 space_key_dx (T(&k)[dim])
 Constructor from buffer.
 
 space_key_dx (const T(&k)[dim])
 Constructor from buffer.
 
 space_key_dx (const T v, const T...t)
 Construct a grid key from a list of numbers.
 
void zero ()
 Set to zero the key.
 
void invalid ()
 Set to invalid the key.
 
template<unsigned int dim_t>
bool operator== (space_key_dx< dim_t, T > &key_t)
 
template<typename a , typename ... T>
void set (a v, T...t)
 set the grid key from a list of numbers
 
mem_id value (size_t i) const
 Get the i index.
 
mem_id get (size_t i) const
 Get the i index.
 
void set_d (size_t i, mem_id id)
 Set the i index.
 

Data Fields

mem_id k [dim]
 structure that store all the index
 

Private Member Functions

template<typename a , typename ... T>
void invert_assign (a v, T...t)
 Recursively invert the assignment.
 
template<typename a , typename ... T>
void invert_assign (a v)
 
void invert_assign ()
 

Constructor & Destructor Documentation

◆ space_key_dx() [1/4]

template<unsigned int dim, typename T >
space_key_dx< dim, T >::space_key_dx ( )
inline

Constructor.

Definition at line 27 of file space_key.hpp.

◆ space_key_dx() [2/4]

template<unsigned int dim, typename T >
space_key_dx< dim, T >::space_key_dx ( T(&)  k[dim])
inline

Constructor from buffer.

Definition at line 31 of file space_key.hpp.

◆ space_key_dx() [3/4]

template<unsigned int dim, typename T >
space_key_dx< dim, T >::space_key_dx ( const T(&)  k[dim])
inline

Constructor from buffer.

Definition at line 38 of file space_key.hpp.

◆ space_key_dx() [4/4]

template<unsigned int dim, typename T >
space_key_dx< dim, T >::space_key_dx ( const T  v,
const T...  t 
)
inline

Construct a grid key from a list of numbers.

Definition at line 45 of file space_key.hpp.

Member Function Documentation

◆ get()

template<unsigned int dim, typename T >
mem_id space_key_dx< dim, T >::get ( size_t  i) const
inline

Get the i index.

Parameters
iindex to get
Returns
the index value

Definition at line 127 of file space_key.hpp.

◆ invalid()

template<unsigned int dim, typename T >
void space_key_dx< dim, T >::invalid ( )
inline

Set to invalid the key.

Definition at line 63 of file space_key.hpp.

◆ invert_assign() [1/3]

template<unsigned int dim, typename T >
void space_key_dx< dim, T >::invert_assign ( )
inlineprivate

Definition at line 172 of file space_key.hpp.

◆ invert_assign() [2/3]

template<unsigned int dim, typename T >
template<typename a , typename ... T>
void space_key_dx< dim, T >::invert_assign ( v)
inlineprivate

Definition at line 167 of file space_key.hpp.

◆ invert_assign() [3/3]

template<unsigned int dim, typename T >
template<typename a , typename ... T>
void space_key_dx< dim, T >::invert_assign ( v,
T...  t 
)
inlineprivate

Recursively invert the assignment.

Recursively invert the assignment at compile-time

Definition at line 161 of file space_key.hpp.

◆ operator==()

template<unsigned int dim, typename T >
template<unsigned int dim_t>
bool space_key_dx< dim, T >::operator== ( space_key_dx< dim_t, T > &  key_t)
inline

Definition at line 79 of file space_key.hpp.

◆ set()

template<unsigned int dim, typename T >
template<typename a , typename ... T>
void space_key_dx< dim, T >::set ( v,
T...  t 
)
inline

set the grid key from a list of numbers

Definition at line 101 of file space_key.hpp.

◆ set_d()

template<unsigned int dim, typename T >
void space_key_dx< dim, T >::set_d ( size_t  i,
mem_id  id 
)
inline

Set the i index.

Set the i index

Parameters
iindex to set
idvalue to set

Definition at line 140 of file space_key.hpp.

◆ value()

template<unsigned int dim, typename T >
mem_id space_key_dx< dim, T >::value ( size_t  i) const
inline

Get the i index.

Parameters
iindex to get
Returns
the index value

Definition at line 114 of file space_key.hpp.

◆ zero()

template<unsigned int dim, typename T >
void space_key_dx< dim, T >::zero ( )
inline

Set to zero the key.

Definition at line 53 of file space_key.hpp.

Field Documentation

◆ k

template<unsigned int dim, typename T >
mem_id space_key_dx< dim, T >::k[dim]

structure that store all the index

Definition at line 152 of file space_key.hpp.


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