X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/book_gpu.git/blobdiff_plain/4f8020b1c6324b056b53b4325cd80d59bb7cf19f..086d3b0478375bd620c6c5923b8f8b11ad194381:/BookGPU/Chapters/chapter5/figures/component_design.tikz diff --git a/BookGPU/Chapters/chapter5/figures/component_design.tikz b/BookGPU/Chapters/chapter5/figures/component_design.tikz index 984ae7b..beb7103 100644 --- a/BookGPU/Chapters/chapter5/figures/component_design.tikz +++ b/BookGPU/Chapters/chapter5/figures/component_design.tikz @@ -1,97 +1,98 @@ -\begin{tikzpicture} - -\tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=white, drop shadow, text centered, anchor=north, text width=6cm] - -%nodes -\node (Vector) [abstract, rectangle split, rectangle split parts=3] -{ -\textbf{Vector} -\nodepart{second} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -typedef value_type; -typedef size_type; -\end{lstlisting} -\nodepart{third} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] - Vector(size_type); - Vector(Vector); -void axpy(value_type,Vector); -void axpby(value_type,Vector); -void copy(Vector); -value_type dot(Vector); -Vector* duplicate(); -void fill(value_type); -value_type nrmi(); -value_type nrm2(); -void scal(vale_type); -size_type size(); -\end{lstlisting} -}; - -\node (Matrix) [abstract, rectangle split, rectangle split parts=3, below right=0cm and 0.4cm of Vector.north east] -{ -\textbf{Matrix} -\nodepart{second} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -typedef vector_type; -\end{lstlisting} -\nodepart{third} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -void mult(vector_type); -\end{lstlisting} -}; - -\node (Solver) [abstract, rectangle split, rectangle split parts=3, below=of Vector] -{ -\textbf{EqSolver} -\nodepart{second} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -typedef vector_type; -typedef matrix_type; -typedef monitor_type; -typedef preconditioner_type; -\end{lstlisting} -\nodepart{third} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] - EqSolver(matrix_type - ,monitor_type); -void solve(vector_type,vector_type); -void set_preconditioner(preconditioner_type); -\end{lstlisting} -}; - -\node (Preconditioner) [abstract, rectangle split, rectangle split parts=3, below=of Matrix] -{ -\textbf{Preconditioner} -\nodepart{second} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -typedef vector_type; -typedef matrix_type; -typedef monitor_type; -\end{lstlisting} -\nodepart{third} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] - Preconditioner(matrix_type - ,monitor_type); -void operator()(vector_type,vector_type) -\end{lstlisting} -}; - -\node (TimeIntegrator) [abstract, rectangle split, rectangle split parts=2, below=of Preconditioner] -{ -\textbf{TimeIntegrator} -\nodepart{second} -%\nodepart{third} -\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily] -template -void operator()(rhs_type - ,vector_type - ,value_type - ,value_type - ,value_type); -\end{lstlisting} -}; - -\end{tikzpicture} +\begin{tikzpicture} + +\tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=white, drop shadow, text centered, anchor=north, text width=5.5cm] + +%nodes +\node (Vector) [abstract, rectangle split, rectangle split parts=3] +{ +\textbf{Vector} +\nodepart{second} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +typedef value_type; +typedef size_type; +\end{lstlisting} +\nodepart{third} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] + Vector(size_type); + Vector(Vector); +void axpy(value_type,Vector); +void axpby(value_type,Vector); +void copy(Vector); +value_type dot(Vector); +Vector* duplicate(); +void fill(value_type); +value_type nrmi(); +value_type nrm2(); +void scal(vale_type); +size_type size(); +\end{lstlisting} +}; + +\node (Matrix) [abstract, rectangle split, rectangle split parts=3, below right=0cm and 0.4cm of Vector.north east] +{ +\textbf{Matrix} +\nodepart{second} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +typedef vector_type; +\end{lstlisting} +\nodepart{third} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +void mult(vector_type,vector_type); +\end{lstlisting} +}; + +\node (Solver) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Vector] +{ +\textbf{EqSolver} +\nodepart{second} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +typedef vector_type; +typedef matrix_type; +typedef monitor_type; +typedef preconditioner_type; +\end{lstlisting} +\nodepart{third} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] + EqSolver(matrix_type + ,monitor_type); +void solve(vector_type,vector_type); +void set_preconditioner(preconditioner_type); +\end{lstlisting} +}; + +\node (Preconditioner) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Matrix] +{ +\textbf{Preconditioner} +\nodepart{second} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +typedef vector_type; +typedef matrix_type; +typedef monitor_type; +\end{lstlisting} +\nodepart{third} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] + Preconditioner(matrix_type + ,monitor_type); +void operator()(vector_type + ,vector_type) +\end{lstlisting} +}; + +\node (TimeIntegrator) [abstract, rectangle split, rectangle split parts=2, below=0.4cm of Preconditioner] +{ +\textbf{TimeIntegrator} +\nodepart{second} +%\nodepart{third} +\begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none] +template +void operator()(rhs_type + ,vector_type + ,value_type + ,value_type + ,value_type); +\end{lstlisting} +}; + +\end{tikzpicture}