pack.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cuvs/neighbors/ball_cover.hpp>
9 
10 namespace ML {
11 namespace Dbscan {
12 namespace VertexDeg {
13 
14 template <typename Type, typename Index_>
15 struct Pack {
17  void* rbc_index;
23  Index_* vd;
25  Type* weight_sum;
27  Index_* ia;
28  rmm::device_uvector<Index_>* ja;
30  Index_ max_k;
32  bool* adj;
34  const Type* x;
36  const Type* sample_weight;
38  Type eps;
40  Index_ N;
42  Index_ D;
43 
49  void resetArray(cudaStream_t stream, Index_ vdlen)
50  {
51  RAFT_CUDA_TRY(cudaMemsetAsync(vd, 0, sizeof(Index_) * vdlen, stream));
52  }
53 };
54 
55 } // namespace VertexDeg
56 } // namespace Dbscan
57 } // namespace ML
Definition: dbscan.hpp:18
Definition: pack.h:15
Index_ max_k
Definition: pack.h:30
Index_ N
Definition: pack.h:40
bool * adj
Definition: pack.h:32
Index_ * vd
Definition: pack.h:23
const Type * sample_weight
Definition: pack.h:36
void * rbc_index
Definition: pack.h:17
Type eps
Definition: pack.h:38
const Type * x
Definition: pack.h:34
Index_ * ia
Definition: pack.h:27
rmm::device_uvector< Index_ > * ja
Definition: pack.h:28
Index_ D
Definition: pack.h:42
Type * weight_sum
Definition: pack.h:25
void resetArray(cudaStream_t stream, Index_ vdlen)
reset the output array before calling the actual kernel
Definition: pack.h:49