Skip to content

Commit

Permalink
SPQR: Cleanup for templates.
Browse files Browse the repository at this point in the history
Remove duplicate documentation at template specializations or explicit
instantiations. Keep documentation only at template declaration or definition.
Explicitly instantiate, forward declare, or specialize templates in a more
consistent order.
  • Loading branch information
mmuetzel committed Aug 3, 2023
1 parent ea86d38 commit a5eabbb
Show file tree
Hide file tree
Showing 44 changed files with 1,149 additions and 3,439 deletions.
36 changes: 12 additions & 24 deletions SPQR/Include/SuiteSparseQR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,43 +659,31 @@ template <typename Entry, typename Int = int64_t> int SuiteSparseQR_numeric
SuiteSparseQR_factorization <Entry, Int> *QR,
cholmod_common *cc // workspace and parameters
) ;

// forward declare template instantiations

extern template int SuiteSparseQR_numeric <double, int32_t>
(
// inputs:
double tol, // treat columns with 2-norm <= tol as zero
cholmod_sparse *A, // sparse matrix to factorize
// input/output
SuiteSparseQR_factorization <double, int32_t> *QR,
cholmod_common *cc // workspace and parameters
double tol, cholmod_sparse *A,
SuiteSparseQR_factorization <double, int32_t> *QR, cholmod_common *cc
) ;

extern template int SuiteSparseQR_numeric <Complex, int32_t>
(
// inputs:
double tol, // treat columns with 2-norm <= tol as zero
cholmod_sparse *A, // sparse matrix to factorize
// input/output
SuiteSparseQR_factorization <Complex, int32_t> *QR,
cholmod_common *cc // workspace and parameters
double tol, cholmod_sparse *A,
SuiteSparseQR_factorization <Complex, int32_t> *QR, cholmod_common *cc
) ;

extern template int SuiteSparseQR_numeric <double, int64_t>
(
// inputs:
double tol, // treat columns with 2-norm <= tol as zero
cholmod_sparse *A, // sparse matrix to factorize
// input/output
SuiteSparseQR_factorization <double, int64_t> *QR,
cholmod_common *cc // workspace and parameters
double tol, cholmod_sparse *A,
SuiteSparseQR_factorization <double, int64_t> *QR, cholmod_common *cc
) ;

extern template int SuiteSparseQR_numeric <Complex, int64_t>
(
// inputs:
double tol, // treat columns with 2-norm <= tol as zero
cholmod_sparse *A, // sparse matrix to factorize
// input/output
SuiteSparseQR_factorization <Complex, int64_t> *QR,
cholmod_common *cc // workspace and parameters
double tol, cholmod_sparse *A,
SuiteSparseQR_factorization <Complex, int64_t> *QR, cholmod_common *cc
) ;
#endif

Expand Down
Loading

0 comments on commit a5eabbb

Please sign in to comment.