grid_key_dx is the key to access any element in the grid More...
grid_key_dx is the key to access any element in the grid
Given a grid in general a set of indexes define one element in the grid For example 2 indexes identify one element on a two dimensional grid, 3 indexes on a 3 dimensional grid ...
dim | dimensionality of the grid |
Definition at line 18 of file grid_key.hpp.
#include <grid_key.hpp>
Public Member Functions | |
template<typename exp1 > | |
__device__ __host__ | grid_key_dx (const grid_key_dx_expression< dim, exp1 > &exp) |
Constructor from expression. | |
__device__ __host__ | grid_key_dx () |
Constructor. | |
__device__ __host__ | grid_key_dx (std::initializer_list< long int > p1) |
Constructor from initializer list. | |
__device__ __host__ | grid_key_dx (const grid_key_dx< dim, index_type > &key) |
Constructor from an other key. | |
__device__ __host__ | grid_key_dx (const size_t(&k)[dim]) |
Constructor from buffer reference. | |
__device__ __host__ | grid_key_dx (const long int(&k)[dim]) |
Constructor from buffer reference. | |
__device__ __host__ | grid_key_dx (const short(&k)[dim]) |
Constructor from buffer reference. | |
__device__ __host__ | grid_key_dx (const unsigned short(&k)[dim]) |
Constructor from buffer reference. | |
__device__ __host__ | grid_key_dx (const int(&k)[dim]) |
Constructor from buffer reference. | |
__device__ __host__ | grid_key_dx (const unsigned int(&k)[dim]) |
Constructor from buffer reference. | |
template<typename ... T> | |
grid_key_dx (const comb< dim > &cmb) | |
Construct a grid key from a list of numbers. | |
template<typename ... T> | |
__device__ __host__ | grid_key_dx (const size_t v, const T...t) |
Construct a grid key from a list of numbers. | |
__device__ __host__ grid_key_dx< dim, index_type > | move (int i, int m) const |
void | zero () |
Set to zero the key. | |
void | one () |
Set to one the key. | |
void | invalid () |
Set to invalid the key. | |
bool | isValid () |
Check if the key is invalid (all components set to -1) | |
__device__ __host__ grid_key_dx< dim, index_type > & | operator+= (const grid_key_dx< dim, index_type > &p) |
sum a grid_key | |
__device__ __host__ grid_key_dx< dim, index_type > & | operator-= (const grid_key_dx< dim, index_type > &p) |
sum a grid_key | |
__device__ __host__ grid_key_dx_sum< dim, grid_key_dx< dim, index_type >, grid_key_dx< dim, index_type > > | operator+ (const grid_key_dx< dim, index_type > &p) const |
sum a grid_key to the grid_key | |
__device__ __host__ grid_key_dx_sum< dim, grid_key_dx< dim >, Point< dim, long int > > | operator+ (const Point< dim, long int > &p) const |
sum a point to the grid_key | |
__device__ __host__ grid_key_dx_sum< dim, grid_key_dx< dim >, comb< dim > > | operator+ (const comb< dim > &cmb) const |
sum an a combination to the grid_key | |
__device__ __host__ grid_key_dx_sub< dim, grid_key_dx< dim, index_type >, grid_key_dx< dim, index_type > > | operator- (const grid_key_dx< dim, index_type > &cmb) const |
sum an a combination to the grid_key | |
template<typename T > | |
__device__ __host__ grid_key_dx_sub< dim, grid_key_dx< dim, index_type >, grid_key_dx_expression< dim, T > > | operator- (const grid_key_dx_expression< dim, T > &cmb) const |
sum this key to another grid expression | |
template<unsigned int dim_t> | |
bool | operator== (const grid_key_dx< dim_t, index_type > &key_t) const |
Check if two key are the same. | |
template<unsigned int dim_t> | |
bool | operator!= (const grid_key_dx< dim_t, index_type > &key_t) |
Check if two key are the same. | |
bool | operator< (const grid_key_dx< dim, index_type > &key_t) const |
Check order of two keys. | |
template<typename a , typename ... T> | |
__device__ __host__ void | set (a v, T...t) |
set the Key from a list of numbers | |
const long int(& | get_k () const)[dim] |
Return the internal k structure. | |
Point< dim, long int > | toPointS () const |
Convert to a point the grid_key_dx. | |
std::string | to_string () const |
convert the information into a string | |
template<typename typeT = size_t> | |
__host__ __device__ Point< dim, typeT > | toPoint () const |
Convert to a point the grid_key_dx. | |
__device__ __host__ mem_id | value (size_t i) const |
Get the i index. | |
__device__ __host__ index_type | operator[] (index_type i) const |
Get the i index. | |
__device__ __host__ index_type | get (index_type i) const |
Get the i index. | |
__device__ __host__ void | set_d (index_type i, index_type id) |
Set the i index. | |
template<typename a , typename ... T> | |
grid_key_dx (a v, T...t) | |
template<typename a , typename ... T> | |
void | set (a v, T...t) |
Static Public Member Functions | |
static bool | noPointers () |
Data Fields | |
mem_id | k [dim] |
Private Member Functions | |
template<typename a , typename ... T> | |
__device__ __host__ void | invert_assign (a v, T...t) |
Recursively invert the assignment. | |
template<typename a , typename ... T> | |
__device__ __host__ void | invert_assign (a v) |
assignment | |
__device__ __host__ void | invert_assign () |
Constructor. | |
template<typename a , typename ... T> | |
void | invert_assign (a v, T...t) |
template<typename a , typename ... T> | |
void | invert_assign (a v) |
Private Attributes | |
index_type | k [dim] |
structure that store all the index | |
|
inline |
Constructor from expression.
exp | grid_key_dx expression |
Definition at line 28 of file grid_key.hpp.
|
inline |
Constructor.
Definition at line 35 of file grid_key.hpp.
|
inline |
Constructor from initializer list.
p1 | initializer list |
Definition at line 43 of file grid_key.hpp.
|
inline |
Constructor from an other key.
key | copy constructor |
Definition at line 60 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 70 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 81 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 92 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 103 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 114 of file grid_key.hpp.
|
inline |
Constructor from buffer reference.
k | reference buffer |
Definition at line 125 of file grid_key.hpp.
|
inline |
Construct a grid key from a list of numbers.
cmb | combination |
Definition at line 136 of file grid_key.hpp.
|
inline |
Construct a grid key from a list of numbers.
v | number |
t | the other numbers |
Definition at line 148 of file grid_key.hpp.
|
inline |
Definition at line 32 of file grid_test.hpp.
|
inline |
Definition at line 36 of file grid_test.hpp.
|
inline |
Get the i index.
i | index to get |
Definition at line 503 of file grid_key.hpp.
|
inline |
|
inline |
Set to invalid the key.
Definition at line 188 of file grid_key.hpp.
|
inlineprivate |
Constructor.
Definition at line 557 of file grid_key.hpp.
|
inlineprivate |
|
inlineprivate |
Definition at line 58 of file grid_test.hpp.
|
inlineprivate |
Recursively invert the assignment.
Recursively invert the assignment at compile-time (hopefully)
v | list of numbers |
t | list of numbers |
Definition at line 540 of file grid_key.hpp.
|
inlineprivate |
Definition at line 52 of file grid_test.hpp.
|
inline |
Check if the key is invalid (all components set to -1)
Definition at line 199 of file grid_key.hpp.
|
inline |
Definition at line 158 of file grid_key.hpp.
|
inlinestatic |
Definition at line 388 of file grid_key.hpp.
|
inline |
Set to one the key.
Definition at line 179 of file grid_key.hpp.
|
inline |
Check if two key are the same.
key_t | key to check |
Definition at line 356 of file grid_key.hpp.
|
inline |
sum an a combination to the grid_key
cmb | combination (or relative movement) |
Definition at line 282 of file grid_key.hpp.
|
inline |
sum a grid_key to the grid_key
p | grid_key to sum |
Definition at line 251 of file grid_key.hpp.
|
inline |
sum a point to the grid_key
p | point (or relative movement) |
Definition at line 267 of file grid_key.hpp.
|
inline |
sum a grid_key
p | comb combination (or relative movement) |
Definition at line 218 of file grid_key.hpp.
|
inline |
sum an a combination to the grid_key
cmb | combination (or relative movement) |
Definition at line 298 of file grid_key.hpp.
|
inline |
sum this key to another grid expression
cmb | expression |
Definition at line 313 of file grid_key.hpp.
|
inline |
sum a grid_key
p | comb combination (or relative movement) |
Definition at line 234 of file grid_key.hpp.
|
inline |
Check order of two keys.
key_t | key to check |
Definition at line 368 of file grid_key.hpp.
|
inline |
Check if two key are the same.
key_t | key to check |
Definition at line 327 of file grid_key.hpp.
|
inline |
Get the i index.
i | index to get |
Definition at line 490 of file grid_key.hpp.
|
inline |
set the Key from a list of numbers
v | list of number |
t | list of number |
Definition at line 400 of file grid_key.hpp.
|
inline |
Definition at line 42 of file grid_test.hpp.
|
inline |
Set the i index.
Set the i index
i | index to set |
id | value to set |
Definition at line 516 of file grid_key.hpp.
|
inline |
|
inline |
Convert to a point the grid_key_dx.
Definition at line 457 of file grid_key.hpp.
|
inline |
Convert to a point the grid_key_dx.
Definition at line 427 of file grid_key.hpp.
|
inline |
Get the i index.
i | index to get |
Definition at line 477 of file grid_key.hpp.
|
inline |
Set to zero the key.
Definition at line 170 of file grid_key.hpp.
|
private |
structure that store all the index
Definition at line 530 of file grid_key.hpp.
mem_id grid_key_dx< dim, index_type >::k[dim] |
Definition at line 48 of file grid_test.hpp.