This commit is contained in:
Marcos Luciano
2022-06-21 12:40:45 -03:00
parent 0516a46138
commit de0c251b18
2 changed files with 6 additions and 2 deletions

View File

@@ -83,8 +83,12 @@ all: $(TARGET_LIB)
%.o: %.cpp $(INCS) Makefile %.o: %.cpp $(INCS) Makefile
$(CC) -c $(COMMON) -o $@ $(CFLAGS) $< $(CC) -c $(COMMON) -o $@ $(CFLAGS) $<
ifeq ($(CUDA_VER), 10.2)
CUB=-I/usr/local/cuda-$(CUDA_VER)/include/thrust/system/cuda/detail
endif
%.o: %.cu $(INCS) Makefile %.o: %.cu $(INCS) Makefile
$(NVCC) -c -o $@ --compiler-options '-fPIC' $< $(NVCC) -c -o $@ $(CUB) --compiler-options '-fPIC' $<
$(TARGET_LIB) : $(TARGET_OBJS) $(TARGET_LIB) : $(TARGET_OBJS)
$(CC) -o $@ $(TARGET_OBJS) $(LFLAGS) $(CC) -o $@ $(TARGET_OBJS) $(LFLAGS)

View File

@@ -3,7 +3,7 @@
* https://www.github.com/marcoslucianops * https://www.github.com/marcoslucianops
*/ */
#include <cub/cub.cuh> #include <cub/device/device_radix_sort.cuh>
__global__ void sortOutput( __global__ void sortOutput(
int* d_indexes, float* d_scores, float* d_boxes, int* d_classes, float* bboxData, float* scoreData, int* d_indexes, float* d_scores, float* d_boxes, int* d_classes, float* bboxData, float* scoreData,