I would like to create the imaginary unit in ArrayFire, but I can't. I can construct a complex matrix from a real matrix, but that will not be pure imaginary. Perhaps I can use function af_cplx2
from this page. I thought of the following:
af_array *R;
const af_array re = 0.0;
const af_array im = 1.0;
af_cplx2(R,re,im,0);
However I get a runtime error (unhandled exception) in Visual Studio 2013. How can I do it? Thank you in advance.