Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::SluMatrix Struct Reference

#include <src/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h>

+ Inheritance diagram for Eigen::SluMatrix:
+ Collaboration diagram for Eigen::SluMatrix:

Public Member Functions

 SluMatrix ()
 
 SluMatrix (const SluMatrix &other)
 
SluMatrixoperator= (const SluMatrix &other)
 
void setStorageType (Stype_t t)
 
template<typename Scalar >
void setScalarType ()
 

Static Public Member Functions

template<typename MatrixType >
static SluMatrix Map (MatrixBase< MatrixType > &_mat)
 
template<typename MatrixType >
static SluMatrix Map (SparseMatrixBase< MatrixType > &a_mat)
 

Public Attributes

struct { 
 
   union { 
 
int nnz
 
int lda
 
   }  
 
voidvalues
 
int * innerInd
 
int * outerInd
 
storage 
 

Detailed Description

Constructor & Destructor Documentation

◆ SluMatrix() [1/2]

Eigen::SluMatrix::SluMatrix ( )
inline
118 {
119 Store = &storage;
120 }
struct Eigen::SluMatrix::@636 storage

References storage.

◆ SluMatrix() [2/2]

Eigen::SluMatrix::SluMatrix ( const SluMatrix other)
inline
123 : SuperMatrix(other)
124 {
125 Store = &storage;
126 storage = other.storage;
127 }

References storage.

Member Function Documentation

◆ Map() [1/2]

template<typename MatrixType >
static SluMatrix Eigen::SluMatrix::Map ( MatrixBase< MatrixType > &  _mat)
inlinestatic
176 {
177 MatrixType& mat(_mat.derived());
178 eigen_assert( ((MatrixType::Flags&RowMajorBit)!=RowMajorBit) && "row-major dense matrices are not supported by SuperLU");
179 SluMatrix res;
180 res.setStorageType(SLU_DN);
181 res.setScalarType<typename MatrixType::Scalar>();
182 res.Mtype = SLU_GE;
183
184 res.nrow = internal::convert_index<int>(mat.rows());
185 res.ncol = internal::convert_index<int>(mat.cols());
186
187 res.storage.lda = internal::convert_index<int>(MatrixType::IsVectorAtCompileTime ? mat.size() : mat.outerStride());
188 res.storage.values = (void*)(mat.data());
189 return res;
190 }
#define eigen_assert(x)
Definition Macros.h:579
const unsigned int RowMajorBit
Definition Constants.h:61
SluMatrix()
Definition SuperLUSupport.h:117

References eigen_assert, Eigen::RowMajorBit, setScalarType(), setStorageType(), and storage.

Referenced by Eigen::SuperLU< _MatrixType >::_solve_impl(), and Eigen::internal::asSluMatrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Map() [2/2]

template<typename MatrixType >
static SluMatrix Eigen::SluMatrix::Map ( SparseMatrixBase< MatrixType > &  a_mat)
inlinestatic
194 {
195 MatrixType &mat(a_mat.derived());
196 SluMatrix res;
197 if ((MatrixType::Flags&RowMajorBit)==RowMajorBit)
198 {
199 res.setStorageType(SLU_NR);
200 res.nrow = internal::convert_index<int>(mat.cols());
201 res.ncol = internal::convert_index<int>(mat.rows());
202 }
203 else
204 {
205 res.setStorageType(SLU_NC);
206 res.nrow = internal::convert_index<int>(mat.rows());
207 res.ncol = internal::convert_index<int>(mat.cols());
208 }
209
210 res.Mtype = SLU_GE;
211
212 res.storage.nnz = internal::convert_index<int>(mat.nonZeros());
213 res.storage.values = mat.valuePtr();
214 res.storage.innerInd = mat.innerIndexPtr();
215 res.storage.outerInd = mat.outerIndexPtr();
216
217 res.setScalarType<typename MatrixType::Scalar>();
218
219 // FIXME the following is not very accurate
220 if (MatrixType::Flags & Upper)
221 res.Mtype = SLU_TRU;
222 if (MatrixType::Flags & Lower)
223 res.Mtype = SLU_TRL;
224
225 eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU");
226
227 return res;
228 }
@ SelfAdjoint
Definition Constants.h:220
@ Lower
Definition Constants.h:204
@ Upper
Definition Constants.h:206

References Eigen::SparseMatrixBase< Derived >::derived(), eigen_assert, Eigen::Lower, Eigen::RowMajorBit, Eigen::SelfAdjoint, setScalarType(), setStorageType(), storage, and Eigen::Upper.

+ Here is the call graph for this function:

◆ operator=()

SluMatrix & Eigen::SluMatrix::operator= ( const SluMatrix other)
inline
130 {
131 SuperMatrix::operator=(static_cast<const SuperMatrix&>(other));
132 Store = &storage;
133 storage = other.storage;
134 return *this;
135 }

References storage.

◆ setScalarType()

template<typename Scalar >
void Eigen::SluMatrix::setScalarType ( )
inline
159 {
161 Dtype = SLU_S;
163 Dtype = SLU_D;
164 else if (internal::is_same<Scalar,std::complex<float> >::value)
165 Dtype = SLU_C;
166 else if (internal::is_same<Scalar,std::complex<double> >::value)
167 Dtype = SLU_Z;
168 else
169 {
170 eigen_assert(false && "Scalar type not supported by SuperLU");
171 }
172 }
@ value
Definition Meta.h:63

References eigen_assert.

Referenced by Eigen::SuperLUBase< _MatrixType, Derived >::initFactorization(), Map(), Map(), Eigen::SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run(), and Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run().

+ Here is the caller graph for this function:

◆ setStorageType()

void Eigen::SluMatrix::setStorageType ( Stype_t  t)
inline
146 {
147 Stype = t;
148 if (t==SLU_NC || t==SLU_NR || t==SLU_DN)
149 Store = &storage;
150 else
151 {
152 eigen_assert(false && "storage type not supported");
153 Store = 0;
154 }
155 }

References eigen_assert, and storage.

Referenced by Eigen::SuperLUBase< _MatrixType, Derived >::initFactorization(), Map(), Map(), Eigen::SluMatrixMapHelper< Matrix< Scalar, Rows, Cols, Options, MRows, MCols > >::run(), and Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run().

+ Here is the caller graph for this function:

Member Data Documentation

◆ [struct]


The documentation for this struct was generated from the following file: