[eigen] Cross-referencing Eigen and ViennaCL for iterative solvers?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Eigen developers,

I'm one of the developers of ViennaCL, a linear algebra library for GPUs and multi-core CPUs built on top of OpenCL (see http://viennacl.sourceforge.net/ ).

As far as I can tell from the online documentation, Eigen's focus is mostly on dense matrix algebra, where you guys do a great job. However, the sparse matrix section seems to be in its infancy still. On the other hand, our library provides generic implementations for iterative solvers (CG, BiCGStab, GMRES at present), which run well with both the built-in ViennaCL types as well as the boost::numeric::ublas types. We think about adding direct support for Eigen types, which should require only a few lines of code. Moreover, we would also provide overloaded copy() routines, that copy Eigen-types to their ViennaCL counterparts and vice versa. This way programmers can enjoy the convenient interface of Eigen and at the same time run time-critical operations like dense matrix-matrix products with ViennaCL on e.g. GPUs.

Therefore I'd like to propose a cross-referencing of our projects: Similar to the current direct solvers for sparse matrices, you could add a section "Using iterative solvers" to the sparse matrix docs and refer to ViennaCL. Similarly, we promote the Eigen-interface in our project.

Unlike the "unsupported" direct solver modules, you don't have to do any coding at all, C++ takes care of all that. :-)
Thus, users could write something like

--- code begin --

Eigen::SparseMatrix<double> system_matrix(dim, dim);
Eigen::VectorXd rhs_vector(dim);

//fill system_matrix and rhs_vector here

//solve system using CG, tolerance 1e-10, max. 100 iterations:
viennacl::linalg::cg_tag solver_tag(1e-10, 100);
Eigen::VectorXd result = viennacl::linalg::solve(system_matrix,
                                                 rhs_vector,
                                                 solver_tag);

--- code end ---

In my view, both projects would benefit equally. What do you think about it?

Best regards,
Karli

PS: I've seen that you are about to launch a new beta version. Since this is a rather intense phase, I hope my email won't get lost... ;-)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/