]> AND Private Git Repository - book_gpu.git/blob - BookGPU/Chapters/chapter5/figures/component_design.tikz
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
modif
[book_gpu.git] / BookGPU / Chapters / chapter5 / figures / component_design.tikz
1 \begin{tikzpicture}
2
3 \tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=white, drop shadow, text centered, anchor=north, text width=5.5cm]
4         
5 %nodes
6 \node (Vector) [abstract, rectangle split, rectangle split parts=3]
7 {
8 \textbf{Vector}
9 \nodepart{second}
10 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
11 typedef value_type;
12 typedef size_type;
13 \end{lstlisting}
14 \nodepart{third}
15 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
16            Vector(size_type);
17            Vector(Vector);
18 void       axpy(value_type,Vector);
19 void       axpby(value_type,Vector);
20 void       copy(Vector);
21 value_type dot(Vector);
22 Vector*    duplicate();
23 void       fill(value_type);
24 value_type nrmi();
25 value_type nrm2();
26 void       scal(vale_type);
27 size_type  size();
28 \end{lstlisting}
29 };
30
31 \node (Matrix) [abstract, rectangle split, rectangle split parts=3, below right=0cm and 0.4cm of Vector.north east]
32 {
33 \textbf{Matrix}
34 \nodepart{second}
35 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
36 typedef vector_type;
37 \end{lstlisting}
38 \nodepart{third}
39 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
40 void mult(vector_type,vector_type);
41 \end{lstlisting}
42 };
43
44 \node (Solver) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Vector]
45 {
46 \textbf{EqSolver}
47 \nodepart{second}
48 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
49 typedef vector_type;
50 typedef matrix_type;
51 typedef monitor_type;
52 typedef preconditioner_type;
53 \end{lstlisting}
54 \nodepart{third}
55 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
56      EqSolver(matrix_type
57              ,monitor_type);
58 void solve(vector_type,vector_type);
59 void set_preconditioner(preconditioner_type);
60 \end{lstlisting}
61 };
62
63 \node (Preconditioner) [abstract, rectangle split, rectangle split parts=3, below=0.4cm of Matrix]
64 {
65 \textbf{Preconditioner}
66 \nodepart{second}
67 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
68 typedef vector_type;
69 typedef matrix_type;
70 typedef monitor_type;
71 \end{lstlisting}
72 \nodepart{third}
73 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
74      Preconditioner(matrix_type
75                    ,monitor_type);
76 void operator()(vector_type
77                ,vector_type)
78 \end{lstlisting}
79 };
80
81 \node (TimeIntegrator) [abstract, rectangle split, rectangle split parts=2, below=0.4cm of Preconditioner]
82 {
83 \textbf{TimeIntegrator}
84 \nodepart{second}
85 %\nodepart{third}
86 \begin{lstlisting}[frame=none,basicstyle=\scriptsize\ttfamily,backgroundcolor=\color{white},numbers=none]
87 template <typename rhs_type
88         , typename vector_type
89         , typename value_type>
90 void operator()(rhs_type
91                ,vector_type
92                ,value_type
93                ,value_type
94                ,value_type);
95 \end{lstlisting}
96 };
97
98 \end{tikzpicture}