X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/book_gpu.git/blobdiff_plain/4f8020b1c6324b056b53b4325cd80d59bb7cf19f..dd9c1efaf5eab342643f363e8bd4ab8012ba9596:/BookGPU/Chapters/chapter5/figures/dd2d.tikz?ds=sidebyside diff --git a/BookGPU/Chapters/chapter5/figures/dd2d.tikz b/BookGPU/Chapters/chapter5/figures/dd2d.tikz index 2b84097..b36cbf3 100644 --- a/BookGPU/Chapters/chapter5/figures/dd2d.tikz +++ b/BookGPU/Chapters/chapter5/figures/dd2d.tikz @@ -1,62 +1,62 @@ -\tikzstyle{ghostblock} = [draw,rectangle,minimum height=5.6cm, minimum width=1.6cm,color=gray!80,rounded corners=2pt] -\newcommand*{\boxcolor}{gray!80} -\newcommand*{\circolor}{black} -\newcommand*{\gridscale}{1.0\linewidth} -\resizebox{\gridscale}{!}{ -\begin{tikzpicture}[thick] -\draw (0,0) grid (8,5); -\foreach \c in {(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0)} - \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} - \fill [fill=\circolor] \k + \c circle (0.12); -\foreach \k in {0,1,2,3,4,5} -{ - \fill [fill=\boxcolor] (6.9,-0.1+\k) rectangle (7.1,0.1+\k); - \fill [fill=\boxcolor] (7.9,-0.1+\k) rectangle (8.1,0.1+\k); -} -\node (rect1l) [ghostblock] at (7.5,2.5) {}; -\node (rect2l) [ghostblock] at (12.5,2.5) {}; -\draw (rect1l.north) edge[out=45,in=135,triangle 45-] (rect2l.north); - - - -\draw (10,0) grid (20,5); -\foreach \c in {(12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0)} - \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} - \fill [fill=\circolor] \k + \c circle (0.12); -\foreach \k in {0,1,2,3,4,5} -{ - \fill [fill=\boxcolor] (9.9,-0.1+\k) rectangle (10.1,0.1+\k); - \fill [fill=\boxcolor] (10.9,-0.1+\k) rectangle (11.1,0.1+\k); -} -\node (rect1r) [ghostblock] at (5.5,2.5) {}; -\node (rect2r) [ghostblock] at (10.5,2.5) {}; -\draw (rect1r.south) edge[out=-45,in=-135,-triangle 45] (rect2r.south); -\foreach \k in {0,1,2,3,4,5} -{ - \fill [fill=\boxcolor] (18.9,-0.1+\k) rectangle (19.1,0.1+\k); - \fill [fill=\boxcolor] (19.9,-0.1+\k) rectangle (20.1,0.1+\k); -} -\node (rect1r2) [ghostblock] at (19.5,2.5) {}; -\node (rect2r2) [ghostblock] at (24.5,2.5) {}; -\draw (rect1r2.north) edge[out=45,in=135,triangle 45-] (rect2r2.north); - - - -\draw (22,0) grid (30,5); -\foreach \c in {(24,0), (25,0), (26,0), (27,0), (28,0), (29,0), (30,0)} - \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} - \fill [fill=\circolor] \k + \c circle (0.12); -\foreach \k in {0,1,2,3,4,5} -{ - \fill [fill=\boxcolor] (21.9,-0.1+\k) rectangle (22.1,0.1+\k); - \fill [fill=\boxcolor] (22.9,-0.1+\k) rectangle (23.1,0.1+\k); -} -\node (rect1r3) [ghostblock] at (17.5,2.5) {}; -\node (rect2r3) [ghostblock] at (22.5,2.5) {}; -\draw (rect1r3.south) edge[out=-45,in=-135,-triangle 45] (rect2r3.south); - - - -\end{tikzpicture} -} - +\tikzstyle{ghostblock} = [draw,rectangle,minimum height=5.6cm, minimum width=1.6cm,color=gray!80,rounded corners=2pt] +\newcommand*{\boxcolor}{gray!80} +\newcommand*{\circolor}{black} +\newcommand*{\gridscale}{1.0\linewidth} +\resizebox{\gridscale}{!}{ +\begin{tikzpicture}[thick] +\draw (0,0) grid (8,5); +\foreach \c in {(0,0), (1,0), (2,0), (3,0), (4,0), (5,0), (6,0)} + \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} + \fill [fill=\circolor] \k + \c circle (0.14); +\foreach \k in {0,1,2,3,4,5} +{ + \fill [fill=\boxcolor] (6.85,-0.15+\k) rectangle (7.15,0.15+\k); + \fill [fill=\boxcolor] (7.85,-0.15+\k) rectangle (8.15,0.15+\k); +} +\node (rect1l) [ghostblock] at (7.5,2.5) {}; +\node (rect2l) [ghostblock] at (12.5,2.5) {}; +\draw (rect1l.north) edge[out=45,in=135,triangle 45-] (rect2l.north); + + + +\draw (10,0) grid (20,5); +\foreach \c in {(12,0), (13,0), (14,0), (15,0), (16,0), (17,0), (18,0)} + \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} + \fill [fill=\circolor] \k + \c circle (0.14); +\foreach \k in {0,1,2,3,4,5} +{ + \fill [fill=\boxcolor] (9.85,-0.15+\k) rectangle (10.15,0.15+\k); + \fill [fill=\boxcolor] (10.85,-0.15+\k) rectangle (11.15,0.15+\k); +} +\node (rect1r) [ghostblock] at (5.5,2.5) {}; +\node (rect2r) [ghostblock] at (10.5,2.5) {}; +\draw (rect1r.south) edge[out=-45,in=-135,-triangle 45] (rect2r.south); +\foreach \k in {0,1,2,3,4,5} +{ + \fill [fill=\boxcolor] (18.85,-0.15+\k) rectangle (19.15,0.15+\k); + \fill [fill=\boxcolor] (19.85,-0.15+\k) rectangle (20.15,0.15+\k); +} +\node (rect1r2) [ghostblock] at (19.5,2.5) {}; +\node (rect2r2) [ghostblock] at (24.5,2.5) {}; +\draw (rect1r2.north) edge[out=45,in=135,triangle 45-] (rect2r2.north); + + + +\draw (22,0) grid (30,5); +\foreach \c in {(24,0), (25,0), (26,0), (27,0), (28,0), (29,0), (30,0)} + \foreach \k in {(0,0), (0,1), (0,2), (0,3), (0,4), (0,5)} + \fill [fill=\circolor] \k + \c circle (0.14); +\foreach \k in {0,1,2,3,4,5} +{ + \fill [fill=\boxcolor] (21.85,-0.15+\k) rectangle (22.15,0.15+\k); + \fill [fill=\boxcolor] (22.85,-0.15+\k) rectangle (23.15,0.15+\k); +} +\node (rect1r3) [ghostblock] at (17.5,2.5) {}; +\node (rect2r3) [ghostblock] at (22.5,2.5) {}; +\draw (rect1r3.south) edge[out=-45,in=-135,-triangle 45] (rect2r3.south); + + + +\end{tikzpicture} +} +