ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CUDAHashBackendBuffer.cu
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <thrust/execution_policy.h>
9 #include <thrust/sequence.h>
10 
11 #include "cloudViewer/core/CUDAUtils.h"
12 #include "cloudViewer/core/hashmap/HashBackendBuffer.h"
13 
14 namespace cloudViewer {
15 namespace core {
16 void CUDAResetHeap(Tensor &heap) {
17  uint32_t *heap_ptr = heap.GetDataPtr<uint32_t>();
18  thrust::sequence(thrust::device, heap_ptr, heap_ptr + heap.GetLength(), 0);
19  CLOUDVIEWER_CUDA_CHECK(cudaGetLastError());
20 }
21 } // namespace core
22 } // namespace cloudViewer