I have written a new implementation of C++ std::complex for use of complex numbers on CUDA devices.
It is is heavily derived from the LLVM libcpp project.
Apart from nvcc, it should also work wih any C++03 compiler.
It is quiet complete. As far as I can tell the only missing features are:
- long double support (not supported on CUDA)
- some integral pow functions (due to lack of C++11 support on CUDA)
The code is available on githib:
Please let me know of any improvements/errors you find with it.