Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solver_interface: Add support for the Accelerate Library #8157

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

afabri
Copy link
Member

@afabri afabri commented Apr 23, 2024

Summary of Changes

Add the possibility to use the solvers of the Accelerate library.

This PR is work in progress as the next step is the C++/Swift bridge using this repository

Release Management

  • Affected package(s): Solver_interface
  • Issue(s) solved (if any): fix #0000, fix #0000,...
  • Feature/Small Feature (if any): TBD
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: The new code is the IP of GeometryFactory

TODO

  • rewrite history, for commits that seem to be authored by @janetournois, but are not

/*!
\ingroup PkgSolverInterfaceLS
The class `Accelerate_solver_traits` provides an interface to the sparse solvers of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of what?

Comment on lines +40 to +41
/// \pre A.row_dimension() == B.dimension().
/// \pre A.column_dimension() == X.dimension().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between backticks ?

The class `Accelerate_sparse_matrix` is a wrapper around the `SparseMatrix_Double` matrix type
<a href=https://developer.apple.com/documentation/accelerate/sparsematrix_double">`Accelerate::SparseMatrix`_Double</a>
that represents general matrices, be they symmetric or not.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"be they" ?


/// Create a rectangular matrix initialized with zeros.
///
/// \pre rows == columns if `is_symmetric` is true.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rows == columns and also true between backticks?

/// Return the matrix number of columns
int column_dimension() const { return m_columns; }

/// Write access to a matrix coefficient: a_ij <- val.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a_ij <- val backticks?


/// Write access to a matrix coefficient: a_ij <- val.
///
/// Users can optimize calls to this function by setting 'new_coef' to `true`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'new_coef' backticks instead of single quotes?

Comment on lines +117 to +118
/// \pre 0 <= i < row_dimension().
/// \pre 0 <= j < column_dimension().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backticks?

/// if the coefficient does not already exist in the matrix.
///
/// \warning For symmetric matrices, `Accelerate_sparse_matrix` only stores the lower triangle
/// and `set_coef()` does nothing if (i, j) belongs to the upper triangle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(i, j) backticks?

Comment on lines +135 to +141
/// Write access to a matrix coefficient: a_ij <- a_ij + val.
///
/// \warning For symmetric matrices, Accelerate_sparse_matrix only stores the lower triangle
/// `add_coef()` does nothing if (i, j) belongs to the upper triangle.
///
/// \pre 0 <= i < row_dimension().
/// \pre 0 <= j < column_dimension().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

Comment on lines +157 to +158
/// \pre 0 <= i < row_dimension().
/// \pre 0 <= j < column_dimension().
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backticks?

@afabri
Copy link
Member Author

afabri commented Apr 23, 2024

Hi @albert-github, This is a draft and I wrote that it is work in progress. So please just wait a little bit. Nevertheless, thanks a lot.

@lrineau lrineau added the TODO label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants