This is an N-dimensional grid or an N-dimensional array with memory_traits_inte layout. More...
This is an N-dimensional grid or an N-dimensional array with memory_traits_inte layout.
it is basically an N-dimensional Cartesian grid
| dim | Dimensionality of the grid |
| T | type of object the grid store |
| Mem | memory layout |
Definition at line 28 of file grid_gpu.hpp.
#include <grid_gpu.hpp>
Public Types | |
| typedef int | yes_i_am_grid |
| it define that it is a grid | |
|
typedef memory_traits_inte < typename T::type >::type | memory_int |
| Definition of the layout. | |
| typedef Mem | memory_conf |
| Memory traits. | |
| typedef encapg< dim, T, Mem > | container |
| Object container for T, it is the return type of get_o it return a object type trough. | |
| typedef T | type |
Public Member Functions | |
| grid_gpu () THROW | |
| Default constructor. | |
| void | setDimensions (std::vector< size_t > &sz) |
| Set the grid dimensions. | |
| grid_gpu (std::vector< size_t > &sz) THROW | |
| Constructor it initialize the memory and give representation. | |
| const grid_sm< dim, void > & | getGrid () const |
| Return the internal grid information. More... | |
| void | setMemory () |
| Create the object that provide memory. More... | |
| template<unsigned int p> | |
| type_gpu_prop< p, memory_int > ::type::reference | get (grid_key_d< dim, p > &v1) |
| template<unsigned int p> | |
| type_gpu_prop< p, memory_int > ::type::reference | get (grid_key_dx< dim > &v1) |
| encapg< dim, T, Mem > | get_o (grid_key_dx< dim > &v1) |
| Get the of the selected element as a boost::fusion::vector. More... | |
| const encapg< dim, T, Mem > | get_o (grid_key_dx< dim > &v1) const |
| Get the of the selected element as a boost::fusion::vector. More... | |
| size_t | size () |
| void | set_memory (memory &mem) |
| grid_key_dx_iterator< dim > | getIterator () |
| Return a grid iterator. More... | |
| grid_key_dx_iterator_sub< dim > | getSubIterator (grid_key_dx< dim > &start, grid_key_dx< dim > &stop) |
| Return a sub-grid iterator. More... | |
| void | swap (grid_gpu< dim, T, S, Mem > &obj) |
| Swap the memory of another grid. More... | |
Private Types | |
| typedef grid_key_dx< dim > | access_key |
| Access the key. | |
Private Attributes | |
| bool | is_mem_init = false |
| grid_sm< dim, void > | g1 |
| It store all the information regarding the grid. | |
| Mem | data_ |
|
inline |
Get the of the selected element as a boost::fusion::vector.
Get the selected element as a boost::fusion::vector
| v1 | grid_key that identify the element in the grid |
Definition at line 123 of file grid_gpu.hpp.
|
inline |
Get the of the selected element as a boost::fusion::vector.
Get the selected element as a boost::fusion::vector
| v1 | grid_key that identify the element in the grid |
Definition at line 135 of file grid_gpu.hpp.
|
inline |
Return the internal grid information.
Definition at line 84 of file grid_gpu.hpp.
|
inline |
Return a grid iterator.
Return a grid iterator, to iterate through the grid
Definition at line 159 of file grid_gpu.hpp.
|
inline |
Return a sub-grid iterator.
Return a sub-grid iterator, to iterate through the grid
Definition at line 171 of file grid_gpu.hpp.
|
inline |
this function set the memory interface if required this operation is required when we define a void memory allocator
Definition at line 148 of file grid_gpu.hpp.
|
inline |
Create the object that provide memory.
| S | memory object type |
Create an allocate object
for each element in the vector allocate the buffer
Definition at line 95 of file grid_gpu.hpp.
|
inline |
Swap the memory of another grid.
Swap the memory of another grid
| obj | Memory to swap with |
Definition at line 183 of file grid_gpu.hpp.
|
private |
This is the interface to allocate,resize ... memory and give also a representation to the allocated memory
Definition at line 41 of file grid_gpu.hpp.