NLAlib.CGS2.cgs2Extend
Library · def
Column-wise two-pass classical Gram–Schmidt with threshold deflation, at the dimensions [n, k, b]. The stored basis Q has k columns of length n; the new block Qn is the b columns stored directly after it, so that Q read with k + c columns is the basis followed by the new columns before c. For each column c of the block W, in order: the norm of the column is saved; the rows k, …, k + b - 1 of column c of the coefficient block C are set to zero; a first classical pass against the k + c stored columns writes its coefficients to the rows before k + c of that column and a second pass writes its coefficients to scratch, both reducing the column of W in place; the second coefficients are added to the first; the norm of the reduced column is compared with the rounded product of the literal τ and the saved norm. If it is at most that product the new column is set to zero, and otherwise the new column is the reduced column divided by its norm, and the norm is the diagonal coefficient at row k + c. The scratch is k + b coefficient cells and three scalar cells.
NLAlib.CGS2.cgs2Extend {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.Blas1Op Op]
[Ops.Has Ops.CmpTst Tst] (τ : ℚ) : Ops.Stmt Op TstImport NLAlib.Krylov.Orthogonalization.CGS2.Extend.