diff --git a/include/armadillo_bits/def_superlu.hpp b/include/armadillo_bits/def_superlu.hpp index fad64761..f0da4049 100644 --- a/include/armadillo_bits/def_superlu.hpp +++ b/include/armadillo_bits/def_superlu.hpp @@ -27,10 +27,10 @@ extern "C" extern void arma_wrapper(cgssvx)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, int*, char*, float*, float*, superlu::SuperMatrix*, superlu::SuperMatrix*, void*, int, superlu::SuperMatrix*, superlu::SuperMatrix*, float*, float*, float*, float*, superlu::GlobalLU_t*, superlu::mem_usage_t*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(zgssvx)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, int*, char*, double*, double*, superlu::SuperMatrix*, superlu::SuperMatrix*, void*, int, superlu::SuperMatrix*, superlu::SuperMatrix*, double*, double*, double*, double*, superlu::GlobalLU_t*, superlu::mem_usage_t*, superlu::SuperLUStat_t*, int*); - extern void arma_wrapper(sgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, float, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); - extern void arma_wrapper(dgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, double, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); - extern void arma_wrapper(cgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, float, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); - extern void arma_wrapper(zgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, double, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); + extern void arma_wrapper(sgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); + extern void arma_wrapper(dgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); + extern void arma_wrapper(cgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); + extern void arma_wrapper(zgstrf)(superlu::superlu_options_t*, superlu::SuperMatrix*, int, int, int*, void*, int, int*, int*, superlu::SuperMatrix*, superlu::SuperMatrix*, superlu::GlobalLU_t*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(sgstrs)(superlu::trans_t, superlu::SuperMatrix*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(dgstrs)(superlu::trans_t, superlu::SuperMatrix*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); diff --git a/include/armadillo_bits/newarp_SparseGenRealShiftSolve_meat.hpp b/include/armadillo_bits/newarp_SparseGenRealShiftSolve_meat.hpp index 07397391..b07e7914 100644 --- a/include/armadillo_bits/newarp_SparseGenRealShiftSolve_meat.hpp +++ b/include/armadillo_bits/newarp_SparseGenRealShiftSolve_meat.hpp @@ -51,7 +51,6 @@ SparseGenRealShiftSolve::SparseGenRealShiftSolve(const SpMat& mat_obj, c int panel_size = superlu::sp_ispec_environ(1); int relax = superlu::sp_ispec_environ(2); - float drop_tol = 0.0; int slu_info = 0; // Return code int lwork = 0; // lwork = 0: allocate space internally by system malloc @@ -60,7 +59,7 @@ SparseGenRealShiftSolve::SparseGenRealShiftSolve(const SpMat& mat_obj, c arma_extra_debug_print("superlu::gstrf()"); superlu::get_permutation_c(options.ColPerm, x.get_ptr(), perm_c.get_ptr()); superlu::sp_preorder_mat(&options, x.get_ptr(), perm_c.get_ptr(), etree.get_ptr(), xC.get_ptr()); - superlu::gstrf(&options, xC.get_ptr(), drop_tol, relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); + superlu::gstrf(&options, xC.get_ptr(), relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); if(slu_info != 0) { diff --git a/include/armadillo_bits/sp_auxlib_meat.hpp b/include/armadillo_bits/sp_auxlib_meat.hpp index 8a79f42d..85902a8a 100644 --- a/include/armadillo_bits/sp_auxlib_meat.hpp +++ b/include/armadillo_bits/sp_auxlib_meat.hpp @@ -1446,13 +1446,12 @@ sp_auxlib::spsolve_refine(Mat& X, typename T1::pod_type& // // int panel_size = superlu::sp_ispec_environ(1); // int relax = superlu::sp_ispec_environ(2); -// float drop_tol = 0.0; // int slu_info = 0; // Return code. // // arma_extra_debug_print("superlu::gstrf()"); // superlu::get_permutation_c(options.ColPerm, a.get_ptr(), perm_c.get_ptr()); // superlu::sp_preorder_mat(&options, a.get_ptr(), perm_c.get_ptr(), etree.get_ptr(), aC.get_ptr()); -// superlu::gstrf(&options, aC.get_ptr(), drop_tol, relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); +// superlu::gstrf(&options, aC.get_ptr(), relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); // // if(slu_info != 0) { return T(0); } // @@ -2218,13 +2217,12 @@ sp_auxlib::run_aupd_shiftinvert int panel_size = superlu::sp_ispec_environ(1); int relax = superlu::sp_ispec_environ(2); - float drop_tol = 0.0; int slu_info = 0; // Return code. arma_extra_debug_print("superlu::gstrf()"); superlu::get_permutation_c(options.ColPerm, x.get_ptr(), perm_c.get_ptr()); superlu::sp_preorder_mat(&options, x.get_ptr(), perm_c.get_ptr(), etree.get_ptr(), xC.get_ptr()); - superlu::gstrf(&options, xC.get_ptr(), drop_tol, relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); + superlu::gstrf(&options, xC.get_ptr(), relax, panel_size, etree.get_ptr(), NULL, lwork, perm_c.get_ptr(), perm_r.get_ptr(), l.get_ptr(), u.get_ptr(), &Glu, stat.get_ptr(), &slu_info); if(slu_info != 0) { diff --git a/include/armadillo_bits/translate_superlu.hpp b/include/armadillo_bits/translate_superlu.hpp index b19f62ea..ae53b2b6 100644 --- a/include/armadillo_bits/translate_superlu.hpp +++ b/include/armadillo_bits/translate_superlu.hpp @@ -102,7 +102,7 @@ namespace superlu void gstrf(superlu_options_t* options, SuperMatrix* A, - typename get_pod_type::result drop_tol, int relax, + int relax, int panel_size, int *etree, void *work, int lwork, int* perm_c, int* perm_r, @@ -114,26 +114,22 @@ namespace superlu if(is_float::value) { - typedef float T; - arma_wrapper(sgstrf)(options, A, (T)drop_tol, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); + arma_wrapper(sgstrf)(options, A, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); } else if(is_double::value) { - typedef double T; - arma_wrapper(dgstrf)(options, A, (T)drop_tol, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); + arma_wrapper(dgstrf)(options, A, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); } else if(is_cx_float::value) { - typedef float T; - arma_wrapper(cgstrf)(options, A, (T)drop_tol, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); + arma_wrapper(cgstrf)(options, A, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); } else if(is_cx_double::value) { - typedef double T; - arma_wrapper(zgstrf)(options, A, (T)drop_tol, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); + arma_wrapper(zgstrf)(options, A, relax, panel_size, etree, work, lwork, perm_c, perm_r, L, U, Glu, stat, info); } } diff --git a/src/wrapper1.cpp b/src/wrapper1.cpp index 8228b1e4..4de92c70 100644 --- a/src/wrapper1.cpp +++ b/src/wrapper1.cpp @@ -1588,24 +1588,24 @@ extern "C" - void wrapper_sgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, float c, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) + void wrapper_sgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) { sgstrf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } - void wrapper_dgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, double c, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) + void wrapper_dgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) { dgstrf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } - void wrapper_cgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, float c, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) + void wrapper_cgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) { cgstrf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } - void wrapper_zgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, double c, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) + void wrapper_zgstrf(superlu::superlu_options_t* a, superlu::SuperMatrix* b, int d, int e, int* f, void* g, int h, int* i, int* j, superlu::SuperMatrix* k, superlu::SuperMatrix* l, superlu::GlobalLU_t* m, superlu::SuperLUStat_t* n, int* o) { - zgstrf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); + zgstrf(a, b, d, e, f, g, h, i, j, k, l, m, n, o); }