In order to use the identity_operator as a preconditioner in something like this
template<typename PreconditionerType>
void solve() {
cusp::csr_matrix<int,float,cusp::device_memory> A;
PreconditionerType M(A);
cusp::krylov::cg(A, x, b, monitor, M);
}
I found it necessary to add an identity_operator constructor like so
template<typename MatrixType>
identity_operator(const MatrixType& A)
: Parent(A.num_rows, A.num_cols) {}
regards,
Sam
Original issue reported on code.google.com by sam.mos...@gmail.com on 22 Nov 2010 at 12:48
Original issue reported on code.google.com by
sam.mos...@gmail.com
on 22 Nov 2010 at 12:48