xiaotaiye / cusp-library

Automatically exported from code.google.com/p/cusp-library
Apache License 2.0
0 stars 0 forks source link

print fails with complex dense matrices #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a 
     cusp::array?d<cusp::complex<float>,cusp::device_memory> b(4)
2. Fill up the array b with calls 
     b[i] = cusp::complex<float>(1.0,0);
   for each element i
3. call cusp::print(b)
4. compilation fails

What is the expected output? What do you see instead?
Expected: successful compilation with the executable printing b to the screen.

Actual output: compilation gives the following message:

../cusplibrary/cusp/detail/print.inl(73): error: no operator "<<" matches these 
operands
            operand types are: std::basic_ostream<char, std::char_traits<char>> << thrust::device_reference<const ValueType>
          detected during:
            instantiation of "void cusp::detail::print(const Printable &, Stream &, cusp::array1d_format) [with Printable=cusp::array1d<ValueType, MemorySpace>, Stream=std::ostream]" 
(92): here
            instantiation of "void cusp::print(const Printable &, Stream &) [with Printable=cusp::array1d<ValueType, MemorySpace>, Stream=std::ostream]" 
(86): here
            instantiation of "void cusp::print(const Printable &) [with Printable=cusp::array1d<ValueType, MemorySpace>]" 
arrayFail.cu(23): here

What version of the product are you using? On what operating system?
cusp version: Cusp v0.4.0
OS: Linux (Linux ***computer name*** 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 
11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux)

Please provide any additional information below.
Print works fine with non-complex arrays, its just the complex which fails.
Attached is a minimal code sample which does this.

Original issue reported on code.google.com by pmsolf...@gmail.com on 16 Oct 2013 at 5:10

Attachments: