Skip to Main Content
Designing Scientific Applications on GPUs
book

Designing Scientific Applications on GPUs

by Raphael Couturier
November 2013
Intermediate to advanced content levelIntermediate to advanced
498 pages
17h 6m
English
Chapman and Hall/CRC
Content preview from Designing Scientific Applications on GPUs
316 Designing Scientific Applications on GPUs
Algorithm 16: left-preconditioned GMRES method with restarts
1 Choose an initial guess x
0
;
2 convergence = false;
3 k = 1;
4 r
0
= M
1
(b Ax
0
);
5 β = kr
0
k
2
;
6 while ¬convergence do
7 v
1
= r
0
;
8 for j = 1 to m do
9 w
j
= M
1
Av
j
;
10 for i = 1 to j do
11 h
i,j
= (w
j
, v
i
);
12 w
j
= w
j
h
i,j
v
i
;
13 end
14 h
j+1,j
= kw
j
k
2
;
15 v
j+1
= w
j
/h
j+1,j
;
16 end
17 Set V
m
= {v
j
}
1jm
and
¯
H
m
= (h
i,j
) is an upper Hessenberg
matrix of size (m + 1) ×m;
18 Solve a least-squares problem of size m: min
yIR
m
kβe
1
¯
H
m
yk
2
;
19 x
m
= x
0
+ V
m
y
m
;
20 r
m
= M
1
(b Ax
m
);
21 β = kr
m
k
2
;
22 if (β < ε) or (k maxiter) then
23 convergence = true;
24 else
25 x
0
= x
m
;
26 r
0
= r
m
;
27
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Introduction to Numerical Analysis and Scientific Computing

Introduction to Numerical Analysis and Scientific Computing

Nabil Nassif, Dolly Khuwayri Fayyad
Computational Electromagnetism

Computational Electromagnetism

Alain Bossavit, Isaak D. Mayergoyz

Publisher Resources

ISBN: 9781466571648