1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
8 #include <thrust/execution_policy.h>
9 #include <thrust/sequence.h>
11 #include "cloudViewer/core/CUDAUtils.h"
12 #include "cloudViewer/core/hashmap/HashBackendBuffer.h"
14 namespace cloudViewer {
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());
22 } // namespace cloudViewer