11#ifndef SPARSELU_KERNEL_BMOD_H
12#define SPARSELU_KERNEL_BMOD_H
32 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
34 const Index nrow, IndexVector& lsub,
const Index lptr,
const Index no_zeros);
37template <
int SegSizeAtCompileTime>
38template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
40 const Index nrow, IndexVector& lsub,
const Index lptr,
const Index no_zeros)
42 typedef typename ScalarVector::Scalar Scalar;
46 Index isub = lptr + no_zeros;
49 for (i = 0; i < ((SegSizeAtCompileTime==
Dynamic)?segsize:SegSizeAtCompileTime); i++)
52 tempv(i) = dense(irow);
56 luptr += lda * no_zeros + no_zeros;
61 u = A.template triangularView<UnitLower>().solve(u);
76 isub = lptr + no_zeros;
77 for (i = 0; i < ((SegSizeAtCompileTime==
Dynamic)?segsize:SegSizeAtCompileTime); i++)
80 dense(irow) = tempv(i);
84 for (i = 0; i < nrow; i++)
93 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
99template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
103 typedef typename ScalarVector::Scalar Scalar;
104 typedef typename IndexVector::Scalar StorageIndex;
105 Scalar f = dense(lsub(lptr + no_zeros));
106 luptr += lda * no_zeros + no_zeros + 1;
107 const Scalar* a(lusup.data() + luptr);
108 const StorageIndex* irow(lsub.data()+lptr + no_zeros + 1);
110 for (; i+1 < nrow; i+=2)
112 Index i0 = *(irow++);
113 Index i1 = *(irow++);
116 Scalar d0 = dense.coeff(i0);
117 Scalar d1 = dense.coeff(i1);
120 dense.coeffRef(i0) = d0;
121 dense.coeffRef(i1) = d1;
124 dense.coeffRef(*(irow++)) -= f * *(a++);
#define EIGEN_DONT_INLINE
Definition: Macros.h:950
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index outerStride() const
Definition: Map.h:114
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:107
Index first_multiple(Index size, Index base)
Definition: Memory.h:506
EIGEN_DEVICE_FUNC Index first_default_aligned(const Scalar *array, Index size)
Definition: Memory.h:497
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: Eigen_Colamd.h:50
Definition: SparseLU_kernel_bmod.h:18
static EIGEN_DONT_INLINE void run(const Index segsize, BlockScalarVector &dense, ScalarVector &tempv, ScalarVector &lusup, Index &luptr, const Index lda, const Index nrow, IndexVector &lsub, const Index lptr, const Index no_zeros)
Definition: SparseLU_kernel_bmod.h:39
Definition: GenericPacketMath.h:107