1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page pointcloudprocessing_usecase1 Point Cloud Memory Management
5 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
7 This tutorial demonstrates how point cloud processing creates and destroys CPU/CUDA memory.
9 Point cloud processing provides APIs to create either CPU or CUDA memory.
11 For example, specify a CUDA memory type:
14 dwPointCloud pointcloud;
15 pointcloud.type = DW_MEMORY_TYPE_CUDA;
16 pointcloud.coordSystem = DW_POINTCLOUD_COORDINATE_SYSTEM_CARTESIAN;
19 Set .type = ::DW_MEMORY_TYPE_CPU if CPU memory is intended. Initialize `capacity` in `dwPointCloud` to indicate the maximum storage,
22 pointcloud.capacity = 20000;
25 Create CUDA memory holding up to 20000 cloud of points:
28 dwPointCloud_createBuffer(&pointcloud);
31 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 @ref pointcloudprocessing_usecase2
33 To destroy the allocated CUDA memory:
36 dwPointCloud_destroyBuffer(&pointcloud);
39 @note Point cloud buffers are owned by the application, user can waive the memory copy from the module.
41 For more details see @ref dwx_pointcloudprocessing_sample.