Skip to content

I have a question about how the covert_to function works. #1515

Answered by MarcelKoch
QuasarJSPark asked this question in Q&A
Discussion options

You must be logged in to vote

The matrix dimensions you are setting here:

    auto coomtx =  gko::share(CooMtx::create(ompexec, gko::dim<2>(Arow.size(), Acol.size()),
                                     Valarray::view(ompexec, Aval.size(), Aval.data()),
                                     Idxarray::view(ompexec, Acol.size(), Acol.data()),
                                     Idxarray::view(ompexec, Arow.size(), Arow.data())
                                     )
    );

are not the correct ones. Instead of gko::dim<2>(Arow.size(), Acol.size()) it should be COOA->get_size(). Right now coomtx has as many rows as it has non-zero elements, which leads to the wrong Csr matrix.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@QuasarJSPark
Comment options

Answer selected by QuasarJSPark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants