38 #ifndef PCL_GPU_CONTAINER_DEVICE_ARRAY_IMPL_HPP_ 39 #define PCL_GPU_CONTAINER_DEVICE_ARRAY_IMPL_HPP_ 55 { DeviceMemory::operator=(other);
return *
this; }
58 { DeviceMemory::create(size * elem_size); }
60 { DeviceMemory::release(); }
63 { DeviceMemory::copyTo(other); }
65 { DeviceMemory::upload(host_ptr, size * elem_size); }
67 { DeviceMemory::download( host_ptr ); }
78 template<
class T>
template<
class A>
inline void DeviceArray<T>::upload(
const std::vector<T, A>& data) { upload(&data[0], data.size()); }
79 template<
class T>
template<
class A>
inline void DeviceArray<T>::download(std::vector<T, A>& data)
const { data.resize(size());
if (!data.empty()) download(&data[0]); }
88 { DeviceMemory2D::operator=(other);
return *
this; }
91 { DeviceMemory2D::create(rows, cols * elem_size); }
93 { DeviceMemory2D::release(); }
96 { DeviceMemory2D::copyTo(other); }
98 { DeviceMemory2D::upload(host_ptr, host_step, rows, cols * elem_size); }
100 { DeviceMemory2D::download( host_ptr, host_step ); }
103 { upload(&data[0], cols * elem_size, data.size()/cols, cols); }
106 { elem_step = cols(); data.resize(cols() * rows());
if (!data.empty()) download(&data[0], colsBytes()); }
DeviceArray()
Empty constructor.