Skip to content

Commit

Permalink
Fix tag in CMake-configured header file
Browse files Browse the repository at this point in the history
  • Loading branch information
sleweke committed Sep 11, 2023
1 parent 200a92d commit 9f0d248
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/libcadet/linalg/SparseSolverInterface.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define LIBCADET_SPARSESOLVERINTERFACE_HPP_

#if defined(CADET_FORCE_MATLAB_UMFPACK) && defined(CADET_MATLABMEX)
#include <stddef.h>
#include <stddef.h>
#endif

namespace cadet
Expand All @@ -30,25 +30,25 @@ namespace linalg

#if defined(CADET_FORCE_MATLAB_UMFPACK) && defined(CADET_MATLABMEX)

// Matlab uses mwIndex = size_t for indexing sparse matrices.
// Hence, it seems probable that size_t is also used for calling Matlab's own UMFPACK functions.
// When building the MEX interface and CADET_FORCE_MATLAB_UMFPACK is set, we rely on Matlab's
// UMFPACK version and use size_t for indexing.
// Matlab uses mwIndex = size_t for indexing sparse matrices.
// Hence, it seems probable that size_t is also used for calling Matlab's own UMFPACK functions.
// When building the MEX interface and CADET_FORCE_MATLAB_UMFPACK is set, we rely on Matlab's
// UMFPACK version and use size_t for indexing.

// Note that this excludes using SuperLU (unless it is build with size_t as index type, which is not the default)
// Note that this excludes using SuperLU (unless it is build with size_t as index type, which is not the default)

typedef size_t sparse_int_t;
typedef size_t sparse_int_t;

// Always enable UMFPACK (Matlab distributes its own version), always disable SuperLU
#define UMFPACK_FOUND
#undef SUPERLU_FOUND
// Always enable UMFPACK (Matlab distributes its own version), always disable SuperLU
#define UMFPACK_FOUND
#undef SUPERLU_FOUND

#else

typedef @SPARSE_INT_TYPE @sparse_int_t;
typedef @SPARSE_INT_TYPE@ sparse_int_t;

#cmakedefine UMFPACK_FOUND
#cmakedefine SUPERLU_FOUND
#cmakedefine UMFPACK_FOUND
#cmakedefine SUPERLU_FOUND

#endif

Expand Down

0 comments on commit 9f0d248

Please sign in to comment.