From: Charles D. <cde...@gm...> - 2017-05-03 19:45:25
|
Greetings, I am working on implementing some conversions from complex Eigen matrices to viennacl matrices. I understand there is no native complex data types but instead expanded to have real/imaginary components in every other column. That said, I have run in to a problem when trying to use the copy command. If I want to copy a matrix_slice object I am able to do it directly to a Eigen::Matrix object Eigen::MatrixXf Am; viennacl::matrix_slice<viennacl::matrix<float> > Av; viennacl::copy(Av, Am); However, if I try to copy to a 'real' component of an Eigen Matrix, which is essentially a MatrixXf object I get an error. Eigen::MatrixXcf Am; viennacl::matrix_slice<viennacl::matrix<float> > Av; viennacl::copy(Av, Am.real()); even explicitly casting the object as Eigen Matrix type results in error: viennacl::copy(Av, (Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic>)Am.real()); error: no matching function for call to ‘copy(viennacl::matrix_slice<viennacl::matrix<float, viennacl::row_major> >&, Eigen::Matrix<float, -1, -1>)’ viennacl::copy(A_sub, (Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic>)(Am.real())); Any thoughts why this would be the case? Thanks, Charles |