On Tue, Feb 7, 2012 at 11:29 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On Tue, Feb 7, 2012 at 11:20 AM, recrusader <span dir="ltr"><<a href="mailto:recrusader@gmail.com" target="_blank">recrusader@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Whether is it possible to find an efficient mechanism to do the conversion between std::complex and cusp::complex when the conversion is necessary.<br></blockquote><div><br></div></div><div>That does not matter. This is a compile error. We are not going to change this right now, and it seems like you are not going</div>
<div>make the necessary changes, so I would say that complex numbers are not supported with our GPU code right now. The</div><div>change would involve using cusp::complex for PetscScalar, and I am not sure how much work that would entail.</div>
<div><br></div><div> Matt</div></div></blockquote><div><br>Matt, <br></div><div class="h5"><br>You might be interested to hear that the C++03 standard states that "The effect of instantiating the template complex for any type other than float, double or long double is unspecified". Thus, complex quad precision with it is probably a bad idea and, if I'm not mistaken, the standard does not state that the class must store data in the form<br>
<br>double real, imag;<br><br>so this could potentially break interfaces (e.g., to BLAS or LAPACK). Maybe it would be worthwhile to avoid usage of std::complex and simultaneously fix the compatibility issue with cusp::complex. I recently ripped std::complex out of Elemental for the above reasons.<br>
<br>Jack<br></div></div>