Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterative Solvers - Matrix Output? #274

Open
cdeterman opened this issue Mar 25, 2019 · 2 comments
Open

Iterative Solvers - Matrix Output? #274

cdeterman opened this issue Mar 25, 2019 · 2 comments

Comments

@cdeterman
Copy link
Contributor

It seems that almost all the solvers (i.e. A = xB) in ViennaCL return a vector result. The exception being the use of LU decomposition (example here). Whereas all the iterative solvers show a vector result see here. If I want the solution matrix of a real matrix with respect to the corresponding identity matrix I am currently using the combination of lu_factorize and lu_substitute. Is that currently the only option for the full matrix result or is there another way to use the functions or to use the returned vector result?

@karlrupp
Copy link
Collaborator

karlrupp commented Apr 3, 2019

The LU factorization alters the input matrix, whereas the iterative solvers don't alter the matrix.

Conceivably one could add an overload of solve() with e.g. a lu_tag that carries out an LU factorization. However, I'm a bit concerned about potential misuses of such an interface (dense matrices used with iterative solvers, or sparse matrices used with lu_tag, for which there is no implementation).

@cdeterman
Copy link
Contributor Author

@karlrupp wouldn't it be feasible to have a restriction on template types using something like static_assert or enable_if? That way an informed error could be thrown for the non-implemented sparse matrix type until such a time that one does exist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants