0
votes

Simple example, in a file titled test.cu:

#include <thrust/complex.h>
#include <thrust/device_vector.h>
#include <iostream>
int main(void) {
    thrust::device_vector<thrust::complex<float> > V1(10);
    V1.resize(20);
    printf("%d\n", V1.size());
}

Attempting to build the above with nvcc fails, with a buttload of thrust errors, starting from complex.inl(187): error: no instance of overloaded function "thrust::complex::real [with T=float]" matches the argument list. However, I can confirm that the thrust/complex.h header file includes a templated real() method, which is prefaced with __host__ as well as __device__.

Using a host_vector instead of a device_vector, the code compiles and runs with the expected result. Is this simply an unsupported feature as of CUDA-9.2?

1
I can reproduce the problem with CUDA 9.2 but your code compiles cleanly for me with CUDA 10. I suggest you upgrade to CUDA 10.Robert Crovella
I'll do that. Thanks!Michael

1 Answers

0
votes

It sounds like this problem is reproducible in CUDA-9 but is solved in CUDA-10. I'll just upgrade