31#ifndef SPARSELU_PANEL_BMOD_H
32#define SPARSELU_PANEL_BMOD_H
55template <
typename Scalar,
typename StorageIndex>
61 Index ksub,jj,nextl_col;
62 Index fsupc, nsupc, nsupr, nrow;
66 Index segsize,no_zeros ;
71 for (ksub = 0; ksub < nseg; ksub++)
78 krep = segrep(k); k--;
80 nsupc = krep - fsupc + 1;
83 lptr = glu.
xlsub(fsupc);
88 for (jj = jcol; jj < jcol + w; jj++)
90 nextl_col = (jj-jcol) * m;
93 kfnz = repfnz_col(krep);
97 segsize = krep - kfnz + 1;
104 Index ldu = internal::first_multiple<Index>(u_rows, PacketSize);
109 for (jj = jcol; jj < jcol + w; jj++)
111 nextl_col = (jj-jcol) * m;
115 kfnz = repfnz_col(krep);
119 segsize = krep - kfnz + 1;
120 luptr = glu.
xlusup(fsupc);
121 no_zeros = kfnz - fsupc;
123 Index isub = lptr + no_zeros;
124 Index off = u_rows-segsize;
125 for (
Index i = 0; i < off; i++) U(i,u_col) = 0;
126 for (
Index i = 0; i < segsize; i++)
129 U(i+off,u_col) = dense_col(irow);
135 luptr = glu.
xlusup(fsupc);
137 no_zeros = (krep - u_rows + 1) - fsupc;
138 luptr += lda * no_zeros + no_zeros;
140 U = A.template triangularView<UnitLower>().solve(U);
147 Index ldl = internal::first_multiple<Index>(nrow, PacketSize);
152 internal::sparselu_gemm<Scalar>(
L.rows(),
L.cols(), B.cols(), B.data(), B.
outerStride(), U.data(), U.
outerStride(),
L.data(),
L.outerStride());
156 for (jj = jcol; jj < jcol + w; jj++)
158 nextl_col = (jj-jcol) * m;
162 kfnz = repfnz_col(krep);
166 segsize = krep - kfnz + 1;
167 no_zeros = kfnz - fsupc;
168 Index isub = lptr + no_zeros;
170 Index off = u_rows-segsize;
171 for (
Index i = 0; i < segsize; i++)
174 dense_col(irow) = U.coeff(i+off,u_col);
175 U.coeffRef(i+off,u_col) = 0;
179 for (
Index i = 0; i < nrow; i++)
182 dense_col(irow) -=
L.coeff(i,u_col);
183 L.coeffRef(i,u_col) = 0;
191 for (jj = jcol; jj < jcol + w; jj++)
193 nextl_col = (jj-jcol) * m;
197 kfnz = repfnz_col(krep);
201 segsize = krep - kfnz + 1;
202 luptr = glu.
xlusup(fsupc);
208 no_zeros = kfnz - fsupc;
#define eigen_assert(x)
Definition: Macros.h:1047
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
Definition: PlainObjectBase.h:247
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:60
void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector &dense, ScalarVector &tempv, IndexVector &segrep, IndexVector &repfnz, GlobalLU_t &glu)
Performs numeric block updates (sup-panel) in topological order.
Definition: SparseLU_panel_bmod.h:56
constexpr common_t< T1, T2 > max(const T1 x, const T2 y) noexcept
Compile-time pairwise maximum function.
Definition: max.hpp:35
@ emptyIdxLU
Definition: SparseLU_Memory.h:38
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
Definition: Eigen_Colamd.h:50
cubed< length::millimeter > L
Definition: volume.h:49
Definition: SparseLU_Structs.h:77
IndexVector xsup
Definition: SparseLU_Structs.h:79
IndexVector xlusup
Definition: SparseLU_Structs.h:83
IndexVector supno
Definition: SparseLU_Structs.h:80
IndexVector lsub
Definition: SparseLU_Structs.h:82
IndexVector xlsub
Definition: SparseLU_Structs.h:84
ScalarVector lusup
Definition: SparseLU_Structs.h:81
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