11 #ifndef SPARSELU_KERNEL_BMOD_H
12 #define SPARSELU_KERNEL_BMOD_H
20 template <
int SegSizeAtCompileTime>
35 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
38 IndexVector& lsub,
const Index lptr,
const Index no_zeros);
41 template <
int SegSizeAtCompileTime>
42 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
44 ScalarVector& tempv, ScalarVector& lusup,
Index& luptr,
51 Index isub = lptr + no_zeros;
54 for (
i = 0;
i < ((SegSizeAtCompileTime ==
Dynamic) ? segsize : SegSizeAtCompileTime);
i++) {
56 tempv(
i) = dense(irow);
60 luptr +=
lda * no_zeros + no_zeros;
66 u =
A.template triangularView<UnitLower>().solve(u);
82 isub = lptr + no_zeros;
83 for (
i = 0;
i < ((SegSizeAtCompileTime ==
Dynamic) ? segsize : SegSizeAtCompileTime);
i++) {
85 dense(irow) = tempv(
i);
89 for (
i = 0;
i < nrow;
i++) {
97 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
100 IndexVector& lsub,
const Index lptr,
const Index no_zeros);
103 template <
typename BlockScalarVector,
typename ScalarVector,
typename IndexVector>
105 ScalarVector& , ScalarVector& lusup,
Index& luptr,
107 const Index no_zeros) {
110 Scalar f = dense(lsub(lptr + no_zeros));
111 luptr +=
lda * no_zeros + no_zeros + 1;
112 const Scalar*
a(lusup.data() + luptr);
113 const StorageIndex* irow(lsub.data() + lptr + no_zeros + 1);
115 for (;
i + 1 < nrow;
i += 2) {
116 Index i0 = *(irow++);
117 Index i1 = *(irow++);
120 Scalar d0 = dense.coeff(i0);
121 Scalar d1 = dense.coeff(i1);
124 dense.coeffRef(i0) = d0;
125 dense.coeffRef(i1) = d1;
127 if (
i < nrow) dense.coeffRef(*(irow++)) -=
f * *(
a++);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_DONT_INLINE
Definition: Macros.h:853
SCALAR Scalar
Definition: bench_gemm.cpp:45
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:48
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:104
Definition: matrices.h:74
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
const Scalar * a
Definition: level2_cplx_impl.h:32
const char const int const RealScalar const RealScalar const int * lda
Definition: level2_cplx_impl.h:20
Index first_multiple(Index size, Index base)
Definition: Memory.h:559
static Index first_default_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:539
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int Dynamic
Definition: Constants.h:25
Definition: Eigen_Colamd.h:49
Definition: SparseLU_kernel_bmod.h:21
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)
Performs numeric block updates from a given supernode to a single column.
Definition: SparseLU_kernel_bmod.h:43
Definition: GenericPacketMath.h:108