mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-19 04:12:11 +00:00
Add GPU references and example to docs: first round.
This commit is contained in:
@@ -416,6 +416,45 @@ call P%build(A,desc_A,info)
|
||||
\end{listing}
|
||||
|
||||
|
||||
|
||||
\subsection{GPU example\label{sec:gpu-example}}
|
||||
|
||||
The code reported in Figure~\ref{fig:gpu-ex1} shows how to set up a
|
||||
program exploiting the combined GPU capabilities of PSBLAS and
|
||||
AMG4PSBLAS.
|
||||
\begin{listing}[h!]
|
||||
\ifpdf
|
||||
\begin{minted}[breaklines=true,bgcolor=bg,fontsize=\small]{fortran}
|
||||
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
|
||||
call P%init('AS',info)
|
||||
call P%set('SUB_OVR',2,info)
|
||||
call P%build(A,desc_A,info)
|
||||
... ...
|
||||
! solve Ax=b with preconditioned BiCGSTAB
|
||||
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
|
||||
\end{minted}
|
||||
\else
|
||||
\begin{center}
|
||||
\begin{minipage}{.90\textwidth}
|
||||
{\small
|
||||
\begin{verbatim}
|
||||
! build a one-level RAS with overlap 2 and ILU(0) on the local blocks.
|
||||
call P%init('AS',info)
|
||||
call P%set('SUB_OVR',2,info)
|
||||
call P%build(A,desc_A,info)
|
||||
... ...
|
||||
! solve Ax=b with preconditioned BiCGSTAB
|
||||
call psb_krylov('BICGSTAB',A,P,b,x,tol,desc_A,info)
|
||||
\end{verbatim}
|
||||
}
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
\fi
|
||||
\caption{setup of a one-level Schwarz preconditioner.\label{fig:gpu-ex1}}
|
||||
\end{listing}
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "userguide"
|
||||
|
||||
Reference in New Issue
Block a user