![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Blob.h>

Public Member Functions | |
| Blob (int64_t byte_size, const Device &device) | |
| Blob (const Device &device, void *data_ptr, const std::function< void(void *)> &deleter) | |
| ~Blob () | |
| Device | GetDevice () const |
| void * | GetDataPtr () |
| const void * | GetDataPtr () const |
Protected Attributes | |
| std::function< void(void *)> | deleter_ = nullptr |
| For externally managed memory, deleter != nullptr. More... | |
| void * | data_ptr_ = nullptr |
| Device data pointer. More... | |
| Device | device_ |
| Device context for the blob. More... | |
Blob class refers to a blob of memory in device or host.
Usually a Blob is constructed by specifying the blob size and device, memory allocation happens during the Blob's construction.
A Blob's buffer can also be managed by an external memory manager. In this case, a deleter function is needed to notify the external memory manager that the memory is no longer needed. It does not make sense to infer the total buffer size. For example, if a Tensor has a negative stride size, it is necessary to access memory addresses smaller than Blob's beginning memory address. The only responsibility for Blob is to hold the beginning memory address and it's up to the user to access any addresses around it.
In summary:
|
inline |
|
inline |
Construct Blob with externally managed memory.
|
inline |
|
inline |
Definition at line 75 of file Blob.h.
References data_ptr_.
Referenced by cloudViewer::core::InverseCUDA(), cloudViewer::core::InverseSYCL(), cloudViewer::core::LeastSquaresCUDA(), cloudViewer::core::LeastSquaresSYCL(), cloudViewer::core::LUSYCL(), cloudViewer::core::SolveCUDA(), cloudViewer::core::SolveSYCL(), cloudViewer::core::SVDCUDA(), and cloudViewer::core::SVDSYCL().
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
Device context for the blob.
Definition at line 87 of file Blob.h.
Referenced by GetDevice(), and ~Blob().