Skip to content

Commit

Permalink
upload missed file
Browse files Browse the repository at this point in the history
  • Loading branch information
ppengtang committed May 11, 2019
1 parent add96c7 commit 2f189d2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/model/nms/src/nms_cuda.c
@@ -0,0 +1,19 @@
#include <THC/THC.h>
#include <stdio.h>
#include "nms_cuda_kernel.h"

// this symbol will be resolved automatically from PyTorch libs
extern THCState *state;

int nms_cuda(THCudaIntTensor *keep_out, THCudaTensor *boxes_host,
THCudaIntTensor *num_out, float nms_overlap_thresh) {

nms_cuda_compute(THCudaIntTensor_data(state, keep_out),
THCudaIntTensor_data(state, num_out),
THCudaTensor_data(state, boxes_host),
THCudaTensor_size(state, boxes_host, 0),
THCudaTensor_size(state, boxes_host, 1),
nms_overlap_thresh);

return 1;
}

0 comments on commit 2f189d2

Please sign in to comment.