39#include <pcl/gpu/containers/device_memory.h>
40#include <pcl/pcl_exports.h>
119 upload(
const T* host_ptr, std::size_t device_begin_offset, std::size_t num_elements);
135 std::size_t device_begin_offset,
136 std::size_t num_elements)
const;
149 template <
typename A>
173 operator const T*()
const;
256 download(
void* host_ptr, std::size_t host_step)
const;
299 operator const T*()
const;
321#include <pcl/gpu/containers/impl/device_array.hpp>
DeviceArray2D()
Empty constructor.
DeviceArray()
Empty constructor.
void upload(const std::vector< T, A > &data, int cols)
Uploads data to internal buffer in GPU memory.
DeviceArray2D(const DeviceArray2D &other)
Copy constructor.
std::size_t elem_step() const
Returns step in elements.
DeviceArray2D & operator=(const DeviceArray2D &other)
Assignment operator.
void swap(DeviceArray2D &other_arg)
Performs swap of data pointed with another device array.
const T * ptr(int y=0) const
Returns const pointer to given row in internal buffer.
void release()
Decrements reference counter and releases internal buffer if needed.
void upload(const void *host_ptr, std::size_t host_step, int rows, int cols)
Uploads data to internal buffer in GPU memory.
void create(int rows, int cols)
Allocates internal buffer in GPU memory.
T * ptr(int y=0)
Returns pointer to given row in internal buffer.
void download(void *host_ptr, std::size_t host_step) const
Downloads data from internal buffer to CPU memory.
DeviceArray2D(int rows, int cols)
Allocates internal buffer in GPU memory.
DeviceArray2D(int rows, int cols, void *data, std::size_t stepBytes)
Initializes with user allocated buffer.
DeviceArray2D()
Empty constructor.
void download(std::vector< T, A > &data, int &cols) const
Downloads data from internal buffer to CPU memory.
void copyTo(DeviceArray2D &other) const
Performs data copying.
bool download(T *host_ptr, std::size_t device_begin_offset, std::size_t num_elements) const
Downloads data from internal buffer to CPU memory.
DeviceArray()
Empty constructor.
DeviceArray(std::size_t size)
Allocates internal buffer in GPU memory.
void upload(const T *host_ptr, std::size_t size)
Uploads data to internal buffer in GPU memory.
bool upload(const T *host_ptr, std::size_t device_begin_offset, std::size_t num_elements)
Uploads data from CPU memory to internal buffer.
void download(std::vector< T, A > &data) const
Downloads data from internal buffer to CPU memory.
void copyTo(DeviceArray &other) const
Performs data copying.
void download(T *host_ptr) const
Downloads data from internal buffer to CPU memory.
DeviceArray & operator=(const DeviceArray &other)
Assignment operator.
void swap(DeviceArray &other_arg)
Performs swap of data pointed with another device array.
void release()
Decrements reference counter and releases internal buffer if needed.
void create(std::size_t size)
Allocates internal buffer in GPU memory.
void upload(const std::vector< T, A > &data)
Uploads data to internal buffer in GPU memory.
DeviceArray(T *ptr, std::size_t size)
Initializes with user allocated buffer.
const T * ptr() const
Returns const pointer for internal buffer in GPU memory.
DeviceArray(const DeviceArray &other)
Copy constructor.
DeviceMemory2D()
Empty constructor.
DeviceMemory()
Empty constructor.