Transform the boost::fusion::vector into memory specification (memory_traits)
More...
#include <memory_conf.hpp>
|
|
typedef inter_memc< typename T::type >::type | type |
| | for each element in the vector interleave memory_c
|
| |
|
typedef int | yes_is_inte |
| | indicate that it change the memory layout from the original
|
| |
|
typedef boost::mpl::int_< SOA_layout_IA > | type_value |
| |
|
| template<unsigned int p, typename data_type , typename g1_type , typename key_type > |
| __host__ static __device__ auto | get (data_type &data_, const g1_type &g1, const key_type &v1) -> decltype(boost::fusion::at_c< p >(data_).mem_r.operator[](g1.LinId(v1))) |
| | Return a reference to the selected element. More...
|
| |
| template<unsigned int p, typename data_type , typename g1_type > |
| __host__ static __device__ auto | get_lin (data_type &data_, const g1_type &g1, size_t lin_id) -> decltype(boost::fusion::at_c< p >(data_).mem_r.operator[](lin_id)) |
| | Return a reference to the selected element. More...
|
| |
| template<unsigned int p, typename data_type , typename g1_type , typename key_type > |
| __host__ static __device__ auto | get_c (const data_type &data_, const g1_type &g1, const key_type &v1) -> decltype(boost::fusion::at_c< p >(data_).mem_r.operator[](g1.LinId(v1))) |
| | Return a reference to the selected element. More...
|
| |
| template<unsigned int p, typename data_type , typename g1_type > |
| __host__ static __device__ auto | get_lin_c (const data_type &data_, const g1_type &g1, size_t lin_id) -> decltype(boost::fusion::at_c< p >(data_).mem_r.operator[](lin_id)) |
| | Return a reference to the selected element. More...
|
| |
| template<typename S , typename data_type , unsigned int ... prp> |
| static void | hostToDevice (data_type &data_, size_t start, size_t stop) |
| | Synchronize the memory buffer in the device with the memory in the host. More...
|
| |
| template<typename data_type , unsigned int ... prp> |
| static void | deviceToHost (data_type &data_, size_t start, size_t stop) |
| | Synchronize the memory buffer in the device with the memory in the host. More...
|
| |
template<typename T>
struct memory_traits_inte< T >
Transform the boost::fusion::vector into memory specification (memory_traits)
Transform the boost::fusion::vector into memory_traits. In this implementation we interleave each property of the base type with memory_c
We basically create a buffer for each property
- See also
- see inter_mem_c for detail
- Parameters
-
| T | base type (T::type must define a boost::fusion::vector ) |
Definition at line 83 of file memory_conf.hpp.
◆ deviceToHost()
template<typename T >
template<typename data_type , unsigned int ... prp>
| static void memory_traits_inte< T >::deviceToHost |
( |
data_type & |
data_, |
|
|
size_t |
start, |
|
|
size_t |
stop |
|
) |
| |
|
inlinestatic |
Synchronize the memory buffer in the device with the memory in the host.
- Parameters
-
| start | starting element to transfer |
| stop | stop element to transfer |
- Template Parameters
-
Definition at line 178 of file memory_conf.hpp.
◆ get()
template<typename T >
template<unsigned int p, typename data_type , typename g1_type , typename key_type >
| __host__ static __device__ auto memory_traits_inte< T >::get |
( |
data_type & |
data_, |
|
|
const g1_type & |
g1, |
|
|
const key_type & |
v1 |
|
) |
| -> decltype(boost::fusion::at_c<p>(data_).mem_r.operator[](g1.LinId(v1)))
|
|
inlinestatic |
Return a reference to the selected element.
- Parameters
-
| data | object from where to take the element |
| g1 | grid information |
| v1 | element id |
- Returns
- a reference to the object selected
Definition at line 103 of file memory_conf.hpp.
◆ get_c()
template<typename T >
template<unsigned int p, typename data_type , typename g1_type , typename key_type >
| __host__ static __device__ auto memory_traits_inte< T >::get_c |
( |
const data_type & |
data_, |
|
|
const g1_type & |
g1, |
|
|
const key_type & |
v1 |
|
) |
| -> decltype(boost::fusion::at_c<p>(data_).mem_r.operator[](g1.LinId(v1)))
|
|
inlinestatic |
Return a reference to the selected element.
- Parameters
-
| data | object from where to take the element |
| g1 | grid information |
| v1 | element id |
- Returns
- a const reference to the object selected
Definition at line 133 of file memory_conf.hpp.
◆ get_lin()
template<typename T >
template<unsigned int p, typename data_type , typename g1_type >
| __host__ static __device__ auto memory_traits_inte< T >::get_lin |
( |
data_type & |
data_, |
|
|
const g1_type & |
g1, |
|
|
size_t |
lin_id |
|
) |
| -> decltype(boost::fusion::at_c<p>(data_).mem_r.operator[](lin_id))
|
|
inlinestatic |
Return a reference to the selected element.
- Parameters
-
| data | object from where to take the element |
| g1 | grid information |
| v1 | element id |
- Returns
- a reference to the object selected
Definition at line 118 of file memory_conf.hpp.
◆ get_lin_c()
template<typename T >
template<unsigned int p, typename data_type , typename g1_type >
| __host__ static __device__ auto memory_traits_inte< T >::get_lin_c |
( |
const data_type & |
data_, |
|
|
const g1_type & |
g1, |
|
|
size_t |
lin_id |
|
) |
| -> decltype(boost::fusion::at_c<p>(data_).mem_r.operator[](lin_id))
|
|
inlinestatic |
Return a reference to the selected element.
- Parameters
-
| data | object from where to take the element |
| g1 | grid information |
| v1 | element id |
- Returns
- a const reference to the object selected
Definition at line 148 of file memory_conf.hpp.
◆ hostToDevice()
template<typename T >
template<typename S , typename data_type , unsigned int ... prp>
| static void memory_traits_inte< T >::hostToDevice |
( |
data_type & |
data_, |
|
|
size_t |
start, |
|
|
size_t |
stop |
|
) |
| |
|
inlinestatic |
Synchronize the memory buffer in the device with the memory in the host.
- Parameters
-
| start | starting element to transfer |
| stop | stop element to transfer |
- Template Parameters
-
Definition at line 162 of file memory_conf.hpp.
The documentation for this struct was generated from the following file: