31 #ifndef SPARSELU_PANEL_BMOD_H
32 #define SPARSELU_PANEL_BMOD_H
58 template <
typename Scalar,
typename StorageIndex>
62 Index ksub, jj, nextl_col;
63 Index fsupc, nsupc, nsupr, nrow;
67 Index segsize, no_zeros;
72 for (ksub = 0; ksub < nseg; ksub++) {
81 nsupc = krep - fsupc + 1;
82 nsupr = glu.
xlsub(fsupc + 1) - glu.
xlsub(fsupc);
84 lptr = glu.
xlsub(fsupc);
89 for (jj = jcol; jj < jcol +
w; jj++) {
90 nextl_col = (jj - jcol) *
m;
93 kfnz = repfnz_col(krep);
96 segsize = krep - kfnz + 1;
98 u_rows = (
std::max)(segsize, u_rows);
102 Index ldu = internal::first_multiple<Index>(u_rows, PacketSize);
107 for (jj = jcol; jj < jcol +
w; jj++) {
108 nextl_col = (jj - jcol) *
m;
112 kfnz = repfnz_col(krep);
115 segsize = krep - kfnz + 1;
116 luptr = glu.
xlusup(fsupc);
117 no_zeros = kfnz - fsupc;
119 Index isub = lptr + no_zeros;
120 Index off = u_rows - segsize;
121 for (
Index i = 0;
i < off;
i++)
U(
i, u_col) = 0;
122 for (
Index i = 0;
i < segsize;
i++) {
124 U(
i + off, u_col) = dense_col(irow);
130 luptr = glu.
xlusup(fsupc);
132 no_zeros = (krep - u_rows + 1) - fsupc;
133 luptr +=
lda * no_zeros + no_zeros;
135 U =
A.template triangularView<UnitLower>().solve(
U);
142 Index ldl = internal::first_multiple<Index>(nrow, PacketSize);
150 for (jj = jcol; jj < jcol +
w; jj++) {
151 nextl_col = (jj - jcol) *
m;
155 kfnz = repfnz_col(krep);
158 segsize = krep - kfnz + 1;
159 no_zeros = kfnz - fsupc;
160 Index isub = lptr + no_zeros;
162 Index off = u_rows - segsize;
163 for (
Index i = 0;
i < segsize;
i++) {
165 dense_col(irow) =
U.coeff(
i + off, u_col);
166 U.coeffRef(
i + off, u_col) = 0;
172 dense_col(irow) -=
L.coeff(
i, u_col);
173 L.coeffRef(
i, u_col) = 0;
180 for (jj = jcol; jj < jcol +
w; jj++) {
181 nextl_col = (jj - jcol) *
m;
185 kfnz = repfnz_col(krep);
188 segsize = krep - kfnz + 1;
189 luptr = glu.
xlusup(fsupc);
195 no_zeros = kfnz - fsupc;
198 else if (segsize == 2)
200 else if (segsize == 3)
int i
Definition: BiCGSTAB_step_by_step.cpp:9
MatrixXd L
Definition: LLT_example.cpp:6
#define eigen_assert(x)
Definition: Macros.h:910
RowVector3d w
Definition: Matrix_resize_int.cpp:3
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
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:104
constexpr EIGEN_DEVICE_FUNC const Scalar * data() const
Definition: PlainObjectBase.h:273
Expression of a fixed-size or dynamic-size sub-vector.
Definition: VectorBlock.h:58
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:59
Definition: matrices.h:74
#define max(a, b)
Definition: datatypes.h:23
const char const int const RealScalar const RealScalar const int * lda
Definition: level2_cplx_impl.h:20
int * m
Definition: level2_cplx_impl.h:294
char char char int int * k
Definition: level2_impl.h:374
@ emptyIdxLU
Definition: SparseLU_Memory.h:41
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
double U
Swimming speed.
Definition: two_d_variable_diff_adapt.cc:53
Definition: Eigen_Colamd.h:49
Definition: SparseLU_Structs.h:80
IndexVector xsup
Definition: SparseLU_Structs.h:82
IndexVector xlusup
Definition: SparseLU_Structs.h:86
IndexVector supno
Definition: SparseLU_Structs.h:83
IndexVector lsub
Definition: SparseLU_Structs.h:85
IndexVector xlsub
Definition: SparseLU_Structs.h:87
ScalarVector lusup
Definition: SparseLU_Structs.h:84
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