I'm having a problem initializing an arrayfire array from host data.
The following code will not link for me:
constexp int mNumEigenInfos = 100;
std::complex<float> mEigenVectors[mNumEigenInfos][6];
af::array mEigenVectorsArray = af::array((dim_t)6,(dim_t)(mNumEigenInfos),reinterpret_cast<float2*>(mEigenVectors));
Giving me an error of:
undefined reference to `af::array::array<float2>(long long, long long, float2 const*, af_source)'
Now if i change the reinterpret_cast from float2* to float*:
constexp int mNumEigenInfos = 100;
std::complex<float> mEigenVectors[mNumEigenInfos][6];
af::array mEigenVectorsArray = af::array((dim_t)6,(dim_t)(mNumEigenInfos),reinterpret_cast<float*>(mEigenVectors));
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).
I feel like i'm making a stupid mistake here but can't seem to figure it out.
How am i supposed to initialize an arrayfire array from std::complex host data?
Thank you for your Help