MCPcopy Create free account
hub / github.com/abess-team/abess / column_bmod

Method column_bmod

python/include/Eigen/src/SparseLU/SparseLU_column_bmod.h:53–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 */
52template <typename Scalar, typename StorageIndex>
53Index SparseLUImpl<Scalar,StorageIndex>::column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv,
54 BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu)
55{
56 Index jsupno, k, ksub, krep, ksupno;
57 Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
58 Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
59 /* krep = representative of current k-th supernode
60 * fsupc = first supernodal column
61 * nsupc = number of columns in a supernode
62 * nsupr = number of rows in a supernode
63 * luptr = location of supernodal LU-block in storage
64 * kfnz = first nonz in the k-th supernodal segment
65 * no_zeros = no lf leading zeros in a supernodal U-segment
66 */
67
68 jsupno = glu.supno(jcol);
69 // For each nonzero supernode segment of U[*,j] in topological order
70 k = nseg - 1;
71 Index d_fsupc; // distance between the first column of the current panel and the
72 // first column of the current snode
73 Index fst_col; // First column within small LU update
74 Index segsize;
75 for (ksub = 0; ksub < nseg; ksub++)
76 {
77 krep = segrep(k); k--;
78 ksupno = glu.supno(krep);
79 if (jsupno != ksupno )
80 {
81 // outside the rectangular supernode
82 fsupc = glu.xsup(ksupno);
83 fst_col = (std::max)(fsupc, fpanelc);
84
85 // Distance from the current supernode to the current panel;
86 // d_fsupc = 0 if fsupc > fpanelc
87 d_fsupc = fst_col - fsupc;
88
89 luptr = glu.xlusup(fst_col) + d_fsupc;
90 lptr = glu.xlsub(fsupc) + d_fsupc;
91
92 kfnz = repfnz(krep);
93 kfnz = (std::max)(kfnz, fpanelc);
94
95 segsize = krep - kfnz + 1;
96 nsupc = krep - fst_col + 1;
97 nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
98 nrow = nsupr - d_fsupc - nsupc;
99 Index lda = glu.xlusup(fst_col+1) - glu.xlusup(fst_col);
100
101
102 // Perform a triangular solver and block update,
103 // then scatter the result of sup-col update to dense
104 no_zeros = kfnz - fst_col;
105 if(segsize==1)
106 LU_kernel_bmod<1>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
107 else
108 LU_kernel_bmod<Dynamic>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
109 } // end if jsupno
110 } // end for each segment

Callers

nothing calls this directly

Calls 5

noaliasMethod · 0.80
runFunction · 0.50
setZeroMethod · 0.45
dataMethod · 0.45
solveMethod · 0.45

Tested by

no test coverage detected