Skip to content

Commit

Permalink
Merge branch 'Solver-Accelerate-GF' of github.com:afabri/cgal into So…
Browse files Browse the repository at this point in the history
…lver-Accelerate-GF
  • Loading branch information
afabri committed May 17, 2024
2 parents 405abea + e42b152 commit fc563b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Solver_interface/include/CGAL/Accelerate_sparse_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ that represents general matrices, be they symmetric or not.
\sa `CGAL::Accelerate_sparse_symmetric_matrix<T>`
*/
template<class T>
struct Accelerate_sparse_matrix
class Accelerate_sparse_matrix
{
// Public types
public:
Expand Down Expand Up @@ -194,7 +194,7 @@ struct Accelerate_sparse_matrix
values.push_back(val);
}
}
m_matrix = SwiftAccelerate::Matrix::init(m_rows, rows, columns, values);
m_matrix.initialize(m_rows, rows, columns, values);
m_is_already_built = true;
m_has_been_changed = false;
}
Expand All @@ -204,7 +204,9 @@ struct Accelerate_sparse_matrix

void solve(const Accelerate_vector<T>& B, Accelerate_vector<T>& X) const
{
m_matrix.solve(B.data(), X.data());
Accelerate_vector<T>& ncB = const_cast<Accelerate_vector<T>&>(B);
Accelerate_vector<T>& ncX = const_cast<Accelerate_vector<T>&>(X);
m_matrix.solve(ncB.data(), ncX.data());
}

/// \cond SKIP_IN_MANUAL
Expand Down

0 comments on commit fc563b4

Please sign in to comment.