libcudacxx icon indicating copy to clipboard operation
libcudacxx copied to clipboard

`cuda::std::complex` Doesn't Work With `std::ostream`

Open cliffburdick opened this issue 3 years ago • 0 comments

cuda::std::complex<float> a{1,0};
std::cout << a;

Gives the error:

error: no operator "<<" matches these operands
            operand types are: std::basic_ostream<char, std::char_traits<char>> << cuda::std::__3::complex<float>

From @ogiroux:

It’s probably expecting a cuda::std::ostream which doesn’t exist. The host-only library and the host+device library are totally separate despite appearance of compatibility.

cliffburdick avatar Jan 07 '21 16:01 cliffburdick