From a8bf6364bdc90b0d1eb0e9ec3ae0354899b4b7d8 Mon Sep 17 00:00:00 2001 From: conrad Date: Tue, 22 Dec 2020 00:10:03 +1000 Subject: [PATCH] definitions of xlangs and xgscon --- include/armadillo_bits/def_superlu.hpp | 16 +++++-- src/wrapper1.cpp | 60 ++++++++++++++++++++++---- 2 files changed, 65 insertions(+), 11 deletions(-) diff --git a/include/armadillo_bits/def_superlu.hpp b/include/armadillo_bits/def_superlu.hpp index ca64cbde..fad64761 100644 --- a/include/armadillo_bits/def_superlu.hpp +++ b/include/armadillo_bits/def_superlu.hpp @@ -31,16 +31,26 @@ extern "C" 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(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*); extern void arma_wrapper(cgstrs)(superlu::trans_t, superlu::SuperMatrix*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); extern void arma_wrapper(zgstrs)(superlu::trans_t, superlu::SuperMatrix*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*, superlu::SuperLUStat_t*, int*); - + + extern float arma_wrapper(slangs)(char* norm, superlu::SuperMatrix* A); + extern double arma_wrapper(dlangs)(char* norm, superlu::SuperMatrix* A); + extern float arma_wrapper(clangs)(char* norm, superlu::SuperMatrix* A); + extern double arma_wrapper(zlangs)(char* norm, superlu::SuperMatrix* A); + + extern void arma_wrapper(sgscon)(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, float anorm, float* rcond, superlu::SuperLUStat_t* stat, int* info); + extern void arma_wrapper(dgscon)(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, double anorm, double* rcond, superlu::SuperLUStat_t* stat, int* info); + extern void arma_wrapper(cgscon)(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, float anorm, float* rcond, superlu::SuperLUStat_t* stat, int* info); + extern void arma_wrapper(zgscon)(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, double anorm, double* rcond, superlu::SuperLUStat_t* stat, int* info); + extern void arma_wrapper(StatInit)(superlu::SuperLUStat_t*); extern void arma_wrapper(StatFree)(superlu::SuperLUStat_t*); extern void arma_wrapper(set_default_options)(superlu::superlu_options_t*); - + extern void arma_wrapper(get_perm_c)(int, superlu::SuperMatrix*, int*); extern int arma_wrapper(sp_ienv)(int); extern void arma_wrapper(sp_preorder)(superlu::superlu_options_t*, superlu::SuperMatrix*, int*, int*, superlu::SuperMatrix*); diff --git a/src/wrapper1.cpp b/src/wrapper1.cpp index 3e3f285f..9ecda737 100644 --- a/src/wrapper1.cpp +++ b/src/wrapper1.cpp @@ -1602,10 +1602,10 @@ extern "C" { zgstrf(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); } - - - - + + + + void wrapper_sgstrs(superlu::trans_t a, superlu::SuperMatrix* b, superlu::SuperMatrix* c, int* d, int* e, superlu::SuperMatrix* f, superlu::SuperLUStat_t* g, int* h) { sgstrs(a, b, c, d, e, f, g, h); @@ -1625,10 +1625,54 @@ extern "C" { zgstrs(a, b, c, d, e, f, g, h); } - - - - + + + + + float wrapper_slangs(char* norm, superlu::SuperMatrix* A) + { + return slangs(norm, A); + } + + double wrapper_dlangs(char* norm, superlu::SuperMatrix* A); + { + return dlangs(norm, A); + } + + float wrapper_clangs(char* norm, superlu::SuperMatrix* A); + { + return clangs(norm, A); + } + + double wrapper_zlangs(char* norm, superlu::SuperMatrix* A); + { + return zlangs(norm, A); + } + + + + void wrapper_sgscon(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, float anorm, float* rcond, superlu::SuperLUStat_t* stat, int* info) + { + sgscon(norm, L, U, anorm, rcond, stat, info); + } + + void wrapper_dgscon(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, double anorm, double* rcond, superlu::SuperLUStat_t* stat, int* info) + { + dgscon(norm, L, U, anorm, rcond, stat, info); + } + + void wrapper_cgscon(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, float anorm, float* rcond, superlu::SuperLUStat_t* stat, int* info) + { + cgscon(norm, L, U, anorm, rcond, stat, info); + } + + void wrapper_zgscon(char* norm, superlu::SuperMatrix* L, superlu::SuperMatrix* U, double anorm, double* rcond, superlu::SuperLUStat_t* stat, int* info) + { + zgscon(norm, L, U, anorm, rcond, stat, info); + } + + + void wrapper_StatInit(superlu::SuperLUStat_t* a) { StatInit(a);