问题产生原因 thrust::命名空间中有cub的存在,这与cub::命名空间重名了。 解决方法 找到工程中的using namespace thrust; 将其注释掉,然后重新编译。 若提示identifier "xxx" is undefined 就在"xxx"前面加上thrust::。例如