DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Point Cloud Memory Management
SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

This tutorial demonstrates how point cloud processing creates and destroys CPU/CUDA memory.

Point cloud processing provides APIs to create either CPU or CUDA memory.

For example, specify a CUDA memory type:

dwPointCloud pointcloud;
pointcloud.type = DW_MEMORY_TYPE_CUDA;

Set .type = DW_MEMORY_TYPE_CPU if CPU memory is intended. Initialize capacity in dwPointCloud to indicate the maximum storage,

pointcloud.capacity = 20000;

Create CUDA memory holding up to 20000 cloud of points:

The created memory holds points. Format of a point is specified with dwPointCloudFormat enum. .size will be zero upon successful memory creation. As it indicates there is currently no active point in the memory. dwPointCloud_createBuffer() will set .organized to false. To understand the difference between .organized = true and .organized = false, see Point Cloud Accumulator

To destroy the allocated CUDA memory:

Point cloud buffers are owned by the application, user can waive the memory copy from the module.

For more details see Point Cloud Processing Sample.