Skip to content

Commit

Permalink
Correct enum arguments in GLU solver implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pelesh committed Oct 31, 2023
1 parent c9c50fa commit 2284161
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/r_KLU_GLU_matrix_values_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int main(int argc, char *argv[])
ReSolve::io::readAndUpdateMatrix(mat_file, A_exp_coo);
}
std::cout<<"Updating values of A_coo!"<<std::endl;
A_coo->updateValues(A_exp_coo->getValues("cpu"), "cpu", "cpu");
A_coo->updateValues(A_exp_coo->getValues(ReSolve::memory::HOST), "cpu", "cpu");
//ReSolve::io::readAndUpdateMatrix(mat_file, A_coo);
ReSolve::io::readAndUpdateRhs(rhs_file, &rhs);
}
Expand Down
20 changes: 10 additions & 10 deletions resolve/LinSolverDirectCuSolverGLU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ namespace ReSolve
n,
nnz,
descr_A_,
A_->getRowData("cpu"), //kRowPtr_,
A_->getColData("cpu"), //jCol_,
A_->getRowData(memory::HOST), //kRowPtr_,
A_->getColData(memory::HOST), //jCol_,
P, /* base-0 */
Q, /* base-0 */
M_->getNnz(), /* nnzM */
descr_M_,
M_->getRowData("cpu"),
M_->getColData("cpu"),
M_->getRowData(memory::HOST),
M_->getColData(memory::HOST),
info_M_);
error_sum += status_cusolver_;
//NOW the buffer
Expand Down Expand Up @@ -93,15 +93,15 @@ namespace ReSolve
{
// L and U need to be in CSC format
index_type n = L->getNumRows();
index_type* Lp = L->getColData("cpu");
index_type* Li = L->getRowData("cpu");
index_type* Up = U->getColData("cpu");
index_type* Ui = U->getRowData("cpu");
index_type* Lp = L->getColData(memory::HOST);
index_type* Li = L->getRowData(memory::HOST);
index_type* Up = U->getColData(memory::HOST);
index_type* Ui = U->getRowData(memory::HOST);
index_type nnzM = ( L->getNnz() + U->getNnz() - n );
M_ = new matrix::Csr(n, n, nnzM);
M_->allocateMatrixData("cpu");
index_type* mia = M_->getRowData("cpu");
index_type* mja = M_->getColData("cpu");
index_type* mia = M_->getRowData(memory::HOST);
index_type* mja = M_->getColData(memory::HOST);
index_type row;
for(index_type i = 0; i < n; ++i) {
// go through EACH COLUMN OF L first
Expand Down

0 comments on commit 2284161

Please sign in to comment.