diff --git a/src/Vector/cuda/map_vector_cuda_ker.cuh b/src/Vector/cuda/map_vector_cuda_ker.cuh index cbff551223c82b36bd8ae1d1f00a410fec4ce980..fef74515af0fbb1f02bce9b03f0b2b39a01a4f58 100644 --- a/src/Vector/cuda/map_vector_cuda_ker.cuh +++ b/src/Vector/cuda/map_vector_cuda_ker.cuh @@ -534,6 +534,13 @@ namespace openfpm return getGPUIterator(n_thr); } + //Stub for some expression + void init() const {} + + __host__ __device__ auto value(unsigned int p) -> decltype(base.template get<0>(grid_key_dx<1>(0))) + { + return get<0>(p); + } /*! \brief Get an iterator for the GPU * * @@ -546,6 +553,7 @@ namespace openfpm return base.getGPUIterator(start,stop_,n_thr); } + /*! \brief operator= this operator absorb the pointers, consider that this object wrap device pointers * * \param object to copy @@ -559,6 +567,16 @@ namespace openfpm return *this; } + __device__ __host__ vector_gpu_ker<T,layout_base> & getVector() + { + return *this; + } + + __device__ __host__ const vector_gpu_ker<T,layout_base> & getVector() const + { + return *this; + } + /*! \brief Return the base * * \return the base @@ -742,6 +760,16 @@ namespace openfpm return vref.getGPUItertatorTo(stop,n_thr); } + vector_gpu_ker<T,layout_base> & getVector() + { + return *this; + } + + const vector_gpu_ker<T,layout_base> & getVector() const + { + return *this; + } + __host__ vector_gpu_ker_ref<T,layout_base> & operator=(const vector_gpu_ker<T,layout_base> & v) { vref.operator=(v);