I would like to create a 2D matrix of complex numbers. The matrix is available as two distinct pointers containing the real and imaginary parts (comes from MATLAB - MEX). I'm using the C++ interface.
The closest thing I see in the API is a C interface, af_cplx2().
// C Interface for creating complex array from two input arrays.
AFAPI af_err af_cplx2 ( af_array * out,
const af_array lhs,
const af_array rhs,
const bool batch
)
The C++ interface gets only one array and creates complex from real array:
// C++ Interface for creating complex array from real array.
AFAPI array af::complex ( const array & in )
How can a complex array be created from two arrays, the real and imaginary part?