thrust set difference fails to compile with calling a __host__ function from a __host__ __device__ function is not allowed

大城市里の小女人 提交于 2019-12-02 13:56:16

While using thrust::set_difference the arguments are iterators and not the device_vectors. the last argument to the set_difference has to be complimentary_set.begin() instead of complimentary_set.

the entire correct statement now reads:

thrust::set_difference(thrust::device, A.begin(), A.end(), B.begin(), B.end(), complimentary_set.begin());
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!