We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01e0f7c commit cfcc7fcCopy full SHA for cfcc7fc
lib/model/nms/src/nms_cuda.c
@@ -0,0 +1,19 @@
1
+#include <THC/THC.h>
2
+#include <stdio.h>
3
+#include "nms_cuda_kernel.h"
4
+
5
+// this symbol will be resolved automatically from PyTorch libs
6
+extern THCState *state;
7
8
+int nms_cuda(THCudaIntTensor *keep_out, THCudaTensor *boxes_host,
9
+ THCudaIntTensor *num_out, float nms_overlap_thresh) {
10
11
+ nms_cuda_compute(THCudaIntTensor_data(state, keep_out),
12
+ THCudaIntTensor_data(state, num_out),
13
+ THCudaTensor_data(state, boxes_host),
14
+ boxes_host->size[0],
15
+ boxes_host->size[1],
16
+ nms_overlap_thresh);
17
18
+ return 1;
19
+}
0 commit comments