Skip to content

Commit

Permalink
added copy back to host memory in parallel rocalution routine
Browse files Browse the repository at this point in the history
  • Loading branch information
tzwinger committed Oct 18, 2024
1 parent 003b2ec commit b9ad01a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fem/src/rocalution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,22 @@ extern "C" void ROCParallelSolve( int *gn, int *n, int *rows, int *cols, double

ls->Solve(rhs, &x);

// x.CopyToData(x_out);
// x.CopyToData(x_out);

x.MoveToHost();

for(i=0; i<*n; i++ ) x_out[i]=x[i];

ls->Clear();

// Stop time measurement
// tack = rocalution_time();
// std::cout << "Solver execution:" << (tack - tick) / 1e6 << " sec" << std::endl;

// Stop rocALUTION platform
//stop_rocalution();

//free(Lrows); free(Lcols); free(Lvals);
}

extern "C" void ROCSerialSolve(int *n, int *rows, int *cols, double *vals, double *b, double *x_out,
Expand Down

0 comments on commit b9ad01a

Please sign in to comment.