title: Arrayfire array from complex host data
body: <p>I'm having a problem initializing an arrayfire array from host data.</p>
  
  <p>The following code will not link for me:</p>
  
  <pre><code>constexp int mNumEigenInfos = 100;
  std::complex&lt;float&gt; mEigenVectors[mNumEigenInfos][6];
  af::array mEigenVectorsArray = af::array((dim_t)6,(dim_t)(mNumEigenInfos),reinterpret_cast&lt;float2*&gt;(mEigenVectors));
  </code></pre>
  
  <p>Giving me an error of:</p>
  
  <pre><code>undefined reference to `af::array::array&lt;float2&gt;(long long, long long, float2 const*, af_source)'
  </code></pre>
  
  <p>Now if i change the reinterpret_cast from float2* to float*:</p>
  
  <pre><code>constexp int mNumEigenInfos = 100;
  std::complex&lt;float&gt; mEigenVectors[mNumEigenInfos][6];
  af::array mEigenVectorsArray = af::array((dim_t)6,(dim_t)(mNumEigenInfos),reinterpret_cast&lt;float*&gt;(mEigenVectors));
  </code></pre>
  
  <p>It links fine. From reading online, i thought i was supposed to treat complex data as a cuComplex (which casting to float2 or cuComplex gives the exact same error since they are the same thing).</p>
  
  <p>I feel like i'm making a stupid mistake here but can't seem to figure it out.</p>
  
  <p>How am i supposed to initialize an arrayfire array from std::complex host data?</p>
  
  <p>Thank you for your Help</p>