Commit 9234d279 authored by incardon's avatar incardon

Refactoring data on several parts

parent 1e67b751
Pipeline #3192 passed with stages
in 12 minutes and 19 seconds
......@@ -300,7 +300,8 @@ public:
* \return an encap_c that is the representation of the object (careful is not the object)
*
*/
__device__ inline encapc<dim,T_,layout> get_o(const grid_key_dx<dim> & v1)
template<typename Tk>
__device__ inline encapc<dim,T_,layout> get_o(const grid_key_dx<dim,Tk> & v1)
{
#ifdef SE_CLASS1
if (check_bound(v1) == false)
......@@ -320,7 +321,8 @@ public:
* \return an encap_c that is the representation of the object (careful is not the object)
*
*/
__device__ inline const encapc<dim,T_,layout> get_o(const grid_key_dx<dim> & v1) const
template<typename Tk>
__device__ inline const encapc<dim,T_,layout> get_o(const grid_key_dx<dim,Tk> & v1) const
{
#ifdef SE_CLASS1
if (check_bound(v1) == false)
......
......@@ -857,6 +857,24 @@ public:
return layout_base<T>::template get<p>(data_,g1,v1);
}
/*! \brief No blocks here, it return 1
*
* \return 1
*/
int getBlockEdgeSize()
{
return 1;
}
/*! \brief No blocks here, it does nothing
*
* \param nb unused
* \param nt unused
*
*/
void setGPUInsertBuffer(unsigned int nb, unsigned int nt)
{}
/*! \brief Get the const reference of the selected element
*
* \param v1 grid_key that identify the element in the grid
......
......@@ -59,6 +59,15 @@
typedef HeapMemory CudaMemory;
#endif
/*! \brief get the type of the SetBlock
*
*
*/
template<typename SGridGpu>
struct GetSetBlockType
{
typedef typename SGridGpu::device_grid_type::container type;
};
/*! Stub grid class
*
......
......@@ -257,7 +257,7 @@ namespace openfpm
*
*/
inline __device__ __host__ auto get_o(unsigned int id) const -> decltype(base.get_o(id))
inline __device__ __host__ auto get_o(unsigned int id) const -> decltype(base.get_o(grid_key_dx<1>(id)))
{
#ifdef SE_CLASS1
if (check_bound(id) == false)
......@@ -281,7 +281,7 @@ namespace openfpm
*
*/
inline __device__ __host__ auto get_o(unsigned int id) -> decltype(base.get_o(id))
inline __device__ __host__ auto get_o(unsigned int id) -> decltype(base.get_o(grid_key_dx<1>(id)))
{
#ifdef SE_CLASS1
if (check_bound(id) == false)
......@@ -298,7 +298,7 @@ namespace openfpm
* \return the last element (encapsulated)
*
*/
inline auto last() const -> decltype(base.get_o(0))
inline auto last() const -> decltype(base.get_o(grid_key_dx<1>(0)))
{
grid_key_dx<1> key(size()-1);
......@@ -333,7 +333,7 @@ namespace openfpm
* \return the element (encapsulated)
*
*/
inline auto last() -> decltype(base.get_o(0))
inline auto last() -> decltype(base.get_o(grid_key_dx<1>(0)))
{
grid_key_dx<1> key(size()-1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment