title: What is the difference between float2 and cuComplex, which to use?
body: <p>I am trying to figure out how to use complex numbers in both my host and device code. I came across <code>cuComplex</code> (but can't find any documentation!) and <code>float2</code> which at least gets a mention in the CUDA programming guide.</p>
  
  <p>What should I use? In the header file for <code>cuComplex</code>, it looks like the functions are declared with <code>__host__ __device__</code> so I am assuming that means that it would be ok to use them in either place. </p>
  
  <p>My original data is being read in from a file into a <code>std::complex&lt;float&gt;</code> so I dont really want to mess with that. I guess in order to use the complex values on the GPU though, I will have to copy from the original <code>complex&lt;float&gt;</code> to the <code>cuComplex</code>?</p>