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