26 #ifndef CASADI_LAPACK_LU_HPP
27 #define CASADI_LAPACK_LU_HPP
29 #include "casadi/core/linsol_internal.hpp"
30 #include <casadi/interfaces/lapack/casadi_linsol_lapacklu_export.h>
34 void dgetrf_(
int *m,
int *n,
double *a,
int *lda,
int *ipiv,
int *info);
37 void dgetrs_(
char* trans,
int *n,
int *nrhs,
double *a,
38 int *lda,
int *ipiv,
double *b,
int *ldb,
int *info);
41 void dgeequ_(
int *m,
int *n,
double *a,
int *lda,
double *r,
double *c,
42 double *colcnd,
double *rowcnd,
double *amax,
int *info);
45 void dlaqge_(
int *m,
int *n,
double *a,
int *lda,
double *r,
double *c,
46 double *colcnd,
double *rowcnd,
double *amax,
char *equed);
64 std::vector<double>
mat;
70 std::vector<double> r,
c;
102 void init(
const Dict& opts)
override;
108 int init_mem(
void* mem)
const override;
114 int nfact(
void* mem,
const double* A)
const override;
117 int solve(
void* mem,
const double* A,
double* x, casadi_int nrhs,
bool tr)
const override;
142 std::string
class_name()
const override {
return "LapackLu";}
Helper class for Serialization.
'lapacklu' plugin for Linsol
std::string class_name() const override
Readable name of the internal class.
static ProtoFunction * deserialize(DeserializingStream &s)
Deserialize with type disambiguation.
void free_mem(void *mem) const override
Free memory block.
void * alloc_mem() const override
Create memory block.
bool equilibriate_
Equilibrate?
static const Options options_
Options.
static LinsolInternal * creator(const std::string &name, const Sparsity &sp)
Create a new Linsol.
const char * plugin_name() const override
bool allow_equilibration_failure_
Allow the equilibration to fail.
const Options & get_options() const override
Options.
static const std::string meta_doc
A documentation string.
Base class for FunctionInternal and LinsolInternal.
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.
std::vector< double > mat
char equed
Type of scaling during the last equilibration.
std::vector< int > ipiv
Pivoting elements.
Options metadata for a class.