name followed by "::" must be a class or namespace name
目录
cuda编译报错:
name followed by "::" must be a class or namespace name
报错代码:
cub::DeviceSelect::Flagged((void *)nullptr, temp_size_flag,
问题解读:
其实是命名空间没找到。
解决方法:
#include <cub/device/device_select.cuh>
tensorrt库没有引用,查找tensorrt方法:
查找头文件:
find / -path /proc -prune -o -name "NvInfer.h"
查找库:
find / -path /proc -prune -o -name "libnvinfer_plugin.so"
修改之前的代码:
#include <cub/device/device_radix_sort.cuh>
#include <cub/iterator/counting_input_iterator.cuh>
cub::DeviceSelect::Flagged((void *)nullptr, temp_size_flag,
cub::CountingInputIterator<int>(count),
在arm64系统上,调用cuda10.2 修改后的代码:
#include <thrust/system/cuda/detail/cub/device/device_radix_sort.cuh>
#include <thrust/system/cuda/detail/cub/iterator/counting_input_iterator.cuh>
thrust::cuda_cub::cub::DeviceSelect::Flagged((void *)nullptr, temp_size_flag,
thrust::cuda_cub::cub::CountingInputIterator<int>(count),