diff --git a/c/amd/include/SuiteSparse_config.h b/c/amd/include/SuiteSparse_config.h index ea3cea4..cc0c1fd 100644 --- a/c/amd/include/SuiteSparse_config.h +++ b/c/amd/include/SuiteSparse_config.h @@ -43,7 +43,7 @@ extern "C" { #endif #include "qdldl_types.h" -#define DLONG +#include "qdldl_configure.h" typedef QDLDL_float c_float; #include diff --git a/cpp/qdldl.cpp b/cpp/qdldl.cpp index e87c1a1..8f220ca 100644 --- a/cpp/qdldl.cpp +++ b/cpp/qdldl.cpp @@ -1,5 +1,6 @@ #include "qdldl.hpp" +#include "qdldl/include/qdldl_configure.h" using namespace qdldl; @@ -31,7 +32,11 @@ Solver::Solver(QDLDL_int n, QDLDL_int * Ap, QDLDL_int *Ai, QDLDL_float * Ax){ Pinv = new QDLDL_int[n]; // Permutation +#ifdef DLONG QDLDL_int amd_status = amd_l_order(nx, Ap, Ai, P, NULL, NULL); +#else + QDLDL_int amd_status = amd_order(nx, Ap, Ai, P, NULL, NULL); +#endif if (amd_status < 0) throw std::runtime_error(std::string("Error in AMD computation ") + std::to_string(amd_status));