37 #ifndef PCL_GPU_CONTAINER_DEVICE_ARRAY_IMPL_HPP_
38 #define PCL_GPU_CONTAINER_DEVICE_ARRAY_IMPL_HPP_
67 DeviceMemory::operator=(other);
75 DeviceMemory::create(size * elem_size);
82 DeviceMemory::release();
89 DeviceMemory::copyTo(other);
96 DeviceMemory::upload(host_ptr, size * elem_size);
102 std::size_t device_begin_offset,
103 std::size_t num_elements)
105 std::size_t begin_byte_offset = device_begin_offset *
sizeof(T);
106 std::size_t num_bytes = num_elements *
sizeof(T);
107 return DeviceMemory::upload(host_ptr, begin_byte_offset, num_bytes);
114 DeviceMemory::download(host_ptr);
120 std::size_t device_begin_offset,
121 std::size_t num_elements)
const
123 std::size_t begin_byte_offset = device_begin_offset *
sizeof(T);
124 std::size_t num_bytes = num_elements *
sizeof(T);
125 return DeviceMemory::download(host_ptr, begin_byte_offset, num_bytes);
132 DeviceMemory::swap(other_arg);
151 return sizeBytes() / elem_size;
158 return DeviceMemory::ptr<T>();
165 return DeviceMemory::ptr<T>();
173 upload(&data[0], data.size());
201 std::size_t stepBytes)
214 DeviceMemory2D::operator=(other);
222 DeviceMemory2D::create(rows, cols * elem_size);
229 DeviceMemory2D::release();
236 DeviceMemory2D::copyTo(other);
242 std::size_t host_step,
246 DeviceMemory2D::upload(host_ptr, host_step, rows, cols * elem_size);
253 DeviceMemory2D::download(host_ptr, host_step);
261 upload(&data[0], cols * elem_size, data.size() / cols, cols);
270 data.resize(cols() * rows());
272 download(&data[0], colsBytes());
279 DeviceMemory2D::swap(other_arg);
286 return DeviceMemory2D::ptr<T>(y);
293 return DeviceMemory2D::ptr<T>(y);
312 return DeviceMemory2D::colsBytes() / elem_size;
319 return DeviceMemory2D::rows();
326 return DeviceMemory2D::step() / elem_size;