Skip to content

Commit

Permalink
update IDR estimates
Browse files Browse the repository at this point in the history
Co-authored-by: Yuhsiang Tsai <yhmtsai@gmail.com>
  • Loading branch information
upsj and yhmtsai committed Jan 22, 2021
1 parent d2d26d9 commit 0faee57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/solver/gmres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void Gmres<ValueType>::apply_impl(const LinOp *b, LinOp *x) const
* 1x norm2 n
* 1x scal 2n
* Restart: (1+14/d)n (every dth iteration)
* 1x gemm (d+1)n
* 1x gemv (d+1)n
* 1x Preconditioner 2n * values + storage
* 1x axpy 3n
* 1x copy 2n
Expand Down
16 changes: 8 additions & 8 deletions core/solver/idr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ void Idr<ValueType>::iterate(const LinOp *b, LinOp *x) const
* (11/2s+10+5/(s+1))n * values + matrix/preconditioner storage
* For (s+1) iterations:
* (11/2s^2+31/2s+15)n * values + (s+1) * matrix/preconditioner storage
* dx SpMV: 2(s+1)n * values + (s+1) * storage
* dx Preconditioner: 2(s+1)n * values + (s+1) * storage
* 1x multidot (gemm) (s+1)n
* dx step 1 (fused axpys) s(s/2+5/2)n = approx 1 + sum k=[0,s) of (s-k+1)n
* dx step 2 (fused axpys) s(s/2+5/2)n = approx 1 + sum k=[0,s) of (s-k+1)n
* dx step 3: s(9/2s+11/2)n = sum k=[0,s) of (8k+2+s-k+1+6)n
* (s+1)x SpMV: 2(s+1)n * values + (s+1) * storage
* (s+1)x Preconditioner: 2(s+1)n * values + (s+1) * storage
* 1x multidot (gemv) (s+1)n
* sx step 1 (fused axpys) s(s/2+5/2)n = sum k=[0,s) of (s-k+2)n
* sx step 2 (fused axpys) s(s/2+5/2)n = sum k=[0,s) of (s-k+2)n
* sx step 3: s(9/2s+11/2)n = sum k=[0,s) of (8k+2+s-k+1+6)n
* 1x orthogonalize g+u (8k+2)n in iteration k (0-based)
* 1x multidot (gemm) (s-k+1)n in iteration k (0-based)
* 1x multidot (gemv) (s-k+1)n in iteration k (0-based)
* 2x axpy 6n
* 1x dot 2n
* 2x norm2 2n
* 1x scale 2n
* 2x axpy 4n
* 2x axpy 6n
*/
while (true) {
++total_iter;
Expand Down

0 comments on commit 0faee57

Please sign in to comment.