I am looking for a way to convert
Eigen::SparseMatrix< float> <-> cusp::hyb_matrix< int, float, cusp::host_memory>
back and forth.
The Eigen matrix is a result of a previous computation and I need a cusp::hyb_matrix to use the GPU for conjugate gradient computation later.
Thanks.
Well, I have found a workaround that does what needed but a more direct way is still missing.
Based on this example, i just needed to extract the rows/cols/coeffs vectors of values from the Eigen::SparseMatrix to construct a cusp::hyb_matrix. This can be done as follows :
Now, once we have rows/cols/coeffs, we just need to use those in the example above as inputs :
The other way around is pretty obvious with the same logic.
Hope this helps someone.
Cheers.