home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / dino / dino_bot.1 / doc / doc.tex next >
LaTeX Document  |  1991-08-14  |  149.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
100% dexvert Texinfo Document (document/texInfo) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Croteam texture file (image/croteamTextureFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX auxiliary file default
98% file TeX document text default
97% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 5b 70 |\documen|tstyle[p|
|00000010| 72 6f 63 2c 31 32 70 74 | 5d 7b 61 72 74 69 63 6c |roc,12pt|]{articl|
|00000020| 65 7d 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |e}.\newc|ommand{\|
|00000030| 64 69 6e 6f 7d 7b 7b 5c | 73 68 72 69 6e 6b 20 44 |dino}{{\|shrink D|
|00000040| 49 4e 4f 7d 7d 0a 5c 6e | 65 77 63 6f 6d 6d 61 6e |INO}}.\n|ewcomman|
|00000050| 64 7b 5c 64 69 6e 6f 42 | 7d 7b 7b 5c 73 68 72 69 |d{\dinoB|}{{\shri|
|00000060| 6e 6b 20 5c 62 66 20 44 | 49 4e 4f 7d 7d 0a 5c 6e |nk \bf D|INO}}.\n|
|00000070| 65 77 63 6f 6d 6d 61 6e | 64 7b 5c 65 6e 76 65 78 |ewcomman|d{\envex|
|00000080| 70 7d 7b 7b 5c 73 68 72 | 69 6e 6b 20 45 4e 56 5c |p}{{\shr|ink ENV\|
|00000090| 5f 45 58 50 7d 7d 0a 5c | 6e 65 77 63 6f 6d 6d 61 |_EXP}}.\|newcomma|
|000000a0| 6e 64 7b 5c 65 62 6e 66 | 7d 7b 7b 5c 73 68 72 69 |nd{\ebnf|}{{\shri|
|000000b0| 6e 6b 20 45 42 4e 46 7d | 7d 0a 5c 6e 65 77 63 6f |nk EBNF}|}.\newco|
|000000c0| 6d 6d 61 6e 64 7b 5c 65 | 62 6e 66 42 7d 7b 7b 5c |mmand{\e|bnfB}{{\|
|000000d0| 73 68 72 69 6e 6b 20 5c | 62 66 20 45 42 4e 46 7d |shrink \|bf EBNF}|
|000000e0| 7d 0a 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}..\newc|ommand{\|
|000000f0| 73 65 63 74 69 6f 6e 58 | 7d 5b 31 5d 7b 5c 76 73 |sectionX|}[1]{\vs|
|00000100| 70 61 63 65 7b 2d 31 32 | 70 74 7d 5c 73 65 63 74 |pace{-12|pt}\sect|
|00000110| 69 6f 6e 7b 23 31 7d 7d | 0a 5c 6e 65 77 63 6f 6d |ion{#1}}|.\newcom|
|00000120| 6d 61 6e 64 7b 5c 73 75 | 62 73 65 63 74 69 6f 6e |mand{\su|bsection|
|00000130| 58 7d 5b 31 5d 7b 5c 76 | 73 70 61 63 65 7b 2d 31 |X}[1]{\v|space{-1|
|00000140| 32 70 74 7d 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |2pt}\sub|section{|
|00000150| 23 31 7d 7d 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |#1}}.\ne|wcommand|
|00000160| 7b 5c 73 75 62 73 75 62 | 73 65 63 74 69 6f 6e 58 |{\subsub|sectionX|
|00000170| 7d 5b 31 5d 7b 5c 76 73 | 70 61 63 65 7b 2d 31 32 |}[1]{\vs|pace{-12|
|00000180| 70 74 7d 5c 73 75 62 73 | 75 62 73 65 63 74 69 6f |pt}\subs|ubsectio|
|00000190| 6e 7b 23 31 7d 7d 0a 0a | 5c 6e 65 77 63 6f 6d 6d |n{#1}}..|\newcomm|
|000001a0| 61 6e 64 7b 5c 69 74 65 | 6d 58 7d 5b 31 5d 7b 5c |and{\ite|mX}[1]{\|
|000001b0| 76 73 70 61 63 65 7b 31 | 32 70 74 7d 5c 69 74 65 |vspace{1|2pt}\ite|
|000001c0| 6d 20 23 31 5c 76 73 70 | 61 63 65 7b 36 70 74 7d |m #1\vsp|ace{6pt}|
|000001d0| 5c 70 61 72 69 6e 64 65 | 6e 74 20 32 65 6d 7d 0a |\parinde|nt 2em}.|
|000001e0| 5c 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 69 74 65 |\newcomm|and{\ite|
|000001f0| 6d 58 66 69 72 73 74 7d | 5b 31 5d 7b 5c 69 74 65 |mXfirst}|[1]{\ite|
|00000200| 6d 20 23 31 5c 76 73 70 | 61 63 65 7b 36 70 74 7d |m #1\vsp|ace{6pt}|
|00000210| 5c 70 61 72 69 6e 64 65 | 6e 74 20 32 65 6d 7d 0a |\parinde|nt 2em}.|
|00000220| 5c 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 69 74 65 |\newcomm|and{\ite|
|00000230| 6d 58 62 6c 61 6e 6b 7d | 7b 5c 76 73 70 61 63 65 |mXblank}|{\vspace|
|00000240| 7b 31 32 70 74 7d 5c 69 | 74 65 6d 5b 5d 5c 76 73 |{12pt}\i|tem[]\vs|
|00000250| 70 61 63 65 7b 36 70 74 | 7d 5c 70 61 72 69 6e 64 |pace{6pt|}\parind|
|00000260| 65 6e 74 20 32 65 6d 7d | 0a 0a 5c 6e 65 77 63 6f |ent 2em}|..\newco|
|00000270| 6d 6d 61 6e 64 7b 5c 69 | 74 65 6d 59 7d 5b 31 5d |mmand{\i|temY}[1]|
|00000280| 7b 5c 69 74 65 6d 5b 5c | 74 74 20 23 31 5c 71 75 |{\item[\|tt #1\qu|
|00000290| 61 64 5d 7d 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |ad]}.\ne|wcommand|
|000002a0| 7b 5c 69 74 65 6d 5a 7d | 5b 31 5d 7b 5c 69 74 65 |{\itemZ}|[1]{\ite|
|000002b0| 6d 5b 5c 75 6e 64 65 72 | 6c 69 6e 65 7b 23 31 7d |m[\under|line{#1}|
|000002c0| 5d 7d 0a 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |]}..\new|command{|
|000002d0| 5c 73 70 61 63 65 72 7d | 7b 5c 76 72 75 6c 65 20 |\spacer}|{\vrule |
|000002e0| 68 65 69 67 68 74 38 2e | 30 70 74 20 64 65 70 74 |height8.|0pt dept|
|000002f0| 68 33 2e 30 70 74 20 77 | 69 64 74 68 30 70 74 7d |h3.0pt w|idth0pt}|
|00000300| 0a 5c 6e 65 77 63 6f 6d | 6d 61 6e 64 7b 5c 62 6f |.\newcom|mand{\bo|
|00000310| 78 58 7d 5b 31 5d 7b 7b | 5c 66 62 6f 78 73 65 70 |xX}[1]{{|\fboxsep|
|00000320| 20 32 70 74 5c 66 62 6f | 78 7b 5c 65 6d 20 5c 73 | 2pt\fbo|x{\em \s|
|00000330| 70 61 63 65 72 23 31 7d | 7d 5c 6b 65 72 6e 2b 31 |pacer#1}|}\kern+1|
|00000340| 70 74 7d 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |pt}.\new|command{|
|00000350| 5c 62 6f 78 59 7d 5b 31 | 5d 7b 5c 76 65 72 62 7c |\boxY}[1|]{\verb||
|00000360| 3c 7c 7b 5c 65 6d 20 23 | 31 7d 5c 76 65 72 62 7c |<|{\em #|1}\verb||
|00000370| 3e 7c 7d 0a 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |>|}..\ne|wcommand|
|00000380| 7b 5c 70 61 74 68 7d 7b | 5c 62 6f 78 59 7b 70 61 |{\path}{|\boxY{pa|
|00000390| 74 68 7d 7d 0a 5c 6e 65 | 77 63 6f 6d 6d 61 6e 64 |th}}.\ne|wcommand|
|000003a0| 7b 5c 66 69 6c 65 6e 61 | 6d 65 7d 7b 5c 62 6f 78 |{\filena|me}{\box|
|000003b0| 58 7b 66 69 6c 65 6e 61 | 6d 65 7d 7d 0a 5c 6e 65 |X{filena|me}}.\ne|
|000003c0| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 65 6e 76 7d 7b 5c |wcommand|{\env}{\|
|000003d0| 62 6f 78 58 7b 65 6e 76 | 7d 7d 0a 5c 6e 65 77 63 |boxX{env|}}.\newc|
|000003e0| 6f 6d 6d 61 6e 64 7b 5c | 6d 61 63 68 7d 7b 5c 62 |ommand{\|mach}{\b|
|000003f0| 6f 78 58 7b 6d 61 63 68 | 7d 7d 0a 0a 5c 6e 65 77 |oxX{mach|}}..\new|
|00000400| 63 6f 6d 6d 61 6e 64 7b | 5c 62 6f 6c 64 7d 5b 31 |command{|\bold}[1|
|00000410| 5d 7b 7b 5c 62 66 23 31 | 7d 7d 0a 5c 6e 65 77 65 |]{{\bf#1|}}.\newe|
|00000420| 6e 76 69 72 6f 6e 6d 65 | 6e 74 7b 69 74 65 6d 69 |nvironme|nt{itemi|
|00000430| 7a 65 58 7d 7b 5c 62 65 | 67 69 6e 7b 69 74 65 6d |zeX}{\be|gin{item|
|00000440| 69 7a 65 7d 5c 76 73 70 | 61 63 65 7b 2d 38 70 74 |ize}\vsp|ace{-8pt|
|00000450| 7d 7d 7b 5c 76 73 70 61 | 63 65 7b 2d 38 70 74 7d |}}{\vspa|ce{-8pt}|
|00000460| 5c 65 6e 64 7b 69 74 65 | 6d 69 7a 65 7d 7d 0a 0a |\end{ite|mize}}..|
|00000470| 5c 6e 65 77 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 7b |\newenvi|ronment{|
|00000480| 71 75 6f 74 65 58 7d 7b | 5c 6c 69 73 74 7b 7d 7b |quoteX}{|\list{}{|
|00000490| 5c 6c 69 73 74 70 61 72 | 69 6e 64 65 6e 74 20 30 |\listpar|indent 0|
|000004a0| 65 6d 0a 20 5c 69 74 65 | 6d 69 6e 64 65 6e 74 5c |em. \ite|mindent\|
|000004b0| 6c 69 73 74 70 61 72 69 | 6e 64 65 6e 74 0a 20 5c |listpari|ndent. \|
|000004c0| 6c 65 66 74 6d 61 72 67 | 69 6e 20 30 65 6d 20 5c |leftmarg|in 0em \|
|000004d0| 72 69 67 68 74 6d 61 72 | 67 69 6e 20 30 70 74 20 |rightmar|gin 0pt |
|000004e0| 5c 70 61 72 73 65 70 20 | 30 70 74 20 70 6c 75 73 |\parsep |0pt plus|
|000004f0| 20 31 70 74 7d 5c 69 74 | 65 6d 5b 5d 7d 7b 5c 65 | 1pt}\it|em[]}{\e|
|00000500| 6e 64 6c 69 73 74 7d 0a | 0a 5c 6e 65 77 65 6e 76 |ndlist}.|.\newenv|
|00000510| 69 72 6f 6e 6d 65 6e 74 | 7b 71 75 6f 74 65 58 58 |ironment|{quoteXX|
|00000520| 7d 7b 5c 6c 69 73 74 7b | 7d 7b 5c 6c 69 73 74 70 |}{\list{|}{\listp|
|00000530| 61 72 69 6e 64 65 6e 74 | 20 30 65 6d 0a 20 5c 69 |arindent| 0em. \i|
|00000540| 74 65 6d 69 6e 64 65 6e | 74 5c 6c 69 73 74 70 61 |teminden|t\listpa|
|00000550| 72 69 6e 64 65 6e 74 20 | 5c 74 6f 70 73 65 70 20 |rindent |\topsep |
|00000560| 30 70 74 20 5c 70 61 72 | 74 6f 70 73 65 70 20 30 |0pt \par|topsep 0|
|00000570| 70 74 0a 20 5c 69 74 65 | 6d 73 65 70 20 30 70 74 |pt. \ite|msep 0pt|
|00000580| 0a 20 5c 6c 65 66 74 6d | 61 72 67 69 6e 20 31 65 |. \leftm|argin 1e|
|00000590| 6d 20 5c 72 69 67 68 74 | 6d 61 72 67 69 6e 20 30 |m \right|margin 0|
|000005a0| 65 6d 20 5c 70 61 72 73 | 65 70 20 30 70 74 7d 5c |em \pars|ep 0pt}\|
|000005b0| 69 74 65 6d 5b 5d 7d 7b | 5c 65 6e 64 6c 69 73 74 |item[]}{|\endlist|
|000005c0| 7d 0a 0a 5c 64 65 66 5c | 6c 65 61 64 65 72 66 69 |}..\def\|leaderfi|
|000005d0| 6c 6c 7b 5c 6c 65 61 64 | 65 72 73 5c 68 62 6f 78 |ll{\lead|ers\hbox|
|000005e0| 20 74 6f 20 31 65 6d 7b | 5c 68 73 73 2e 5c 68 73 | to 1em{|\hss.\hs|
|000005f0| 73 7d 5c 68 66 69 6c 6c | 7d 0a 5c 6e 65 77 65 6e |s}\hfill|}.\newen|
|00000600| 76 69 72 6f 6e 6d 65 6e | 74 7b 65 6e 74 72 79 7d |vironmen|t{entry}|
|00000610| 5b 31 5d 7b 5c 62 65 67 | 69 6e 7b 71 75 6f 74 65 |[1]{\beg|in{quote|
|00000620| 58 58 7d 23 31 7d 7b 5c | 65 6e 64 7b 71 75 6f 74 |XX}#1}{\|end{quot|
|00000630| 65 58 58 7d 7d 0a 0a 5c | 6e 65 77 63 6f 6d 6d 61 |eXX}}..\|newcomma|
|00000640| 6e 64 7b 5c 65 6e 74 72 | 79 58 7d 5b 31 5d 7b 5c |nd{\entr|yX}[1]{\|
|00000650| 62 65 67 69 6e 7b 71 75 | 6f 74 65 58 58 7d 23 31 |begin{qu|oteXX}#1|
|00000660| 5c 65 6e 64 7b 71 75 6f | 74 65 58 58 7d 7d 0a 0a |\end{quo|teXX}}..|
|00000670| 25 20 54 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |% The fo|llowing |
|00000680| 63 6f 6d 6d 61 6e 64 73 | 20 61 72 65 20 64 65 73 |commands| are des|
|00000690| 69 67 6e 65 64 20 74 6f | 20 73 65 74 20 75 70 20 |igned to| set up |
|000006a0| 74 6f 20 70 72 6f 64 75 | 63 65 20 61 6e 20 69 6e |to produ|ce an in|
|000006b0| 64 65 78 0a 0a 5c 6f 70 | 65 6e 6f 75 74 31 35 3d |dex..\op|enout15=|
|000006c0| 5c 6a 6f 62 6e 61 6d 65 | 2e 69 6e 64 65 78 0a 5c |\jobname|.index.\|
|000006d0| 6e 65 77 63 6f 6d 6d 61 | 6e 64 7b 5c 6f 75 74 7d |newcomma|nd{\out}|
|000006e0| 5b 31 5d 7b 5c 77 72 69 | 74 65 31 35 7b 23 31 7d |[1]{\wri|te15{#1}|
|000006f0| 7d 0a 5c 64 65 66 5c 69 | 64 78 7b 5c 73 74 72 69 |}.\def\i|dx{\stri|
|00000700| 6e 67 5c 69 64 78 7d 0a | 5c 64 65 66 5c 69 78 73 |ng\idx}.|\def\ixs|
|00000710| 7b 5c 73 74 72 69 6e 67 | 5c 71 75 61 64 7d 0a 5c |{\string|\quad}.\|
|00000720| 64 65 66 5c 69 78 7b 5c | 73 74 72 69 6e 67 7e 7d |def\ix{\|string~}|
|00000730| 0a 5c 64 65 66 5c 70 70 | 61 72 7b 5c 73 74 72 69 |.\def\pp|ar{\stri|
|00000740| 6e 67 5c 70 61 72 7d 0a | 0a 5c 6e 65 77 63 6f 6d |ng\par}.|.\newcom|
|00000750| 6d 61 6e 64 7b 5c 69 6e | 64 65 78 41 7d 5b 31 5d |mand{\in|dexA}[1]|
|00000760| 7b 5c 6f 75 74 7b 5c 69 | 64 78 7b 5c 69 78 23 31 |{\out{\i|dx{\ix#1|
|00000770| 5c 69 78 5c 69 78 5c 69 | 78 30 5c 69 78 7d 7b 5c |\ix\ix\i|x0\ix}{\|
|00000780| 70 70 61 72 5c 73 70 61 | 63 65 23 31 7d 7d 5c 6f |ppar\spa|ce#1}}\o|
|00000790| 75 74 7b 5c 69 64 78 7b | 5c 69 78 23 31 5c 69 78 |ut{\idx{|\ix#1\ix|
|000007a0| 5c 69 78 5c 69 78 5c 74 | 68 65 70 61 67 65 5c 69 |\ix\ix\t|hepage\i|
|000007b0| 78 7d 7b 2c 5c 69 78 5c | 74 68 65 70 61 67 65 7d |x}{,\ix\|thepage}|
|000007c0| 7d 7d 0a 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |}}..\new|command{|
|000007d0| 5c 69 6e 64 65 78 42 7d | 5b 32 5d 7b 5c 6f 75 74 |\indexB}|[2]{\out|
|000007e0| 7b 5c 69 64 78 7b 5c 69 | 78 23 31 5c 69 78 5c 69 |{\idx{\i|x#1\ix\i|
|000007f0| 78 5c 69 78 30 5c 69 78 | 7d 7b 5c 70 70 61 72 5c |x\ix0\ix|}{\ppar\|
|00000800| 73 70 61 63 65 23 31 7d | 7d 5c 6f 75 74 7b 5c 69 |space#1}|}\out{\i|
|00000810| 64 78 7b 5c 69 78 23 31 | 5c 69 78 23 32 5c 69 78 |dx{\ix#1|\ix#2\ix|
|00000820| 5c 69 78 30 5c 69 78 7d | 7b 5c 70 70 61 72 5c 69 |\ix0\ix}|{\ppar\i|
|00000830| 78 73 5c 73 70 61 63 65 | 23 32 7d 7d 5c 6f 75 74 |xs\space|#2}}\out|
|00000840| 7b 5c 69 64 78 7b 5c 69 | 78 23 31 5c 69 78 23 32 |{\idx{\i|x#1\ix#2|
|00000850| 5c 69 78 5c 69 78 5c 74 | 68 65 70 61 67 65 5c 69 |\ix\ix\t|hepage\i|
|00000860| 78 7d 7b 2c 5c 69 78 5c | 74 68 65 70 61 67 65 7d |x}{,\ix\|thepage}|
|00000870| 7d 7d 0a 0a 5c 6e 65 77 | 63 6f 6d 6d 61 6e 64 7b |}}..\new|command{|
|00000880| 5c 69 6e 64 65 78 43 7d | 5b 33 5d 7b 5c 6f 75 74 |\indexC}|[3]{\out|
|00000890| 7b 5c 69 64 78 7b 5c 69 | 78 23 31 5c 69 78 5c 69 |{\idx{\i|x#1\ix\i|
|000008a0| 78 5c 69 78 30 5c 69 78 | 7d 7b 5c 70 70 61 72 5c |x\ix0\ix|}{\ppar\|
|000008b0| 73 70 61 63 65 23 31 7d | 7d 5c 6f 75 74 7b 5c 69 |space#1}|}\out{\i|
|000008c0| 64 78 7b 5c 69 78 23 31 | 5c 69 78 23 32 5c 69 78 |dx{\ix#1|\ix#2\ix|
|000008d0| 5c 69 78 30 5c 69 78 7d | 7b 5c 70 70 61 72 5c 69 |\ix0\ix}|{\ppar\i|
|000008e0| 78 73 5c 73 70 61 63 65 | 23 32 7d 7d 5c 6f 75 74 |xs\space|#2}}\out|
|000008f0| 7b 5c 69 64 78 7b 5c 69 | 78 23 31 5c 69 78 23 32 |{\idx{\i|x#1\ix#2|
|00000900| 5c 69 78 23 33 5c 69 78 | 30 5c 69 78 7d 7b 5c 70 |\ix#3\ix|0\ix}{\p|
|00000910| 70 61 72 5c 69 78 73 5c | 69 78 73 5c 73 70 61 63 |par\ixs\|ixs\spac|
|00000920| 65 23 33 7d 7d 5c 6f 75 | 74 7b 5c 69 64 78 7b 5c |e#3}}\ou|t{\idx{\|
|00000930| 69 78 23 31 5c 69 78 23 | 32 5c 69 78 23 33 5c 69 |ix#1\ix#|2\ix#3\i|
|00000940| 78 5c 74 68 65 70 61 67 | 65 5c 69 78 7d 7b 2c 5c |x\thepag|e\ix}{,\|
|00000950| 69 78 5c 74 68 65 70 61 | 67 65 7d 7d 7d 0a 0a 5c |ix\thepa|ge}}}..\|
|00000960| 62 65 67 69 6e 7b 64 6f | 63 75 6d 65 6e 74 7d 0a |begin{do|cument}.|
|00000970| 0a 25 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |.% The f|ollowing|
|00000980| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 2c 20 65 74 | definit|ions, et|
|00000990| 63 2e 2c 20 73 65 74 20 | 75 70 20 74 68 65 20 6c |c., set |up the l|
|000009a0| 69 73 74 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 2c |isting f|unction,|
|000009b0| 20 77 68 69 63 68 20 69 | 73 0a 25 20 64 65 73 69 | which i|s.% desi|
|000009c0| 67 6e 65 64 20 74 6f 20 | 69 6d 70 6f 72 74 20 61 |gned to |import a|
|000009d0| 6e 20 65 78 74 65 72 6e | 61 6c 20 66 69 6c 65 20 |n extern|al file |
|000009e0| 69 6e 20 76 65 72 62 61 | 74 69 6d 20 66 61 73 68 |in verba|tim fash|
|000009f0| 69 6f 6e 2e 0a 0a 5c 64 | 65 66 5c 75 6e 63 61 74 |ion...\d|ef\uncat|
|00000a00| 63 6f 64 65 73 70 65 63 | 69 61 6c 73 7b 5c 64 65 |codespec|ials{\de|
|00000a10| 66 5c 64 6f 23 23 31 7b | 5c 63 61 74 63 6f 64 65 |f\do##1{|\catcode|
|00000a20| 60 23 23 31 3d 31 32 20 | 7d 5c 64 6f 73 70 65 63 |`##1=12 |}\dospec|
|00000a30| 69 61 6c 73 7d 0a 5c 64 | 65 66 5c 73 65 74 75 70 |ials}.\d|ef\setup|
|00000a40| 76 65 72 62 61 74 69 6d | 7b 5c 74 74 0a 09 09 20 |verbatim|{\tt... |
|00000a50| 20 20 5c 64 65 66 5c 70 | 61 72 7b 5c 6c 65 61 76 | \def\p|ar{\leav|
|00000a60| 65 6d 6f 64 65 5c 65 6e | 64 67 72 61 66 5c 6d 62 |emode\en|dgraf\mb|
|00000a70| 6f 78 7b 7d 7d 20 5c 63 | 61 74 63 6f 64 65 60 5c |ox{}} \c|atcode`\|
|00000a80| 60 3d 5c 61 63 74 69 76 | 65 0a 09 09 20 20 20 5c |`=\activ|e... \|
|00000a90| 6f 62 65 79 6c 69 6e 65 | 73 20 5c 75 6e 63 61 74 |obeyline|s \uncat|
|00000aa0| 63 6f 64 65 73 70 65 63 | 69 61 6c 73 20 5c 6f 62 |codespec|ials \ob|
|00000ab0| 65 79 73 70 61 63 65 73 | 7d 0a 5c 64 65 66 5c 6c |eyspaces|}.\def\l|
|00000ac0| 69 73 74 69 6e 67 23 31 | 7b 7b 5c 70 61 72 73 6b |isting#1|{{\parsk|
|00000ad0| 69 70 20 30 70 74 20 5c | 70 61 72 69 6e 64 65 6e |ip 0pt \|parinden|
|00000ae0| 74 20 30 70 74 20 5c 62 | 65 67 69 6e 67 72 6f 75 |t 0pt \b|egingrou|
|00000af0| 70 5c 73 65 74 75 70 76 | 65 72 62 61 74 69 6d 5c |p\setupv|erbatim\|
|00000b00| 69 6e 70 75 74 23 31 20 | 5c 65 6e 64 67 72 6f 75 |input#1 |\endgrou|
|00000b10| 70 7d 7d 0a 7b 5c 63 61 | 74 63 6f 64 65 60 5c 60 |p}}.{\ca|tcode`\`|
|00000b20| 3d 5c 61 63 74 69 76 65 | 20 5c 67 64 65 66 60 7b |=\active| \gdef`{|
|00000b30| 5c 72 65 6c 61 78 5c 6c | 71 7d 7d 0a 0a 5c 6e 65 |\relax\l|q}}..\ne|
|00000b40| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 64 6f 65 78 7d 5b |wcommand|{\doex}[|
|00000b50| 32 5d 7b 7b 5c 76 73 70 | 61 63 65 7b 30 2e 33 37 |2]{{\vsp|ace{0.37|
|00000b60| 35 69 6e 7d 20 5c 6e 6f | 69 6e 64 65 6e 74 20 5c |5in} \no|indent \|
|00000b70| 62 6f 6c 64 7b 45 78 61 | 6d 70 6c 65 20 23 31 3a |bold{Exa|mple #1:|
|00000b80| 20 23 32 7d 20 5c 70 61 | 72 20 5c 76 73 70 61 63 | #2} \pa|r \vspac|
|00000b90| 65 7b 30 2e 33 37 35 69 | 6e 7d 20 5c 68 73 69 7a |e{0.375i|n} \hsiz|
|00000ba0| 65 20 3d 20 37 69 6e 20 | 5c 73 6d 61 6c 6c 20 5c |e = 7in |\small \|
|00000bb0| 6c 69 73 74 69 6e 67 7b | 2e 2e 2f 23 32 7d 20 5c |listing{|../#2} \|
|00000bc0| 6e 65 77 70 61 67 65 7d | 7d 0a 0a 5c 74 61 62 6c |newpage}|}..\tabl|
|00000bd0| 65 6f 66 63 6f 6e 74 65 | 6e 74 73 0a 0a 5c 6e 65 |eofconte|nts..\ne|
|00000be0| 77 70 61 67 65 0a 0a 5c | 73 65 63 74 69 6f 6e 58 |wpage..\|sectionX|
|00000bf0| 7b 49 6e 74 72 6f 64 75 | 63 74 69 6f 6e 7d 0a 0a |{Introdu|ction}..|
|00000c00| 5c 64 69 6e 6f 5c 69 6e | 64 65 78 41 7b 44 49 4e |\dino\in|dexA{DIN|
|00000c10| 4f 7d 20 28 44 49 73 74 | 72 69 62 75 74 65 64 20 |O} (DIst|ributed |
|00000c20| 4e 75 6d 65 72 69 63 61 | 6c 6c 79 20 4f 72 69 65 |Numerica|lly Orie|
|00000c30| 6e 74 65 64 20 6c 61 6e | 67 75 61 67 65 29 0a 69 |nted lan|guage).i|
|00000c40| 73 20 61 20 6c 61 6e 67 | 75 61 67 65 20 66 6f 72 |s a lang|uage for|
|00000c50| 20 77 72 69 74 69 6e 67 | 20 70 61 72 61 6c 6c 65 | writing| paralle|
|00000c60| 6c 20 70 72 6f 67 72 61 | 6d 73 0a 66 6f 72 20 64 |l progra|ms.for d|
|00000c70| 69 73 74 72 69 62 75 74 | 65 64 20 6d 65 6d 6f 72 |istribut|ed memor|
|00000c80| 79 20 28 7b 5c 73 6d 61 | 6c 6c 20 4d 49 4d 44 7d |y ({\sma|ll MIMD}|
|00000c90| 29 5c 69 6e 64 65 78 41 | 7b 4d 49 4d 44 7d 20 6d |)\indexA|{MIMD} m|
|00000ca0| 75 6c 74 69 70 72 6f 63 | 65 73 73 6f 72 73 2e 0a |ultiproc|essors..|
|00000cb0| 49 74 20 69 73 20 6f 72 | 69 65 6e 74 65 64 20 74 |It is or|iented t|
|00000cc0| 6f 77 61 72 64 73 20 65 | 78 70 72 65 73 73 69 6e |owards e|xpressin|
|00000cd0| 67 20 64 61 74 61 20 70 | 61 72 61 6c 6c 65 6c 20 |g data p|arallel |
|00000ce0| 61 6c 67 6f 72 69 74 68 | 6d 73 2c 0a 77 68 69 63 |algorith|ms,.whic|
|00000cf0| 68 20 70 72 65 64 6f 6d | 69 6e 61 74 65 20 69 6e |h predom|inate in|
|00000d00| 20 70 61 72 61 6c 6c 65 | 6c 20 6e 75 6d 65 72 69 | paralle|l numeri|
|00000d10| 63 61 6c 20 63 6f 6d 70 | 75 74 61 74 69 6f 6e 2e |cal comp|utation.|
|00000d20| 0a 49 74 73 20 67 6f 61 | 6c 20 69 73 20 74 6f 20 |.Its goa|l is to |
|00000d30| 6d 61 6b 65 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |make pro|gramming|
|00000d40| 20 73 75 63 68 0a 61 6c | 67 6f 72 69 74 68 6d 73 | such.al|gorithms|
|00000d50| 20 6e 61 74 75 72 61 6c | 20 61 6e 64 20 65 61 73 | natural| and eas|
|00000d60| 79 2c 20 77 69 74 68 6f | 75 74 20 68 69 6e 64 65 |y, witho|ut hinde|
|00000d70| 72 69 6e 67 20 74 68 65 | 69 72 20 0a 72 75 6e 2d |ring the|ir .run-|
|00000d80| 74 69 6d 65 20 65 66 66 | 69 63 69 65 6e 63 79 2e |time eff|iciency.|
|00000d90| 0a 5c 64 69 6e 6f 5c 20 | 63 6f 6e 73 69 73 74 73 |.\dino\ |consists|
|00000da0| 20 6f 66 20 43 5c 69 6e | 64 65 78 41 7b 43 7d 20 | of C\in|dexA{C} |
|00000db0| 61 75 67 6d 65 6e 74 65 | 64 20 62 79 20 73 65 76 |augmente|d by sev|
|00000dc0| 65 72 61 6c 20 68 69 67 | 68 20 6c 65 76 65 6c 0a |eral hig|h level.|
|00000dd0| 70 61 72 61 6c 6c 65 6c | 20 63 6f 6e 73 74 72 75 |parallel| constru|
|00000de0| 63 74 73 20 74 68 61 74 | 20 61 72 65 20 69 6e 74 |cts that| are int|
|00000df0| 65 6e 64 65 64 20 74 6f | 20 61 6c 6c 6f 77 20 74 |ended to| allow t|
|00000e00| 68 65 20 70 61 72 61 6c | 6c 65 6c 20 70 72 6f 67 |he paral|lel prog|
|00000e10| 72 61 6d 20 74 6f 0a 63 | 6f 6e 66 6f 72 6d 20 74 |ram to.c|onform t|
|00000e20| 6f 20 74 68 65 20 77 61 | 79 20 61 6e 20 61 6c 67 |o the wa|y an alg|
|00000e30| 6f 72 69 74 68 6d 0a 64 | 65 73 69 67 6e 65 72 20 |orithm.d|esigner |
|00000e40| 6e 61 74 75 72 61 6c 6c | 79 20 74 68 69 6e 6b 73 |naturall|y thinks|
|00000e50| 20 61 62 6f 75 74 20 70 | 61 72 61 6c 6c 65 6c 20 | about p|arallel |
|00000e60| 61 6c 67 6f 72 69 74 68 | 6d 73 2e 0a 54 68 65 20 |algorith|ms..The |
|00000e70| 6b 65 79 20 63 6f 6e 73 | 74 72 75 63 74 73 20 61 |key cons|tructs a|
|00000e80| 72 65 20 74 68 65 20 61 | 62 69 6c 69 74 79 20 74 |re the a|bility t|
|00000e90| 6f 20 64 65 63 6c 61 72 | 65 20 61 20 76 69 72 74 |o declar|e a virt|
|00000ea0| 75 61 6c 0a 70 61 72 61 | 6c 6c 65 6c 20 63 6f 6d |ual.para|llel com|
|00000eb0| 70 75 74 65 72 5c 69 6e | 64 65 78 41 7b 76 69 72 |puter\in|dexA{vir|
|00000ec0| 74 75 61 6c 20 70 72 6f | 63 65 73 73 6f 72 73 7d |tual pro|cessors}|
|00000ed0| 0a 74 68 61 74 20 69 73 | 20 62 65 73 74 20 73 75 |.that is| best su|
|00000ee0| 69 74 65 64 20 74 6f 20 | 74 68 65 20 70 61 72 61 |ited to |the para|
|00000ef0| 6c 6c 65 6c 20 63 6f 6d | 70 75 74 61 74 69 6f 6e |llel com|putation|
|00000f00| 2c 0a 74 68 65 20 61 62 | 69 6c 69 74 79 20 74 6f |,.the ab|ility to|
|00000f10| 20 6d 61 70 20 64 69 73 | 74 72 69 62 75 74 65 64 | map dis|tributed|
|00000f20| 20 64 61 74 61 0a 73 74 | 72 75 63 74 75 72 65 73 | data.st|ructures|
|00000f30| 5c 69 6e 64 65 78 41 7b | 64 69 73 74 72 69 62 75 |\indexA{|distribu|
|00000f40| 74 65 64 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |ted data| structu|
|00000f50| 72 65 73 7d 20 6f 6e 74 | 6f 20 74 68 69 73 20 76 |res} ont|o this v|
|00000f60| 69 72 74 75 61 6c 20 6d | 61 63 68 69 6e 65 2c 0a |irtual m|achine,.|
|00000f70| 61 6e 64 20 74 68 65 20 | 61 62 69 6c 69 74 79 20 |and the |ability |
|00000f80| 74 6f 20 64 65 66 69 6e | 65 20 70 72 6f 63 65 64 |to defin|e proced|
|00000f90| 75 72 65 73 20 74 68 61 | 74 20 77 69 6c 6c 20 72 |ures tha|t will r|
|00000fa0| 75 6e 20 6f 6e 20 65 61 | 63 68 0a 70 72 6f 63 65 |un on ea|ch.proce|
|00000fb0| 73 73 6f 72 20 6f 66 20 | 74 68 65 20 76 69 72 74 |ssor of |the virt|
|00000fc0| 75 61 6c 20 6d 61 63 68 | 69 6e 65 20 63 6f 6e 63 |ual mach|ine conc|
|00000fd0| 75 72 72 65 6e 74 6c 79 | 2e 0a 4d 6f 73 74 20 6f |urrently|..Most o|
|00000fe0| 66 20 74 68 65 20 72 65 | 6d 61 69 6e 69 6e 67 20 |f the re|maining |
|00000ff0| 64 65 74 61 69 6c 73 20 | 6f 66 20 64 69 73 74 72 |details |of distr|
|00001000| 69 62 75 74 65 64 20 70 | 61 72 61 6c 6c 65 6c 20 |ibuted p|arallel |
|00001010| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 2c 0a 69 6e 63 |computat|ion,.inc|
|00001020| 6c 75 64 69 6e 67 20 70 | 72 6f 63 65 73 73 20 6d |luding p|rocess m|
|00001030| 61 6e 61 67 65 6d 65 6e | 74 20 61 6e 64 20 69 6e |anagemen|t and in|
|00001040| 74 65 72 70 72 6f 63 65 | 73 73 6f 72 20 63 6f 6d |terproce|ssor com|
|00001050| 6d 75 6e 69 63 61 74 69 | 6f 6e 2c 0a 72 65 73 75 |municati|on,.resu|
|00001060| 6c 74 20 69 6d 70 6c 69 | 63 69 74 6c 79 20 66 72 |lt impli|citly fr|
|00001070| 6f 6d 20 74 68 65 73 65 | 20 68 69 67 68 20 6c 65 |om these| high le|
|00001080| 76 65 6c 20 63 6f 6e 73 | 74 72 75 63 74 73 20 61 |vel cons|tructs a|
|00001090| 6e 64 20 61 72 65 0a 68 | 61 6e 64 6c 65 64 20 61 |nd are.h|andled a|
|000010a0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 62 79 20 |utomatic|ally by |
|000010b0| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 2e 0a 0a 53 |the comp|iler...S|
|000010c0| 65 63 74 69 6f 6e 7e 5c | 72 65 66 7b 62 61 73 69 |ection~\|ref{basi|
|000010d0| 63 20 64 69 6e 6f 7d 20 | 63 6f 6e 74 61 69 6e 73 |c dino} |contains|
|000010e0| 20 61 20 73 68 6f 72 74 | 20 64 65 73 63 72 69 70 | a short| descrip|
|000010f0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 5c 64 69 6e |tion of |the \din|
|00001100| 6f 5c 20 6c 61 6e 67 75 | 61 67 65 2c 0a 66 6f 6c |o\ langu|age,.fol|
|00001110| 6c 6f 77 65 64 20 62 79 | 20 61 20 6d 65 74 68 6f |lowed by| a metho|
|00001120| 64 6f 6c 6f 67 79 20 66 | 6f 72 20 77 72 69 74 69 |dology f|or writi|
|00001130| 6e 67 20 5c 64 69 6e 6f | 5c 20 70 72 6f 67 72 61 |ng \dino|\ progra|
|00001140| 6d 73 2c 20 61 6e 64 20 | 74 77 6f 20 65 78 61 6d |ms, and |two exam|
|00001150| 70 6c 65 73 2e 0a 54 68 | 65 20 64 65 66 69 6e 69 |ples..Th|e defini|
|00001160| 74 69 6f 6e 73 20 6f 66 | 20 61 6c 6c 20 5c 64 69 |tions of| all \di|
|00001170| 6e 6f 5c 20 63 6f 6e 73 | 74 72 75 63 74 73 20 61 |no\ cons|tructs a|
|00001180| 72 65 20 69 6e 0a 53 65 | 63 74 69 6f 6e 7e 5c 72 |re in.Se|ction~\r|
|00001190| 65 66 7b 6c 61 6e 67 75 | 61 67 65 20 72 65 66 65 |ef{langu|age refe|
|000011a0| 72 65 6e 63 65 7d 2e 0a | 53 65 63 74 69 6f 6e 7e |rence}..|Section~|
|000011b0| 5c 72 65 66 7b 65 78 61 | 6d 70 6c 65 73 7d 20 68 |\ref{exa|mples} h|
|000011c0| 61 73 20 61 20 6e 75 6d | 62 65 72 20 6f 66 20 65 |as a num|ber of e|
|000011d0| 78 61 6d 70 6c 65 73 2c | 20 77 69 74 68 20 61 20 |xamples,| with a |
|000011e0| 66 65 61 74 75 72 65 73 | 20 69 6e 64 65 78 2e 0a |features| index..|
|000011f0| 53 65 63 74 69 6f 6e 7e | 5c 72 65 66 7b 75 73 69 |Section~|\ref{usi|
|00001200| 6e 67 20 64 69 6e 6f 7d | 20 63 6f 6e 74 61 69 6e |ng dino}| contain|
|00001210| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |s inform|ation ab|
|00001220| 6f 75 74 20 68 6f 77 20 | 74 6f 20 73 65 74 75 70 |out how |to setup|
|00001230| 20 5c 64 69 6e 6f 5c 2c | 0a 61 6e 64 20 68 6f 77 | \dino\,|.and how|
|00001240| 20 74 6f 20 75 73 65 20 | 74 68 65 20 63 6f 6d 70 | to use |the comp|
|00001250| 69 6c 65 72 20 69 74 73 | 65 6c 66 2e 0a 53 65 63 |iler its|elf..Sec|
|00001260| 74 69 6f 6e 7e 5c 72 65 | 66 7b 68 69 6e 74 73 7d |tion~\re|f{hints}|
|00001270| 20 63 6f 6e 74 61 69 6e | 73 20 61 20 6c 69 73 74 | contain|s a list|
|00001280| 20 6f 66 20 6b 6e 6f 77 | 6e 20 63 6f 6d 70 69 6c | of know|n compil|
|00001290| 65 72 20 62 75 67 73 2c | 0a 70 6c 75 73 20 68 69 |er bugs,|.plus hi|
|000012a0| 6e 74 73 20 6f 6e 20 72 | 75 6e 2d 74 69 6d 65 20 |nts on r|un-time |
|000012b0| 65 72 72 6f 72 73 20 61 | 6e 64 20 70 65 72 66 6f |errors a|nd perfo|
|000012c0| 72 6d 61 6e 63 65 2e 0a | 49 6e 66 6f 72 6d 61 74 |rmance..|Informat|
|000012d0| 69 6f 6e 20 6f 6e 20 68 | 6f 77 20 74 6f 20 69 6e |ion on h|ow to in|
|000012e0| 73 74 61 6c 6c 20 5c 64 | 69 6e 6f 5c 20 69 73 20 |stall \d|ino\ is |
|000012f0| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 0a 53 65 63 |containe|d in.Sec|
|00001300| 74 69 6f 6e 7e 5c 72 65 | 66 7b 69 6e 73 74 61 6c |tion~\re|f{instal|
|00001310| 6c 61 74 69 6f 6e 7d 2e | 0a 46 69 6e 61 6c 6c 79 |lation}.|.Finally|
|00001320| 2c 20 41 70 70 65 6e 64 | 69 78 7e 5c 72 65 66 7b |, Append|ix~\ref{|
|00001330| 65 62 6e 66 7d 20 63 6f | 6e 74 61 69 6e 73 20 61 |ebnf} co|ntains a|
|00001340| 20 63 6f 6d 70 6c 65 74 | 65 20 5c 65 62 6e 66 5c | complet|e \ebnf\|
|00001350| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 0a 66 | specifi|cation.f|
|00001360| 6f 72 20 74 68 65 20 5c | 64 69 6e 6f 5c 20 65 78 |or the \|dino\ ex|
|00001370| 74 65 6e 73 69 6f 6e 73 | 20 74 6f 20 74 68 65 20 |tensions| to the |
|00001380| 43 20 6c 61 6e 67 75 61 | 67 65 2e 0a 0a 5c 76 73 |C langua|ge...\vs|
|00001390| 70 61 63 65 7b 30 2e 35 | 69 6e 7d 0a 7b 5c 4c 61 |pace{0.5|in}.{\La|
|000013a0| 72 67 65 0a 54 68 69 73 | 20 6d 61 6e 75 61 6c 20 |rge.This| manual |
|000013b0| 69 73 20 70 72 6f 62 61 | 62 6c 79 20 75 6e 6c 69 |is proba|bly unli|
|000013c0| 6b 65 20 61 6e 79 20 6d | 61 6e 75 61 6c 20 79 6f |ke any m|anual yo|
|000013d0| 75 20 68 61 76 65 20 75 | 73 65 64 20 62 65 66 6f |u have u|sed befo|
|000013e0| 72 65 2e 20 20 49 6e 20 | 70 61 72 74 69 63 75 6c |re. In |particul|
|000013f0| 61 72 2c 0a 53 65 63 74 | 69 6f 6e 7e 5c 72 65 66 |ar,.Sect|ion~\ref|
|00001400| 7b 62 61 73 69 63 20 64 | 69 6e 6f 7d 20 67 69 76 |{basic d|ino} giv|
|00001410| 65 73 20 61 20 63 6f 6e | 63 65 70 74 75 61 6c 20 |es a con|ceptual |
|00001420| 6f 76 65 72 76 69 65 77 | 20 6f 66 20 68 6f 77 20 |overview| of how |
|00001430| 61 20 70 72 6f 67 72 61 | 6d 6d 65 72 20 73 68 6f |a progra|mmer sho|
|00001440| 75 6c 64 0a 61 70 70 72 | 6f 61 63 68 20 77 72 69 |uld.appr|oach wri|
|00001450| 74 74 69 6e 67 20 5c 64 | 69 6e 6f 5c 20 70 72 6f |tting \d|ino\ pro|
|00001460| 67 72 61 6d 73 2c 20 61 | 6c 6f 6e 67 20 77 69 74 |grams, a|long wit|
|00001470| 68 20 74 77 6f 20 65 78 | 61 6d 70 6c 65 73 20 6f |h two ex|amples o|
|00001480| 66 20 68 6f 77 20 74 6f | 20 75 73 65 20 74 68 69 |f how to| use thi|
|00001490| 73 0a 61 70 70 72 6f 61 | 63 68 2e 20 20 53 65 63 |s.approa|ch. Sec|
|000014a0| 74 69 6f 6e 7e 5c 72 65 | 66 7b 65 78 61 6d 70 6c |tion~\re|f{exampl|
|000014b0| 65 73 7d 20 67 69 76 65 | 73 20 61 20 6c 61 72 67 |es} give|s a larg|
|000014c0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 65 78 61 6d |e number| of exam|
|000014d0| 70 6c 65 20 70 72 6f 67 | 72 61 6d 73 0a 74 68 61 |ple prog|rams.tha|
|000014e0| 74 20 69 6c 6c 75 73 74 | 72 61 74 65 20 76 61 72 |t illust|rate var|
|000014f0| 69 6f 75 73 20 5c 64 69 | 6e 6f 5c 20 66 65 61 74 |ious \di|no\ feat|
|00001500| 75 72 65 73 2e 0a 57 65 | 20 73 75 67 67 65 73 74 |ures..We| suggest|
|00001510| 20 74 68 61 74 20 6e 65 | 77 20 75 73 65 72 73 20 | that ne|w users |
|00001520| 73 68 6f 75 6c 64 20 70 | 72 6f 62 61 62 6c 79 20 |should p|robably |
|00001530| 72 65 61 64 20 53 65 63 | 74 69 6f 6e 73 7e 5c 72 |read Sec|tions~\r|
|00001540| 65 66 7b 62 61 73 69 63 | 20 64 69 6e 6f 7d 20 61 |ef{basic| dino} a|
|00001550| 6e 64 0a 5c 72 65 66 7b | 75 73 69 6e 67 20 64 69 |nd.\ref{|using di|
|00001560| 6e 6f 7d 0a 69 6e 20 6f | 72 64 65 72 20 74 6f 20 |no}.in o|rder to |
|00001570| 67 65 74 20 73 74 61 72 | 74 65 64 2e 20 20 55 73 |get star|ted. Us|
|00001580| 65 72 73 20 63 61 6e 20 | 74 68 65 6e 20 70 72 6f |ers can |then pro|
|00001590| 63 65 65 64 20 74 6f 20 | 74 68 65 20 65 78 61 6d |ceed to |the exam|
|000015a0| 70 6c 65 73 20 69 6e 0a | 53 65 63 74 69 6f 6e 7e |ples in.|Section~|
|000015b0| 5c 72 65 66 7b 65 78 61 | 6d 70 6c 65 73 7d 2c 20 |\ref{exa|mples}, |
|000015c0| 6f 72 20 72 65 61 64 20 | 74 68 65 20 72 65 66 65 |or read |the refe|
|000015d0| 72 65 6e 63 65 20 6d 61 | 74 65 72 69 61 6c 20 69 |rence ma|terial i|
|000015e0| 6e 0a 53 65 63 74 69 6f | 6e 7e 5c 72 65 66 7b 6c |n.Sectio|n~\ref{l|
|000015f0| 61 6e 67 75 61 67 65 20 | 72 65 66 65 72 65 6e 63 |anguage |referenc|
|00001600| 65 7d 2e 0a 7d 0a 5c 76 | 73 70 61 63 65 7b 30 2e |e}..}.\v|space{0.|
|00001610| 35 69 6e 7d 0a 0a 5c 73 | 65 63 74 69 6f 6e 58 7b |5in}..\s|ectionX{|
|00001620| 42 61 73 69 63 20 5c 70 | 72 6f 74 65 63 74 5c 64 |Basic \p|rotect\d|
|00001630| 69 6e 6f 42 7d 0a 5c 6c | 61 62 65 6c 7b 62 61 73 |inoB}.\l|abel{bas|
|00001640| 69 63 20 64 69 6e 6f 7d | 0a 5c 73 75 62 73 65 63 |ic dino}|.\subsec|
|00001650| 74 69 6f 6e 58 7b 57 68 | 61 74 20 5c 70 72 6f 74 |tionX{Wh|at \prot|
|00001660| 65 63 74 5c 64 69 6e 6f | 42 5c 20 49 73 7d 0a 0a |ect\dino|B\ Is}..|
|00001670| 5c 64 69 6e 6f 5c 69 6e | 64 65 78 41 7b 44 49 4e |\dino\in|dexA{DIN|
|00001680| 4f 7d 20 69 73 20 61 20 | 6c 61 6e 67 75 61 67 65 |O} is a |language|
|00001690| 20 66 6f 72 20 77 72 69 | 74 69 6e 67 0a 70 61 72 | for wri|ting.par|
|000016a0| 61 6c 6c 65 6c 20 6e 75 | 6d 65 72 69 63 61 6c 20 |allel nu|merical |
|000016b0| 70 72 6f 67 72 61 6d 73 | 20 66 6f 72 20 64 69 73 |programs| for dis|
|000016c0| 74 72 69 62 75 74 65 64 | 20 6d 65 6d 6f 72 79 20 |tributed| memory |
|000016d0| 6d 75 6c 74 69 70 72 6f | 63 65 73 73 6f 72 73 2e |multipro|cessors.|
|000016e0| 20 20 0a 42 79 20 61 20 | 64 69 73 74 72 69 62 75 | .By a |distribu|
|000016f0| 74 65 64 20 0a 6d 65 6d | 6f 72 79 20 6d 75 6c 74 |ted .mem|ory mult|
|00001700| 69 70 72 6f 63 65 73 73 | 6f 72 20 77 65 20 6d 65 |iprocess|or we me|
|00001710| 61 6e 20 61 20 63 6f 6d | 70 75 74 65 72 20 77 69 |an a com|puter wi|
|00001720| 74 68 20 6d 75 6c 74 69 | 70 6c 65 2c 20 69 6e 64 |th multi|ple, ind|
|00001730| 65 70 65 6e 64 65 6e 74 | 20 70 72 6f 63 65 73 73 |ependent| process|
|00001740| 6f 72 73 2c 0a 65 61 63 | 68 20 77 69 74 68 20 69 |ors,.eac|h with i|
|00001750| 74 73 20 6f 77 6e 20 6d | 65 6d 6f 72 79 2c 20 62 |ts own m|emory, b|
|00001760| 75 74 20 77 69 74 68 20 | 6e 6f 20 73 68 61 72 65 |ut with |no share|
|00001770| 64 20 6d 65 6d 6f 72 79 | 20 6f 72 20 73 68 61 72 |d memory| or shar|
|00001780| 65 64 20 61 64 64 72 65 | 73 73 20 73 70 61 63 65 |ed addre|ss space|
|00001790| 2c 0a 73 6f 20 74 68 61 | 74 20 63 6f 6d 6d 75 6e |,.so tha|t commun|
|000017a0| 69 63 61 74 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 |ication |between |
|000017b0| 70 72 6f 63 65 73 73 6f | 72 73 20 69 73 20 61 63 |processo|rs is ac|
|000017c0| 63 6f 6d 70 6c 69 73 68 | 65 64 20 62 79 0a 70 61 |complish|ed by.pa|
|000017d0| 73 73 69 6e 67 20 6d 65 | 73 73 61 67 65 73 2e 20 |ssing me|ssages. |
|000017e0| 20 0a 45 78 61 6d 70 6c | 65 73 20 69 6e 63 6c 75 | .Exampl|es inclu|
|000017f0| 64 65 20 7b 5c 73 6d 61 | 6c 6c 20 4d 49 4d 44 7d |de {\sma|ll MIMD}|
|00001800| 20 68 79 70 65 72 63 75 | 62 65 73 2c 20 61 6e 64 | hypercu|bes, and|
|00001810| 20 6e 65 74 77 6f 72 6b | 73 20 6f 66 20 63 6f 6d | network|s of com|
|00001820| 70 75 74 65 72 73 20 75 | 73 65 64 0a 61 73 20 6d |puters u|sed.as m|
|00001830| 75 6c 74 69 70 72 6f 63 | 65 73 73 6f 72 73 2e 0a |ultiproc|essors..|
|00001840| 0a 49 74 20 69 73 20 67 | 65 6e 65 72 61 6c 6c 79 |.It is g|enerally|
|00001850| 20 68 61 72 64 65 72 20 | 74 6f 20 64 65 73 69 67 | harder |to desig|
|00001860| 6e 20 61 6e 20 61 6c 67 | 6f 72 69 74 68 6d 20 0a |n an alg|orithm .|
|00001870| 66 6f 72 20 61 20 6d 75 | 6c 74 69 70 72 6f 63 65 |for a mu|ltiproce|
|00001880| 73 73 6f 72 0a 74 68 61 | 6e 20 66 6f 72 20 61 20 |ssor.tha|n for a |
|00001890| 73 65 72 69 61 6c 20 6d | 61 63 68 69 6e 65 2c 20 |serial m|achine, |
|000018a0| 62 65 63 61 75 73 65 0a | 74 68 65 20 61 6c 67 6f |because.|the algo|
|000018b0| 72 69 74 68 6d 20 64 65 | 73 69 67 6e 65 72 20 68 |rithm de|signer h|
|000018c0| 61 73 20 6d 6f 72 65 20 | 74 61 73 6b 73 20 74 6f |as more |tasks to|
|000018d0| 20 61 63 63 6f 6d 70 6c | 69 73 68 2e 20 20 0a 46 | accompl|ish. .F|
|000018e0| 69 72 73 74 2c 20 74 68 | 65 20 61 6c 67 6f 72 69 |irst, th|e algori|
|000018f0| 74 68 6d 20 64 65 73 69 | 67 6e 65 72 20 6d 75 73 |thm desi|gner mus|
|00001900| 74 20 64 69 76 69 64 65 | 20 74 68 65 20 64 65 73 |t divide| the des|
|00001910| 69 72 65 64 20 63 6f 6d | 70 75 74 61 74 69 6f 6e |ired com|putation|
|00001920| 0a 61 6d 6f 6e 67 20 74 | 68 65 20 61 76 61 69 6c |.among t|he avail|
|00001930| 61 62 6c 65 20 70 72 6f | 63 65 73 73 6f 72 73 2e |able pro|cessors.|
|00001940| 20 20 0a 53 65 63 6f 6e | 64 2c 20 74 68 65 20 61 | .Secon|d, the a|
|00001950| 6c 67 6f 72 69 74 68 6d | 20 64 65 73 69 67 6e 65 |lgorithm| designe|
|00001960| 72 20 6d 75 73 74 20 64 | 65 63 69 64 65 20 68 6f |r must d|ecide ho|
|00001970| 77 20 74 68 65 73 65 0a | 70 72 6f 63 65 73 73 65 |w these.|processe|
|00001980| 73 20 77 69 6c 6c 20 73 | 79 6e 63 68 72 6f 6e 69 |s will s|ynchroni|
|00001990| 7a 65 2e 20 0a 49 6e 20 | 61 64 64 69 74 69 6f 6e |ze. .In |addition|
|000019a0| 2c 20 6f 6e 20 61 20 64 | 69 73 74 72 69 62 75 74 |, on a d|istribut|
|000019b0| 65 64 20 6d 65 6d 6f 72 | 79 20 6d 75 6c 74 69 70 |ed memor|y multip|
|000019c0| 72 6f 63 65 73 73 6f 72 | 2c 0a 74 68 65 20 61 6c |rocessor|,.the al|
|000019d0| 67 6f 72 69 74 68 6d 20 | 64 65 73 69 67 6e 65 72 |gorithm |designer|
|000019e0| 20 6d 75 73 74 20 63 6f | 6e 73 69 64 65 72 20 68 | must co|nsider h|
|000019f0| 6f 77 20 64 61 74 61 20 | 73 68 6f 75 6c 64 0a 62 |ow data |should.b|
|00001a00| 65 20 64 69 73 74 72 69 | 62 75 74 65 64 20 61 6d |e distri|buted am|
|00001a10| 6f 6e 67 20 74 68 65 20 | 70 72 6f 63 65 73 73 6f |ong the |processo|
|00001a20| 72 73 2c 20 61 6e 64 20 | 68 6f 77 20 74 68 65 20 |rs, and |how the |
|00001a30| 70 72 6f 63 65 73 73 6f | 72 73 0a 73 68 6f 75 6c |processo|rs.shoul|
|00001a40| 64 20 63 6f 6d 6d 75 6e | 69 63 61 74 65 20 61 6e |d commun|icate an|
|00001a50| 79 20 73 68 61 72 65 64 | 20 69 6e 66 6f 72 6d 61 |y shared| informa|
|00001a60| 74 69 6f 6e 2e 20 0a 0a | 54 68 65 20 67 6f 61 6c |tion. ..|The goal|
|00001a70| 20 6f 66 20 5c 64 69 6e | 6f 5c 20 69 73 20 74 6f | of \din|o\ is to|
|00001a80| 20 6d 61 6b 65 20 70 72 | 6f 67 72 61 6d 6d 69 6e | make pr|ogrammin|
|00001a90| 67 0a 64 69 73 74 72 69 | 62 75 74 65 64 20 6d 65 |g.distri|buted me|
|00001aa0| 6d 6f 72 79 20 70 61 72 | 61 6c 6c 65 6c 20 6e 75 |mory par|allel nu|
|00001ab0| 6d 65 72 69 63 61 6c 20 | 61 6c 67 6f 72 69 74 68 |merical |algorith|
|00001ac0| 6d 73 20 61 73 20 65 61 | 73 79 20 61 73 20 70 6f |ms as ea|sy as po|
|00001ad0| 73 73 69 62 6c 65 2c 0a | 77 69 74 68 6f 75 74 20 |ssible,.|without |
|00001ae0| 68 69 6e 64 65 72 69 6e | 67 20 65 66 66 69 63 69 |hinderin|g effici|
|00001af0| 65 6e 63 79 2e 0a 57 65 | 20 62 65 6c 69 65 76 65 |ency..We| believe|
|00001b00| 20 74 68 61 74 20 74 68 | 65 20 6b 65 79 20 74 6f | that th|e key to|
|00001b10| 20 74 68 69 73 20 67 6f | 61 6c 20 69 73 20 72 61 | this go|al is ra|
|00001b20| 69 73 69 6e 67 20 74 68 | 65 20 74 61 73 6b 20 6f |ising th|e task o|
|00001b30| 66 0a 73 70 65 63 69 66 | 79 69 6e 67 20 61 6c 67 |f.specif|ying alg|
|00001b40| 6f 72 69 74 68 6d 20 61 | 6e 64 20 64 61 74 61 20 |orithm a|nd data |
|00001b50| 64 65 63 6f 6d 70 6f 73 | 69 74 69 6f 6e 2c 20 0a |decompos|ition, .|
|00001b60| 69 6e 74 65 72 70 72 6f | 63 65 73 73 20 63 6f 6d |interpro|cess com|
|00001b70| 6d 75 6e 69 63 61 74 69 | 6f 6e 2c 20 61 6e 64 20 |municati|on, and |
|00001b80| 70 72 6f 63 65 73 73 0a | 6d 61 6e 61 67 65 6d 65 |process.|manageme|
|00001b90| 6e 74 20 74 6f 20 61 20 | 68 69 67 68 65 72 20 6c |nt to a |higher l|
|00001ba0| 65 76 65 6c 20 6f 66 20 | 61 62 73 74 72 61 63 74 |evel of |abstract|
|00001bb0| 69 6f 6e 20 74 68 61 6e | 20 69 73 0a 70 72 6f 76 |ion than| is.prov|
|00001bc0| 69 64 65 64 20 69 6e 20 | 6d 61 6e 79 20 63 75 72 |ided in |many cur|
|00001bd0| 72 65 6e 74 20 6d 65 73 | 73 61 67 65 20 70 61 73 |rent mes|sage pas|
|00001be0| 73 69 6e 67 20 73 79 73 | 74 65 6d 73 2e 0a 5c 64 |sing sys|tems..\d|
|00001bf0| 69 6e 6f 5c 20 61 63 63 | 6f 6d 70 6c 69 73 68 65 |ino\ acc|omplishe|
|00001c00| 73 20 74 68 69 73 20 62 | 79 20 70 72 6f 76 69 64 |s this b|y provid|
|00001c10| 69 6e 67 20 68 69 67 68 | 20 6c 65 76 65 6c 20 70 |ing high| level p|
|00001c20| 61 72 61 6c 6c 65 6c 20 | 63 6f 6e 73 74 72 75 63 |arallel |construc|
|00001c30| 74 73 0a 74 68 61 74 20 | 63 6f 6e 66 6f 72 6d 20 |ts.that |conform |
|00001c40| 74 6f 20 74 68 65 20 77 | 61 79 20 74 68 65 20 61 |to the w|ay the a|
|00001c50| 6c 67 6f 72 69 74 68 6d | 20 64 65 73 69 67 6e 65 |lgorithm| designe|
|00001c60| 72 0a 6e 61 74 75 72 61 | 6c 6c 79 20 74 68 69 6e |r.natura|lly thin|
|00001c70| 6b 73 20 61 62 6f 75 74 | 20 74 68 65 20 70 61 72 |ks about| the par|
|00001c80| 61 6c 6c 65 6c 20 61 6c | 67 6f 72 69 74 68 6d 2e |allel al|gorithm.|
|00001c90| 20 20 0a 54 68 69 73 2c | 20 69 6e 20 74 75 72 6e | .This,| in turn|
|00001ca0| 2c 20 74 72 61 6e 73 66 | 65 72 73 20 6d 61 6e 79 |, transf|ers many|
|00001cb0| 20 6f 66 20 74 68 65 20 | 6c 6f 77 2d 6c 65 76 65 | of the |low-leve|
|00001cc0| 6c 0a 64 65 74 61 69 6c | 73 20 61 73 73 6f 63 69 |l.detail|s associ|
|00001cd0| 61 74 65 64 20 77 69 74 | 68 20 64 69 73 74 72 69 |ated wit|h distri|
|00001ce0| 62 75 74 65 64 20 20 0a | 70 61 72 61 6c 6c 65 6c |buted .|parallel|
|00001cf0| 20 63 6f 6d 70 75 74 61 | 74 69 6f 6e 20 74 6f 20 | computa|tion to |
|00001d00| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 2e 0a 49 6e |the comp|iler..In|
|00001d10| 20 70 61 72 74 69 63 75 | 6c 61 72 2c 20 64 65 74 | particu|lar, det|
|00001d20| 61 69 6c 73 20 72 65 67 | 61 72 64 69 6e 67 20 6d |ails reg|arding m|
|00001d30| 65 73 73 61 67 65 20 70 | 61 73 73 69 6e 67 2c 20 |essage p|assing, |
|00001d40| 0a 70 72 6f 63 65 73 73 | 20 6d 61 6e 61 67 65 6d |.process| managem|
|00001d50| 65 6e 74 2c 20 61 6e 64 | 20 73 79 6e 63 68 72 6f |ent, and| synchro|
|00001d60| 6e 69 7a 61 74 69 6f 6e | 20 0a 61 72 65 20 6e 6f |nization| .are no|
|00001d70| 20 6c 6f 6e 67 65 72 20 | 6e 65 63 65 73 73 61 72 | longer |necessar|
|00001d80| 79 20 69 6e 20 74 68 65 | 20 63 6f 64 65 20 74 68 |y in the| code th|
|00001d90| 61 74 0a 74 68 65 20 70 | 72 6f 67 72 61 6d 6d 65 |at.the p|rogramme|
|00001da0| 72 20 77 72 69 74 65 73 | 2c 0a 61 6e 64 20 61 73 |r writes|,.and as|
|00001db0| 73 6f 63 69 61 74 65 64 | 20 65 66 66 69 63 69 65 |sociated| efficie|
|00001dc0| 6e 63 79 20 63 6f 6e 73 | 69 64 65 72 61 74 69 6f |ncy cons|ideratio|
|00001dd0| 6e 73 20 61 72 65 20 61 | 64 64 72 65 73 73 65 64 |ns are a|ddressed|
|00001de0| 20 62 79 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | by the |compiler|
|00001df0| 2e 0a 0a 54 68 69 73 20 | 68 69 67 68 20 6c 65 76 |...This |high lev|
|00001e00| 65 6c 20 61 70 70 72 6f | 61 63 68 20 74 6f 20 64 |el appro|ach to d|
|00001e10| 69 73 74 72 69 62 75 74 | 65 64 20 6e 75 6d 65 72 |istribut|ed numer|
|00001e20| 69 63 61 6c 20 63 6f 6d | 70 75 74 61 74 69 6f 6e |ical com|putation|
|00001e30| 20 69 73 20 66 65 61 73 | 69 62 6c 65 20 0a 62 65 | is feas|ible .be|
|00001e40| 63 61 75 73 65 20 73 6f | 20 6d 61 6e 79 20 6e 75 |cause so| many nu|
|00001e50| 6d 65 72 69 63 61 6c 20 | 61 6c 67 6f 72 69 74 68 |merical |algorith|
|00001e60| 6d 73 20 61 72 65 20 68 | 69 67 68 6c 79 20 73 74 |ms are h|ighly st|
|00001e70| 72 75 63 74 75 72 65 64 | 2e 20 20 0a 54 68 65 20 |ructured|. .The |
|00001e80| 6d 61 6a 6f 72 20 64 61 | 74 61 20 73 74 72 75 63 |major da|ta struc|
|00001e90| 74 75 72 65 73 20 69 6e | 20 74 68 65 73 65 20 61 |tures in| these a|
|00001ea0| 6c 67 6f 72 69 74 68 6d | 73 20 61 72 65 20 75 73 |lgorithm|s are us|
|00001eb0| 75 61 6c 6c 79 20 20 61 | 72 72 61 79 73 2e 20 20 |ually a|rrays. |
|00001ec0| 0a 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 74 68 |.In addi|tion, th|
|00001ed0| 65 20 61 6c 67 6f 72 69 | 74 68 6d 73 20 75 73 75 |e algori|thms usu|
|00001ee0| 61 6c 6c 79 20 65 78 68 | 69 62 69 74 20 64 61 74 |ally exh|ibit dat|
|00001ef0| 61 20 70 61 72 61 6c 6c | 65 6c 69 73 6d 2c 20 0a |a parall|elism, .|
|00001f00| 77 68 65 72 65 20 61 74 | 20 65 61 63 68 20 73 74 |where at| each st|
|00001f10| 61 67 65 20 6f 66 20 74 | 68 65 20 63 6f 6d 70 75 |age of t|he compu|
|00001f20| 74 61 74 69 6f 6e 2c 0a | 70 61 72 61 6c 6c 65 6c |tation,.|parallel|
|00001f30| 69 73 6d 20 69 73 20 61 | 63 68 69 65 76 65 64 20 |ism is a|chieved |
|00001f40| 62 79 20 64 69 76 69 64 | 69 6e 67 20 74 68 65 20 |by divid|ing the |
|00001f50| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 20 |data str|uctures |
|00001f60| 69 6e 74 6f 20 70 69 65 | 63 65 73 2c 20 61 6e 64 |into pie|ces, and|
|00001f70| 20 0a 70 65 72 66 6f 72 | 6d 69 6e 67 20 73 69 6d | .perfor|ming sim|
|00001f80| 69 6c 61 72 20 6f 72 20 | 69 64 65 6e 74 69 63 61 |ilar or |identica|
|00001f90| 6c 20 63 6f 6d 70 75 74 | 61 74 69 6f 6e 73 20 6f |l comput|ations o|
|00001fa0| 6e 20 65 61 63 68 20 70 | 69 65 63 65 20 63 6f 6e |n each p|iece con|
|00001fb0| 63 75 72 72 65 6e 74 6c | 79 2e 0a 5c 64 69 6e 6f |currentl|y..\dino|
|00001fc0| 5c 20 69 73 20 6d 61 69 | 6e 6c 79 20 69 6e 74 65 |\ is mai|nly inte|
|00001fd0| 6e 64 65 64 20 74 6f 20 | 73 75 70 70 6f 72 74 20 |nded to |support |
|00001fe0| 73 75 63 68 20 0a 64 61 | 74 61 20 70 61 72 61 6c |such .da|ta paral|
|00001ff0| 6c 65 6c 5c 69 6e 64 65 | 78 41 7b 64 61 74 61 20 |lel\inde|xA{data |
|00002000| 70 61 72 61 6c 6c 65 6c | 69 73 6d 7d 20 63 6f 6d |parallel|ism} com|
|00002010| 70 75 74 61 74 69 6f 6e | 2c 20 61 6c 74 68 6f 75 |putation|, althou|
|00002020| 67 68 20 20 0a 5c 64 69 | 6e 6f 5c 20 61 6c 73 6f |gh .\di|no\ also|
|00002030| 20 70 72 6f 76 69 64 65 | 73 20 73 6f 6d 65 20 73 | provide|s some s|
|00002040| 75 70 70 6f 72 74 20 66 | 6f 72 20 66 75 6e 63 74 |upport f|or funct|
|00002050| 69 6f 6e 61 6c 0a 70 61 | 72 61 6c 6c 65 6c 69 73 |ional.pa|rallelis|
|00002060| 6d 5c 69 6e 64 65 78 41 | 7b 66 75 6e 63 74 69 6f |m\indexA|{functio|
|00002070| 6e 61 6c 20 70 61 72 61 | 6c 6c 65 6c 69 73 6d 7d |nal para|llelism}|
|00002080| 2e 0a 0a 54 68 65 20 62 | 61 73 69 63 20 61 70 70 |...The b|asic app|
|00002090| 72 6f 61 63 68 20 74 61 | 6b 65 6e 20 69 6e 20 5c |roach ta|ken in \|
|000020a0| 64 69 6e 6f 5c 20 69 73 | 0a 74 6f 20 70 72 6f 76 |dino\ is|.to prov|
|000020b0| 69 64 65 20 61 20 74 6f | 70 20 64 6f 77 6e 20 64 |ide a to|p down d|
|000020c0| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 74 68 |escripti|on of th|
|000020d0| 65 20 64 69 73 74 72 69 | 62 75 74 65 64 20 70 61 |e distri|buted pa|
|000020e0| 72 61 6c 6c 65 6c 20 61 | 6c 67 6f 72 69 74 68 6d |rallel a|lgorithm|
|000020f0| 2e 20 0a 54 68 65 20 70 | 72 6f 67 72 61 6d 6d 65 |. .The p|rogramme|
|00002100| 72 20 66 69 72 73 74 20 | 64 65 66 69 6e 65 73 20 |r first |defines |
|00002110| 61 20 76 69 72 74 75 61 | 6c 20 70 61 72 61 6c 6c |a virtua|l parall|
|00002120| 65 6c 5c 69 6e 64 65 78 | 41 7b 76 69 72 74 75 61 |el\index|A{virtua|
|00002130| 6c 20 70 72 6f 63 65 73 | 73 6f 72 73 7d 0a 6d 61 |l proces|sors}.ma|
|00002140| 63 68 69 6e 65 20 74 68 | 61 74 20 62 65 73 74 20 |chine th|at best |
|00002150| 66 69 74 73 20 74 68 65 | 20 6d 61 6a 6f 72 20 64 |fits the| major d|
|00002160| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 73 20 0a |ata stru|ctures .|
|00002170| 61 6e 64 20 63 6f 6d 6d | 75 6e 69 63 61 74 69 6f |and comm|unicatio|
|00002180| 6e 20 70 61 74 74 65 72 | 6e 73 20 6f 66 20 74 68 |n patter|ns of th|
|00002190| 65 20 61 6c 67 6f 72 69 | 74 68 6d 2e 0a 4e 65 78 |e algori|thm..Nex|
|000021a0| 74 2c 20 74 68 65 20 70 | 72 6f 67 72 61 6d 6d 65 |t, the p|rogramme|
|000021b0| 72 20 73 70 65 63 69 66 | 69 65 73 20 74 68 65 20 |r specif|ies the |
|000021c0| 77 61 79 20 74 68 61 74 | 20 74 68 65 73 65 0a 6d |way that| these.m|
|000021d0| 61 6a 6f 72 20 64 61 74 | 61 20 73 74 72 75 63 74 |ajor dat|a struct|
|000021e0| 75 72 65 73 20 77 69 6c | 6c 20 62 65 20 64 69 73 |ures wil|l be dis|
|000021f0| 74 72 69 62 75 74 65 64 | 2c 0a 61 6e 64 20 70 6f |tributed|,.and po|
|00002200| 73 73 69 62 6c 79 20 72 | 65 70 6c 69 63 61 74 65 |ssibly r|eplicate|
|00002210| 64 2c 20 61 6d 6f 6e 67 | 20 74 68 65 20 76 69 72 |d, among| the vir|
|00002220| 74 75 61 6c 20 70 72 6f | 63 65 73 73 6f 72 73 2e |tual pro|cessors.|
|00002230| 20 20 0a 46 69 6e 61 6c | 6c 79 2c 20 74 68 65 20 | .Final|ly, the |
|00002240| 70 72 6f 67 72 61 6d 6d | 65 72 20 70 72 6f 76 69 |programm|er provi|
|00002250| 64 65 73 20 70 72 6f 63 | 65 64 75 72 65 73 20 74 |des proc|edures t|
|00002260| 68 61 74 20 77 69 6c 6c | 0a 72 75 6e 20 6f 6e 20 |hat will|.run on |
|00002270| 65 61 63 68 20 76 69 72 | 74 75 61 6c 20 70 72 6f |each vir|tual pro|
|00002280| 63 65 73 73 6f 72 20 63 | 6f 6e 63 75 72 72 65 6e |cessor c|oncurren|
|00002290| 74 6c 79 2e 20 0a 54 68 | 75 73 20 74 68 65 20 62 |tly. .Th|us the b|
|000022a0| 61 73 69 63 20 6d 6f 64 | 65 6c 20 6f 66 20 70 61 |asic mod|el of pa|
|000022b0| 72 61 6c 6c 65 6c 69 73 | 6d 20 69 73 0a 53 69 6e |rallelis|m is.Sin|
|000022c0| 67 6c 65 20 50 72 6f 67 | 72 61 6d 20 4d 75 6c 74 |gle Prog|ram Mult|
|000022d0| 69 70 6c 65 20 44 61 74 | 61 5c 69 6e 64 65 78 7b |iple Dat|a\index{|
|000022e0| 53 50 4d 44 20 28 73 69 | 6e 67 6c 65 20 70 72 6f |SPMD (si|ngle pro|
|000022f0| 67 72 61 6d 2c 20 6d 75 | 6c 74 69 70 6c 65 20 64 |gram, mu|ltiple d|
|00002300| 61 74 61 29 7d 2c 0a 61 | 6c 74 68 6f 75 67 68 20 |ata)},.a|lthough |
|00002310| 66 61 72 20 6d 6f 72 65 | 20 63 6f 6d 70 6c 65 78 |far more| complex|
|00002320| 69 74 79 20 69 73 20 70 | 6f 73 73 69 62 6c 65 2e |ity is p|ossible.|
|00002330| 20 0a 4d 6f 73 74 20 6f | 66 20 74 68 65 20 72 65 | .Most o|f the re|
|00002340| 6d 61 69 6e 69 6e 67 20 | 64 65 74 61 69 6c 73 20 |maining |details |
|00002350| 6f 66 20 70 61 72 61 6c | 6c 65 6c 20 63 6f 6d 70 |of paral|lel comp|
|00002360| 75 74 61 74 69 6f 6e 20 | 61 6e 64 20 63 6f 6d 6d |utation |and comm|
|00002370| 75 6e 69 63 61 74 69 6f | 6e 20 61 72 65 0a 68 61 |unicatio|n are.ha|
|00002380| 6e 64 6c 65 64 20 69 6d | 70 6c 69 63 69 74 6c 79 |ndled im|plicitly|
|00002390| 20 62 79 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | by the |compiler|
|000023a0| 2e 0a 41 20 6b 65 79 20 | 63 6f 6d 70 6f 6e 65 6e |..A key |componen|
|000023b0| 74 20 69 6e 20 6d 61 6b | 69 6e 67 20 74 68 69 73 |t in mak|ing this|
|000023c0| 20 61 70 70 72 6f 61 63 | 68 20 76 69 61 62 6c 65 | approac|h viable|
|000023d0| 20 68 61 73 20 62 65 65 | 6e 20 74 68 65 0a 64 65 | has bee|n the.de|
|000023e0| 76 65 6c 6f 70 6d 65 6e | 74 20 6f 66 20 61 20 72 |velopmen|t of a r|
|000023f0| 69 63 68 20 6d 65 63 68 | 61 6e 69 73 6d 20 66 6f |ich mech|anism fo|
|00002400| 72 20 73 70 65 63 69 66 | 79 69 6e 67 0a 74 68 65 |r specif|ying.the|
|00002410| 20 6d 61 70 70 69 6e 67 | 73 5c 69 6e 64 65 78 41 | mapping|s\indexA|
|00002420| 7b 6d 61 70 70 69 6e 67 | 20 66 75 6e 63 74 69 6f |{mapping| functio|
|00002430| 6e 73 7d 20 6f 66 20 64 | 61 74 61 20 73 74 72 75 |ns} of d|ata stru|
|00002440| 63 74 75 72 65 73 20 74 | 6f 20 76 69 72 74 75 61 |ctures t|o virtua|
|00002450| 6c 20 6d 61 63 68 69 6e | 65 73 2c 0a 61 6c 6f 6e |l machin|es,.alon|
|00002460| 67 20 77 69 74 68 20 74 | 68 65 20 65 66 66 69 63 |g with t|he effic|
|00002470| 69 65 6e 74 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |ient imp|lementat|
|00002480| 69 6f 6e 20 6f 66 20 74 | 68 65 73 65 20 6d 61 70 |ion of t|hese map|
|00002490| 70 69 6e 67 73 0a 61 6e | 64 20 74 68 65 20 72 65 |pings.an|d the re|
|000024a0| 73 75 6c 74 61 6e 74 20 | 63 6f 6d 6d 75 6e 69 63 |sultant |communic|
|000024b0| 61 74 69 6f 6e 20 70 61 | 74 74 65 72 6e 73 20 69 |ation pa|tterns i|
|000024c0| 6e 20 74 68 65 20 63 6f | 6d 70 69 6c 65 72 2e 20 |n the co|mpiler. |
|000024d0| 20 0a 0a 53 65 71 75 65 | 6e 74 69 61 6c 20 63 6f | ..Seque|ntial co|
|000024e0| 64 65 20 69 6e 20 61 20 | 5c 64 69 6e 6f 5c 20 70 |de in a |\dino\ p|
|000024f0| 72 6f 67 72 61 6d 20 69 | 73 20 77 72 69 74 74 65 |rogram i|s writte|
|00002500| 6e 20 69 6e 20 73 74 61 | 6e 64 61 72 64 20 43 5c |n in sta|ndard C\|
|00002510| 69 6e 64 65 78 41 7b 43 | 7d 3b 0a 5c 64 69 6e 6f |indexA{C|};.\dino|
|00002520| 5c 20 69 73 20 61 20 73 | 75 70 65 72 73 65 74 20 |\ is a s|uperset |
|00002530| 6f 66 20 43 2e 0a 4f 6e | 6c 79 20 74 68 65 20 70 |of C..On|ly the p|
|00002540| 61 72 61 6c 6c 65 6c 20 | 63 6f 6e 73 74 72 75 63 |arallel |construc|
|00002550| 74 73 20 69 6e 20 5c 64 | 69 6e 6f 2c 0a 61 6e 64 |ts in \d|ino,.and|
|00002560| 20 61 20 66 65 77 20 72 | 65 6c 61 74 65 64 20 61 | a few r|elated a|
|00002570| 64 64 69 74 69 6f 6e 73 | 2c 20 61 72 65 20 6e 65 |dditions|, are ne|
|00002580| 77 2e 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 58 |w...\sub|sectionX|
|00002590| 7b 42 61 73 69 63 20 50 | 72 6f 67 72 61 6d 6d 69 |{Basic P|rogrammi|
|000025a0| 6e 67 20 4d 6f 64 65 6c | 7d 0a 0a 52 61 74 68 65 |ng Model|}..Rathe|
|000025b0| 72 20 74 68 61 6e 20 6a | 75 73 74 20 6a 75 6d 70 |r than j|ust jump|
|000025c0| 69 6e 67 20 69 6e 20 61 | 6e 64 20 63 6f 6e 66 75 |ing in a|nd confu|
|000025d0| 73 69 6e 67 20 79 6f 75 | 72 73 65 6c 66 20 77 69 |sing you|rself wi|
|000025e0| 74 68 20 61 6c 6c 20 74 | 68 65 20 73 79 6e 74 61 |th all t|he synta|
|000025f0| 78 20 6f 66 0a 5c 64 69 | 6e 6f 2c 20 77 65 20 62 |x of.\di|no, we b|
|00002600| 65 6c 69 65 76 65 20 69 | 74 20 69 73 20 6d 6f 72 |elieve i|t is mor|
|00002610| 65 20 75 73 65 66 75 6c | 20 74 6f 20 73 74 61 72 |e useful| to star|
|00002620| 74 20 62 79 20 6c 6f 6f | 6b 69 6e 67 20 61 74 20 |t by loo|king at |
|00002630| 61 20 63 6f 6e 63 65 70 | 74 75 61 6c 0a 6f 76 65 |a concep|tual.ove|
|00002640| 72 76 69 65 77 20 6f 66 | 20 68 6f 77 20 5c 64 69 |rview of| how \di|
|00002650| 6e 6f 5c 20 70 72 6f 67 | 72 61 6d 73 20 61 72 65 |no\ prog|rams are|
|00002660| 20 77 72 69 74 74 65 6e | 2e 20 20 57 65 20 68 61 | written|. We ha|
|00002670| 76 65 20 66 6f 6c 6c 6f | 77 65 64 20 74 68 69 73 |ve follo|wed this|
|00002680| 20 62 79 0a 74 77 6f 20 | 65 78 61 6d 70 6c 65 73 | by.two |examples|
|00002690| 20 77 68 69 63 68 20 73 | 68 6f 77 20 68 6f 77 20 | which s|how how |
|000026a0| 74 6f 20 70 72 6f 63 65 | 65 64 20 66 72 6f 6d 20 |to proce|ed from |
|000026b0| 61 6c 67 6f 72 69 74 68 | 6d 20 74 6f 20 66 69 6e |algorith|m to fin|
|000026c0| 69 73 68 65 64 20 63 6f | 64 65 2e 0a 54 68 65 20 |ished co|de..The |
|000026d0| 66 69 72 73 74 20 6f 66 | 20 74 68 65 73 65 20 65 |first of| these e|
|000026e0| 78 61 6d 70 6c 65 73 20 | 69 73 20 65 78 74 72 65 |xamples |is extre|
|000026f0| 6d 65 6c 79 20 73 69 6d | 70 6c 65 2c 20 74 68 65 |mely sim|ple, the|
|00002700| 20 73 65 63 6f 6e 64 20 | 6d 6f 72 65 20 63 6f 6d | second |more com|
|00002710| 70 6c 65 78 2e 0a 0a 57 | 65 20 75 72 67 65 20 79 |plex...W|e urge y|
|00002720| 6f 75 20 74 6f 20 72 65 | 61 64 20 74 68 65 20 6f |ou to re|ad the o|
|00002730| 76 65 72 76 69 65 77 20 | 73 65 63 74 69 6f 6e 2c |verview |section,|
|00002740| 20 61 6e 64 20 61 74 20 | 6c 65 61 73 74 20 74 68 | and at |least th|
|00002750| 65 20 66 69 72 73 74 20 | 65 78 61 6d 70 6c 65 2e |e first |example.|
|00002760| 0a 54 68 69 73 20 73 68 | 6f 75 6c 64 20 67 69 76 |.This sh|ould giv|
|00002770| 65 20 79 6f 75 20 65 6e | 6f 75 67 68 20 6f 66 20 |e you en|ough of |
|00002780| 74 68 65 20 66 6c 61 76 | 6f 72 20 6f 66 20 5c 64 |the flav|or of \d|
|00002790| 69 6e 6f 5c 20 74 68 61 | 74 20 79 6f 75 20 77 69 |ino\ tha|t you wi|
|000027a0| 6c 6c 20 75 6e 64 65 72 | 73 74 61 6e 64 0a 74 68 |ll under|stand.th|
|000027b0| 65 20 66 6f 72 6d 61 6c | 20 6c 61 6e 67 75 61 67 |e formal| languag|
|000027c0| 65 20 64 65 66 69 6e 69 | 74 69 6f 6e 20 61 6e 64 |e defini|tion and|
|000027d0| 20 65 78 61 6d 70 6c 65 | 73 20 28 69 6e 0a 53 65 | example|s (in.Se|
|000027e0| 63 74 69 6f 6e 73 7e 5c | 72 65 66 7b 6c 61 6e 67 |ctions~\|ref{lang|
|000027f0| 75 61 67 65 20 72 65 66 | 65 72 65 6e 63 65 7d 20 |uage ref|erence} |
|00002800| 61 6e 64 7e 5c 72 65 66 | 7b 65 78 61 6d 70 6c 65 |and~\ref|{example|
|00002810| 73 7d 29 2e 0a 0a 5c 73 | 75 62 73 75 62 73 65 63 |s})...\s|ubsubsec|
|00002820| 74 69 6f 6e 58 7b 5c 70 | 72 6f 74 65 63 74 5c 64 |tionX{\p|rotect\d|
|00002830| 69 6e 6f 42 5c 20 4f 76 | 65 72 76 69 65 77 7d 5c |inoB\ Ov|erview}\|
|00002840| 69 6e 64 65 78 41 7b 4f | 76 65 72 76 69 65 77 20 |indexA{O|verview |
|00002850| 6f 66 20 44 49 4e 4f 7d | 0a 0a 57 68 65 6e 20 77 |of DINO}|..When w|
|00002860| 72 69 74 69 6e 67 20 70 | 72 6f 67 72 61 6d 73 20 |riting p|rograms |
|00002870| 69 6e 20 5c 64 69 6e 6f | 2c 20 77 65 20 68 61 76 |in \dino|, we hav|
|00002880| 65 20 66 6f 75 6e 64 20 | 69 74 20 75 73 65 66 75 |e found |it usefu|
|00002890| 6c 0a 74 6f 20 70 72 6f | 63 65 65 64 20 69 6e 20 |l.to pro|ceed in |
|000028a0| 61 20 73 70 65 63 69 66 | 69 63 20 73 65 71 75 65 |a specif|ic seque|
|000028b0| 6e 63 65 20 6f 66 20 63 | 6f 6e 63 65 70 74 75 61 |nce of c|onceptua|
|000028c0| 6c 20 60 60 73 74 65 70 | 73 2e 27 27 0a 4f 75 72 |l ``step|s.''.Our|
|000028d0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 77 61 79 20 | particu|lar way |
|000028e0| 6f 66 20 6c 6f 6f 6b 69 | 6e 67 20 61 74 20 74 68 |of looki|ng at th|
|000028f0| 65 20 70 72 6f 63 65 73 | 73 20 6f 66 20 73 6f 6c |e proces|s of sol|
|00002900| 76 69 6e 67 20 61 20 70 | 72 6f 62 6c 65 6d 20 69 |ving a p|roblem i|
|00002910| 6e 20 5c 64 69 6e 6f 5c | 0a 68 65 6c 70 73 20 75 |n \dino\|.helps u|
|00002920| 73 20 74 6f 20 73 74 72 | 75 63 74 75 72 65 20 74 |s to str|ucture t|
|00002930| 68 65 20 73 6f 6c 75 74 | 69 6f 6e 20 73 6f 20 69 |he solut|ion so i|
|00002940| 74 20 62 65 73 74 20 66 | 69 74 73 20 74 68 65 20 |t best f|its the |
|00002950| 5c 64 69 6e 6f 5c 20 70 | 61 72 61 64 69 67 6d 2e |\dino\ p|aradigm.|
|00002960| 0a 57 65 20 73 75 67 67 | 65 73 74 20 74 68 61 74 |.We sugg|est that|
|00002970| 20 79 6f 75 20 74 72 79 | 20 74 68 69 73 20 6d 65 | you try| this me|
|00002980| 74 68 6f 64 20 6f 66 20 | 6f 72 67 61 6e 69 7a 69 |thod of |organizi|
|00002990| 6e 67 20 74 68 65 20 70 | 72 6f 63 65 73 73 20 6f |ng the p|rocess o|
|000029a0| 66 20 74 75 72 6e 69 6e | 67 0a 79 6f 75 72 20 73 |f turnin|g.your s|
|000029b0| 6f 6c 75 74 69 6f 6e 73 | 20 69 6e 74 6f 20 5c 64 |olutions| into \d|
|000029c0| 69 6e 6f 5c 20 63 6f 64 | 65 20 61 74 20 6c 65 61 |ino\ cod|e at lea|
|000029d0| 73 74 20 6c 6f 6e 67 20 | 65 6e 6f 75 67 68 20 74 |st long |enough t|
|000029e0| 6f 20 67 65 74 20 61 6e | 20 69 64 65 61 20 6f 66 |o get an| idea of|
|000029f0| 20 68 6f 77 0a 77 65 20 | 66 65 65 6c 20 79 6f 75 | how.we |feel you|
|00002a00| 20 73 68 6f 75 6c 64 20 | 74 68 69 6e 6b 20 61 62 | should |think ab|
|00002a10| 6f 75 74 20 70 61 72 61 | 6c 6c 65 6c 20 6e 75 6d |out para|llel num|
|00002a20| 65 72 69 63 61 6c 20 70 | 72 6f 62 6c 65 6d 73 20 |erical p|roblems |
|00002a30| 69 6e 20 5c 64 69 6e 6f | 2e 0a 54 68 65 72 65 20 |in \dino|..There |
|00002a40| 61 72 65 20 66 69 76 65 | 20 73 70 65 63 69 66 69 |are five| specifi|
|00002a50| 63 20 60 60 73 74 65 70 | 73 27 27 3a 0a 0a 5c 62 |c ``step|s'':..\b|
|00002a60| 65 67 69 6e 7b 69 74 65 | 6d 69 7a 65 58 7d 0a 0a |egin{ite|mizeX}..|
|00002a70| 5c 69 74 65 6d 58 20 7b | 53 74 65 70 20 30 20 2d |\itemX {|Step 0 -|
|00002a80| 2d 2d 20 42 65 67 69 6e | 20 77 69 74 68 20 61 20 |-- Begin| with a |
|00002a90| 67 6f 6f 64 20 75 6e 64 | 65 72 73 74 61 6e 64 69 |good und|erstandi|
|00002aa0| 6e 67 20 6f 66 0a 74 68 | 65 20 70 72 6f 62 6c 65 |ng of.th|e proble|
|00002ab0| 6d 20 61 6e 64 20 61 20 | 67 65 6e 65 72 61 6c 20 |m and a |general |
|00002ac0| 61 70 70 72 6f 61 63 68 | 20 74 6f 20 69 74 73 20 |approach| to its |
|00002ad0| 73 6f 6c 75 74 69 6f 6e | 2e 7d 0a 0a 49 6e 20 6f |solution|.}..In o|
|00002ae0| 72 64 65 72 20 74 6f 20 | 75 73 65 20 6f 75 72 20 |rder to |use our |
|00002af0| 6d 65 74 68 6f 64 2c 20 | 79 6f 75 20 6d 75 73 74 |method, |you must|
|00002b00| 20 62 65 67 69 6e 20 77 | 69 74 68 20 61 20 67 6f | begin w|ith a go|
|00002b10| 6f 64 20 75 6e 64 65 72 | 73 74 61 6e 64 69 6e 67 |od under|standing|
|00002b20| 20 6f 66 0a 79 6f 75 72 | 20 70 72 6f 62 6c 65 6d | of.your| problem|
|00002b30| 20 61 6e 64 20 61 20 67 | 65 6e 65 72 61 6c 20 61 | and a g|eneral a|
|00002b40| 70 70 72 6f 61 63 68 20 | 74 6f 20 69 74 73 20 73 |pproach |to its s|
|00002b50| 6f 6c 75 74 69 6f 6e 2c | 20 69 6e 63 6c 75 64 69 |olution,| includi|
|00002b60| 6e 67 20 77 68 61 74 0a | 79 6f 75 20 62 65 6c 69 |ng what.|you beli|
|00002b70| 65 76 65 20 74 68 65 20 | 6d 61 69 6e 20 64 61 74 |eve the |main dat|
|00002b80| 61 20 73 74 72 75 63 74 | 75 72 65 73 20 73 68 6f |a struct|ures sho|
|00002b90| 75 6c 64 20 6c 6f 6f 6b | 20 6c 69 6b 65 20 61 6e |uld look| like an|
|00002ba0| 64 20 61 6e 20 69 64 65 | 61 20 6f 66 0a 68 6f 77 |d an ide|a of.how|
|00002bb0| 20 77 6f 72 6b 20 63 61 | 6e 20 62 65 20 64 69 76 | work ca|n be div|
|00002bc0| 69 64 65 64 20 61 6d 6f | 6e 67 20 61 20 6e 75 6d |ided amo|ng a num|
|00002bd0| 62 65 72 20 6f 66 20 70 | 72 6f 63 65 73 73 6f 72 |ber of p|rocessor|
|00002be0| 73 2e 0a 0a 5c 69 74 65 | 6d 58 20 7b 53 74 65 70 |s...\ite|mX {Step|
|00002bf0| 20 31 20 2d 2d 2d 20 43 | 68 6f 6f 73 65 20 61 20 | 1 --- C|hoose a |
|00002c00| 5c 75 6e 64 65 72 6c 69 | 6e 65 7b 5c 65 6d 20 73 |\underli|ne{\em s|
|00002c10| 74 72 75 63 74 75 72 65 | 20 6f 66 20 65 6e 76 69 |tructure| of envi|
|00002c20| 72 6f 6e 6d 65 6e 74 73 | 7d 0a 61 70 70 72 6f 70 |ronments|}.approp|
|00002c30| 72 69 61 74 65 20 74 6f | 20 74 68 65 20 70 72 6f |riate to| the pro|
|00002c40| 62 6c 65 6d 2e 7d 5c 69 | 6e 64 65 78 42 7b 4f 76 |blem.}\i|ndexB{Ov|
|00002c50| 65 72 76 69 65 77 20 6f | 66 20 44 49 4e 4f 7d 7b |erview o|f DINO}{|
|00002c60| 73 74 72 75 63 74 75 72 | 65 20 6f 66 20 65 6e 76 |structur|e of env|
|00002c70| 69 72 6f 6e 6d 65 6e 74 | 73 7d 0a 0a 49 6e 20 5c |ironment|s}..In \|
|00002c80| 64 69 6e 6f 2c 20 65 6e | 76 69 72 6f 6e 6d 65 6e |dino, en|vironmen|
|00002c90| 74 73 20 61 72 65 20 76 | 69 72 74 75 61 6c 20 70 |ts are v|irtual p|
|00002ca0| 72 6f 63 65 73 73 6f 72 | 73 5c 69 6e 64 65 78 41 |rocessor|s\indexA|
|00002cb0| 7b 76 69 72 74 75 61 6c | 20 70 72 6f 63 65 73 73 |{virtual| process|
|00002cc0| 6f 72 73 7d 2e 0a 49 6e | 20 74 68 65 20 63 75 72 |ors}..In| the cur|
|00002cd0| 72 65 6e 74 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |rent ver|sion of |
|00002ce0| 5c 64 69 6e 6f 2c 0a 74 | 68 65 72 65 20 73 68 6f |\dino,.t|here sho|
|00002cf0| 75 6c 64 20 62 65 20 6f | 6e 6c 79 20 6f 6e 65 20 |uld be o|nly one |
|00002d00| 76 69 72 74 75 61 6c 20 | 70 72 6f 63 65 73 73 6f |virtual |processo|
|00002d10| 72 20 66 6f 72 20 65 61 | 63 68 20 72 65 61 6c 20 |r for ea|ch real |
|00002d20| 70 72 6f 63 65 73 73 6f | 72 20 6f 6e 20 74 68 65 |processo|r on the|
|00002d30| 0a 74 61 72 67 65 74 20 | 6d 61 63 68 69 6e 65 2c |.target |machine,|
|00002d40| 20 64 75 65 20 74 6f 20 | 6d 65 6d 6f 72 79 20 61 | due to |memory a|
|00002d50| 6e 64 20 73 70 65 65 64 | 20 6c 69 6d 69 74 61 74 |nd speed| limitat|
|00002d60| 69 6f 6e 73 2e 0a 41 20 | 67 72 6f 75 70 20 6f 66 |ions..A |group of|
|00002d70| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 20 74 68 | environ|ments th|
|00002d80| 61 74 20 69 73 20 75 73 | 65 64 20 66 6f 72 20 61 |at is us|ed for a|
|00002d90| 20 70 61 72 74 69 63 75 | 6c 61 72 20 63 6f 6d 70 | particu|lar comp|
|00002da0| 75 74 61 74 69 6f 6e 61 | 6c 0a 74 61 73 6b 20 69 |utationa|l.task i|
|00002db0| 73 20 73 74 72 75 63 74 | 75 72 65 64 20 28 61 20 |s struct|ured (a |
|00002dc0| 76 65 63 74 6f 72 2c 20 | 32 44 20 61 72 72 61 79 |vector, |2D array|
|00002dd0| 2c 20 65 74 63 2e 29 20 | 74 6f 20 6d 61 6b 65 20 |, etc.) |to make |
|00002de0| 69 74 20 65 61 73 69 65 | 72 0a 74 6f 20 76 69 73 |it easie|r.to vis|
|00002df0| 75 61 6c 69 7a 65 20 68 | 6f 77 20 74 68 65 20 64 |ualize h|ow the d|
|00002e00| 61 74 61 20 61 6e 64 20 | 74 68 65 20 77 6f 72 6b |ata and |the work|
|00002e10| 20 69 73 20 64 69 76 69 | 64 65 64 20 75 70 20 61 | is divi|ded up a|
|00002e20| 6e 64 20 74 6f 20 6d 61 | 6b 65 20 69 74 0a 65 61 |nd to ma|ke it.ea|
|00002e30| 73 69 65 72 20 74 6f 20 | 6e 61 6d 65 20 70 61 72 |sier to |name par|
|00002e40| 74 69 63 75 6c 61 72 20 | 65 6e 76 69 72 6f 6e 6d |ticular |environm|
|00002e50| 65 6e 74 73 2e 0a 0a 59 | 6f 75 20 63 68 6f 6f 73 |ents...Y|ou choos|
|00002e60| 65 20 74 68 65 20 70 61 | 72 74 69 63 75 6c 61 72 |e the pa|rticular|
|00002e70| 20 73 74 72 75 63 74 75 | 72 65 20 6f 66 20 65 6e | structu|re of en|
|00002e80| 76 69 72 6f 6e 6d 65 6e | 74 73 20 62 79 20 68 61 |vironmen|ts by ha|
|00002e90| 76 69 6e 67 20 73 6f 6d | 65 0a 69 64 65 61 20 6f |ving som|e.idea o|
|00002ea0| 66 20 68 6f 77 20 79 6f | 75 72 20 64 61 74 61 20 |f how yo|ur data |
|00002eb0| 73 74 72 75 63 74 75 72 | 65 73 20 77 69 6c 6c 20 |structur|es will |
|00002ec0| 62 65 20 62 72 6f 6b 65 | 6e 20 75 70 2e 20 20 49 |be broke|n up. I|
|00002ed0| 66 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 0a |f, for e|xample,.|
|00002ee0| 79 6f 75 72 20 6d 61 6a | 6f 72 20 64 61 74 61 20 |your maj|or data |
|00002ef0| 73 74 72 75 63 74 75 72 | 65 20 69 73 20 61 20 32 |structur|e is a 2|
|00002f00| 44 20 6d 61 74 72 69 78 | 20 61 6e 64 20 79 6f 75 |D matrix| and you|
|00002f10| 20 77 61 6e 74 20 74 6f | 20 73 65 6e 64 20 65 61 | want to| send ea|
|00002f20| 63 68 0a 72 6f 77 20 74 | 6f 20 61 6e 20 65 6e 76 |ch.row t|o an env|
|00002f30| 69 72 6f 6e 6d 65 6e 74 | 2c 20 63 68 6f 6f 73 65 |ironment|, choose|
|00002f40| 20 61 20 76 65 63 74 6f | 72 20 6f 66 20 65 6e 76 | a vecto|r of env|
|00002f50| 69 72 6f 6e 6d 65 6e 74 | 73 2e 20 20 49 66 20 79 |ironment|s. If y|
|00002f60| 6f 75 72 0a 6d 61 6a 6f | 72 20 64 61 74 61 20 73 |our.majo|r data s|
|00002f70| 74 72 75 63 74 75 72 65 | 20 69 73 20 61 20 32 44 |tructure| is a 2D|
|00002f80| 20 6d 61 74 72 69 78 20 | 61 6e 64 20 79 6f 75 20 | matrix |and you |
|00002f90| 77 61 6e 74 20 74 6f 20 | 73 65 6e 64 20 65 61 63 |want to |send eac|
|00002fa0| 68 0a 65 6c 65 6d 65 6e | 74 20 74 6f 20 61 6e 20 |h.elemen|t to an |
|00002fb0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 2c 20 63 68 6f |environm|ent, cho|
|00002fc0| 6f 73 65 20 61 20 32 44 | 20 61 72 72 61 79 20 6f |ose a 2D| array o|
|00002fd0| 66 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 73 2e 0a |f enviro|nments..|
|00002fe0| 4f 62 76 69 6f 75 73 6c | 79 2c 20 69 66 20 79 6f |Obviousl|y, if yo|
|00002ff0| 75 20 68 61 76 65 20 6d | 6f 72 65 20 74 68 61 6e |u have m|ore than|
|00003000| 20 6f 6e 65 20 64 61 74 | 61 20 73 74 72 75 63 74 | one dat|a struct|
|00003010| 75 72 65 2c 20 74 68 65 | 0a 65 6e 76 69 72 6f 6e |ure, the|.environ|
|00003020| 6d 65 6e 74 20 73 74 72 | 75 63 74 75 72 65 20 6d |ment str|ucture m|
|00003030| 75 73 74 20 62 65 20 74 | 68 65 20 73 61 6d 65 20 |ust be t|he same |
|00003040| 66 6f 72 20 65 61 63 68 | 20 6f 72 20 79 6f 75 20 |for each| or you |
|00003050| 6e 65 65 64 20 74 6f 0a | 63 6c 61 72 69 66 79 20 |need to.|clarify |
|00003060| 68 6f 77 20 79 6f 75 72 | 20 73 6f 6c 75 74 69 6f |how your| solutio|
|00003070| 6e 20 77 69 6c 6c 20 77 | 6f 72 6b 2e 0a 0a 5c 69 |n will w|ork...\i|
|00003080| 74 65 6d 58 20 7b 53 74 | 65 70 20 32 20 2d 2d 2d |temX {St|ep 2 ---|
|00003090| 20 44 65 74 65 72 6d 69 | 6e 65 20 68 6f 77 20 74 | Determi|ne how t|
|000030a0| 68 65 20 70 72 69 6e 63 | 69 70 61 6c 20 64 61 74 |he princ|ipal dat|
|000030b0| 61 20 73 74 72 75 63 74 | 75 72 65 73 20 73 68 6f |a struct|ures sho|
|000030c0| 75 6c 64 20 62 65 0a 64 | 69 73 74 72 69 62 75 74 |uld be.d|istribut|
|000030d0| 65 64 20 61 6d 6f 6e 67 | 20 74 68 65 20 65 6e 76 |ed among| the env|
|000030e0| 69 72 6f 6e 6d 65 6e 74 | 73 20 69 6e 20 74 68 65 |ironment|s in the|
|000030f0| 20 73 74 72 75 63 74 75 | 72 65 20 79 6f 75 20 68 | structu|re you h|
|00003100| 61 76 65 20 63 68 6f 73 | 65 6e 0a 28 73 70 65 63 |ave chos|en.(spec|
|00003110| 69 66 79 20 74 68 65 20 | 5c 75 6e 64 65 72 6c 69 |ify the |\underli|
|00003120| 6e 65 7b 5c 65 6d 20 6d | 61 70 70 69 6e 67 73 7d |ne{\em m|appings}|
|00003130| 29 2e 7d 5c 69 6e 64 65 | 78 42 7b 4f 76 65 72 76 |).}\inde|xB{Overv|
|00003140| 69 65 77 20 6f 66 20 44 | 49 4e 4f 7d 7b 6d 61 70 |iew of D|INO}{map|
|00003150| 70 69 6e 67 73 7d 0a 0a | 46 6f 72 20 65 61 63 68 |pings}..|For each|
|00003160| 20 6f 66 20 79 6f 75 72 | 20 64 61 74 61 20 73 74 | of your| data st|
|00003170| 72 75 63 74 75 72 65 73 | 2c 20 79 6f 75 20 73 68 |ructures|, you sh|
|00003180| 6f 75 6c 64 20 73 70 65 | 63 69 66 79 20 68 6f 77 |ould spe|cify how|
|00003190| 20 69 74 20 69 73 0a 6d | 61 70 70 65 64 5c 69 6e | it is.m|apped\in|
|000031a0| 64 65 78 41 7b 6d 61 70 | 70 69 6e 67 20 66 75 6e |dexA{map|ping fun|
|000031b0| 63 74 69 6f 6e 73 7d 0a | 6f 6e 74 6f 20 74 68 65 |ctions}.|onto the|
|000031c0| 20 73 74 72 75 63 74 75 | 72 65 20 6f 66 20 65 6e | structu|re of en|
|000031d0| 76 69 72 6f 6e 6d 65 6e | 74 73 20 79 6f 75 20 68 |vironmen|ts you h|
|000031e0| 61 76 65 20 64 65 63 69 | 64 65 64 20 74 6f 20 75 |ave deci|ded to u|
|000031f0| 73 65 2e 0a 43 6f 6e 63 | 65 70 74 75 61 6c 6c 79 |se..Conc|eptually|
|00003200| 2c 20 74 68 69 73 20 74 | 61 73 6b 20 63 61 6e 20 |, this t|ask can |
|00003210| 62 65 20 64 69 76 69 64 | 65 64 20 69 6e 74 6f 20 |be divid|ed into |
|00003220| 74 68 72 65 65 20 70 61 | 72 74 73 3a 0a 0a 09 5c |three pa|rts:...\|
|00003230| 62 65 67 69 6e 7b 69 74 | 65 6d 69 7a 65 58 7d 0a |begin{it|emizeX}.|
|00003240| 0a 09 5c 69 74 65 6d 58 | 20 7b 44 65 74 65 72 6d |..\itemX| {Determ|
|00003250| 69 6e 65 20 74 68 65 20 | 62 61 73 69 63 20 5c 75 |ine the |basic \u|
|00003260| 6e 64 65 72 6c 69 6e 65 | 7b 5c 65 6d 20 70 61 72 |nderline|{\em par|
|00003270| 74 69 74 69 6f 6e 69 6e | 67 7d 2e 7d 0a 5c 69 6e |titionin|g}.}.\in|
|00003280| 64 65 78 41 7b 70 61 72 | 74 69 74 69 6f 6e 69 6e |dexA{par|titionin|
|00003290| 67 20 6f 66 20 64 61 74 | 61 20 73 74 72 75 63 74 |g of dat|a struct|
|000032a0| 75 72 65 73 7d 0a 0a 09 | 4d 6f 73 74 20 6f 66 20 |ures}...|Most of |
|000032b0| 79 6f 75 72 20 6d 61 6a | 6f 72 20 64 61 74 61 20 |your maj|or data |
|000032c0| 73 74 72 75 63 74 75 72 | 65 73 20 77 69 6c 6c 20 |structur|es will |
|000032d0| 62 65 20 62 72 6f 6b 65 | 6e 20 75 70 20 61 6e 64 |be broke|n up and|
|000032e0| 20 64 69 73 74 72 69 62 | 75 74 65 64 0a 09 61 6d | distrib|uted..am|
|000032f0| 6f 6e 67 20 74 68 65 20 | 65 6e 76 69 72 6f 6e 6d |ong the |environm|
|00003300| 65 6e 74 73 20 69 6e 20 | 74 68 65 20 73 74 72 75 |ents in |the stru|
|00003310| 63 74 75 72 65 20 6f 66 | 20 65 6e 76 69 72 6f 6e |cture of| environ|
|00003320| 6d 65 6e 74 73 20 74 68 | 61 74 20 79 6f 75 0a 09 |ments th|at you..|
|00003330| 73 70 65 63 69 66 69 65 | 64 2e 20 20 46 6f 72 20 |specifie|d. For |
|00003340| 65 78 61 6d 70 6c 65 2c | 20 69 66 20 79 6f 75 20 |example,| if you |
|00003350| 68 61 76 65 20 61 6e 20 | 24 4e 24 20 62 79 20 24 |have an |$N$ by $|
|00003360| 4e 24 0a 09 61 72 72 61 | 79 20 6e 61 6d 65 64 20 |N$..arra|y named |
|00003370| 24 41 24 20 74 6f 20 62 | 65 20 64 69 73 74 72 69 |$A$ to b|e distri|
|00003380| 62 75 74 65 64 20 74 6f | 20 61 20 73 74 72 75 63 |buted to| a struc|
|00003390| 74 75 72 65 20 6f 66 20 | 65 6e 76 69 72 6f 6e 6d |ture of |environm|
|000033a0| 65 6e 74 73 0a 09 6e 61 | 6d 65 64 20 60 60 6e 6f |ents..na|med ``no|
|000033b0| 64 65 27 27 20 77 68 69 | 63 68 20 69 73 20 61 20 |de'' whi|ch is a |
|000033c0| 76 65 63 74 6f 72 20 6f | 66 20 73 69 7a 65 20 24 |vector o|f size $|
|000033d0| 4e 24 20 79 6f 75 20 6d | 69 67 68 74 20 77 61 6e |N$ you m|ight wan|
|000033e0| 74 20 74 6f 20 74 68 69 | 6e 6b 0a 09 6f 66 20 70 |t to thi|nk..of p|
|000033f0| 75 74 74 69 6e 67 20 6f | 6e 65 20 72 6f 77 20 6f |utting o|ne row o|
|00003400| 6e 20 65 61 63 68 20 65 | 6e 76 69 72 6f 6e 6d 65 |n each e|nvironme|
|00003410| 6e 74 20 73 6f 20 74 68 | 61 74 20 24 41 5b 30 5d |nt so th|at $A[0]|
|00003420| 5b 5d 24 20 69 73 20 6f | 6e 20 6e 6f 64 65 5b 30 |[]$ is o|n node[0|
|00003430| 5d 2e 0a 09 49 74 20 69 | 73 20 75 73 65 66 75 6c |]...It i|s useful|
|00003440| 20 74 6f 20 74 68 69 6e | 6b 20 6f 66 20 6e 6f 64 | to thin|k of nod|
|00003450| 65 5b 30 5d 20 61 73 20 | 74 68 65 20 6f 77 6e 65 |e[0] as |the owne|
|00003460| 72 20 6f 66 20 24 41 5b | 30 5d 5b 5d 24 20 6f 72 |r of $A[|0][]$ or|
|00003470| 20 6f 66 0a 09 6e 6f 64 | 65 5b 30 5d 20 61 73 20 | of..nod|e[0] as |
|00003480| 62 65 69 6e 67 20 74 68 | 65 20 68 6f 6d 65 20 6f |being th|e home o|
|00003490| 66 20 24 41 5b 30 5d 5b | 5d 24 2e 0a 0a 09 5c 69 |f $A[0][|]$....\i|
|000034a0| 74 65 6d 58 20 7b 44 65 | 74 65 72 6d 69 6e 65 20 |temX {De|termine |
|000034b0| 61 6e 79 20 5c 75 6e 64 | 65 72 6c 69 6e 65 7b 5c |any \und|erline{\|
|000034c0| 65 6d 20 72 65 70 6c 69 | 63 61 74 69 6f 6e 7d 2e |em repli|cation}.|
|000034d0| 7d 0a 5c 69 6e 64 65 78 | 41 7b 72 65 70 6c 69 63 |}.\index|A{replic|
|000034e0| 61 74 69 6f 6e 20 6f 66 | 20 64 61 74 61 20 73 74 |ation of| data st|
|000034f0| 72 75 63 74 75 72 65 73 | 7d 0a 0a 09 49 6e 20 73 |ructures|}...In s|
|00003500| 6f 6d 65 20 63 61 73 65 | 73 2c 20 79 6f 75 20 77 |ome case|s, you w|
|00003510| 69 6c 6c 20 77 61 6e 74 | 20 74 6f 20 68 61 76 65 |ill want| to have|
|00003520| 20 74 68 65 20 73 61 6d | 65 20 64 61 74 61 20 73 | the sam|e data s|
|00003530| 74 72 75 63 74 75 72 65 | 20 63 6f 70 69 65 64 0a |tructure| copied.|
|00003540| 09 28 72 65 70 6c 69 63 | 61 74 65 64 29 20 6f 6e |.(replic|ated) on|
|00003550| 20 61 6c 6c 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 | all env|ironment|
|00003560| 73 20 69 6e 20 61 20 73 | 74 72 75 63 74 75 72 65 |s in a s|tructure|
|00003570| 20 6f 66 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 | of envi|ronments|
|00003580| 2e 0a 09 59 6f 75 20 77 | 69 6c 6c 20 77 61 6e 74 |...You w|ill want|
|00003590| 20 74 6f 20 64 6f 20 74 | 68 65 73 65 20 77 68 65 | to do t|hese whe|
|000035a0| 6e 20 65 76 65 72 79 20 | 65 6e 76 69 72 6f 6e 6d |n every |environm|
|000035b0| 65 6e 74 20 6e 65 65 64 | 73 20 61 63 63 65 73 73 |ent need|s access|
|000035c0| 20 74 6f 20 74 68 65 0a | 09 73 61 6d 65 20 76 61 | to the.|.same va|
|000035d0| 6c 75 65 73 2e 0a 09 57 | 68 69 6c 65 20 79 6f 75 |lues...W|hile you|
|000035e0| 20 63 61 6e 20 74 68 69 | 6e 6b 20 6f 66 20 74 68 | can thi|nk of th|
|000035f0| 69 73 20 61 73 20 60 60 | 70 61 72 74 69 74 69 6f |is as ``|partitio|
|00003600| 6e 69 6e 67 27 27 20 74 | 68 65 20 64 61 74 61 20 |ning'' t|he data |
|00003610| 73 74 72 75 63 74 75 72 | 65 0a 09 73 6f 20 74 68 |structur|e..so th|
|00003620| 61 74 20 74 68 65 20 77 | 68 6f 6c 65 20 74 68 69 |at the w|hole thi|
|00003630| 6e 67 20 67 6f 65 73 20 | 74 6f 20 74 68 65 20 66 |ng goes |to the f|
|00003640| 69 72 73 74 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |irst env|ironment|
|00003650| 2c 20 74 68 65 6e 20 70 | 6c 61 63 69 6e 67 0a 09 |, then p|lacing..|
|00003660| 63 6f 6d 70 6c 65 74 65 | 20 60 60 63 6f 70 69 65 |complete| ``copie|
|00003670| 73 27 27 5c 69 6e 64 65 | 78 42 7b 63 6f 70 79 20 |s''\inde|xB{copy |
|00003680| 64 61 74 61 7d 7b 61 73 | 20 6f 70 70 6f 73 65 64 |data}{as| opposed|
|00003690| 20 74 6f 20 72 65 70 6c | 69 63 61 74 69 6f 6e 7d | to repl|ication}|
|000036a0| 0a 09 6f 6e 20 61 6c 6c | 20 74 68 65 20 6f 74 68 |..on all| the oth|
|000036b0| 65 72 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 73 20 |er envir|onments |
|000036c0| 28 73 65 65 20 74 68 65 | 20 6e 65 78 74 0a 09 70 |(see the| next..p|
|000036d0| 6f 69 6e 74 29 2c 20 69 | 74 20 69 73 20 63 6f 6e |oint), i|t is con|
|000036e0| 66 75 73 69 6e 67 20 74 | 6f 20 76 69 65 77 20 69 |fusing t|o view i|
|000036f0| 74 20 74 68 69 73 20 77 | 61 79 20 28 74 68 69 73 |t this w|ay (this|
|00003700| 20 69 73 20 68 6f 77 20 | 69 74 20 69 73 0a 09 61 | is how |it is..a|
|00003710| 63 74 75 61 6c 6c 79 20 | 69 6d 70 6c 65 6d 65 6e |ctually |implemen|
|00003720| 74 65 64 29 2e 20 20 49 | 6e 73 74 65 61 64 2c 20 |ted). I|nstead, |
|00003730| 74 68 69 6e 6b 20 6f 66 | 20 74 68 65 73 65 20 64 |think of| these d|
|00003740| 61 74 61 20 73 74 72 75 | 63 74 75 72 65 73 20 61 |ata stru|ctures a|
|00003750| 73 0a 09 73 69 6d 70 6c | 79 20 72 65 70 6c 69 63 |s..simpl|y replic|
|00003760| 61 74 65 64 20 65 76 65 | 72 79 77 68 65 72 65 2e |ated eve|rywhere.|
|00003770| 0a 0a 09 5c 69 74 65 6d | 58 20 7b 44 65 74 65 72 |...\item|X {Deter|
|00003780| 6d 69 6e 65 20 77 68 65 | 72 65 20 61 6e 79 20 5c |mine whe|re any \|
|00003790| 75 6e 64 65 72 6c 69 6e | 65 7b 5c 65 6d 20 63 6f |underlin|e{\em co|
|000037a0| 70 69 65 73 7d 0a 09 28 | 75 73 65 64 20 66 6f 72 |pies}..(|used for|
|000037b0| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 29 20 | communi|cation) |
|000037c0| 67 6f 2e 7d 0a 5c 69 6e | 64 65 78 41 7b 63 6f 70 |go.}.\in|dexA{cop|
|000037d0| 69 65 73 20 69 6e 20 64 | 69 73 74 72 69 62 75 74 |ies in d|istribut|
|000037e0| 65 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |ed data |structur|
|000037f0| 65 73 7d 0a 0a 09 46 69 | 6e 61 6c 6c 79 2c 20 79 |es}...Fi|nally, y|
|00003800| 6f 75 20 6d 61 79 20 77 | 61 6e 74 20 74 6f 20 64 |ou may w|ant to d|
|00003810| 65 74 65 72 6d 69 6e 65 | 20 74 68 61 74 20 63 6f |etermine| that co|
|00003820| 70 69 65 73 20 6f 66 20 | 70 61 72 74 73 20 6f 66 |pies of |parts of|
|00003830| 20 74 68 65 20 64 61 74 | 61 0a 09 73 74 72 75 63 | the dat|a..struc|
|00003840| 74 75 72 65 0a 09 73 68 | 6f 75 6c 64 20 62 65 20 |ture..sh|ould be |
|00003850| 6f 6e 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 73 20 |on envir|onments |
|00003860| 6f 74 68 65 72 20 74 68 | 61 6e 20 74 68 65 20 60 |other th|an the `|
|00003870| 60 68 6f 6d 65 27 27 0a | 09 65 6e 76 69 72 6f 6e |`home''.|.environ|
|00003880| 6d 65 6e 74 5c 69 6e 64 | 65 78 41 7b 68 6f 6d 65 |ment\ind|exA{home|
|00003890| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 7d 20 66 6f | environ|ment} fo|
|000038a0| 72 20 74 68 61 74 20 70 | 61 72 74 0a 09 6f 66 20 |r that p|art..of |
|000038b0| 79 6f 75 72 20 64 61 74 | 61 20 73 74 72 75 63 74 |your dat|a struct|
|000038c0| 75 72 65 2e 0a 09 54 68 | 65 73 65 20 63 6f 70 69 |ure...Th|ese copi|
|000038d0| 65 73 20 77 69 6c 6c 20 | 62 65 20 75 73 65 64 20 |es will |be used |
|000038e0| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 74 68 61 74 |to indic|ate that|
|000038f0| 20 79 6f 75 20 77 69 6c | 6c 20 63 6f 6d 6d 75 6e | you wil|l commun|
|00003900| 69 63 61 74 65 0a 09 76 | 61 6c 75 65 73 20 66 6f |icate..v|alues fo|
|00003910| 72 20 74 68 69 73 20 64 | 61 74 61 20 66 72 6f 6d |r this d|ata from|
|00003920| 20 74 68 65 20 22 68 6f | 6d 65 22 20 65 6e 76 69 | the "ho|me" envi|
|00003930| 72 6f 6e 6d 65 6e 74 73 | 20 74 6f 20 74 68 65 0a |ronments| to the.|
|00003940| 09 65 6e 76 69 72 6f 6e | 6d 65 6e 74 73 20 77 68 |.environ|ments wh|
|00003950| 65 72 65 20 74 68 65 20 | 63 6f 70 69 65 73 20 61 |ere the |copies a|
|00003960| 72 65 2e 0a 09 54 68 65 | 20 65 6e 76 69 72 6f 6e |re...The| environ|
|00003970| 6d 65 6e 74 73 20 69 6e | 20 77 68 69 63 68 20 74 |ments in| which t|
|00003980| 68 69 73 20 63 6f 70 69 | 65 64 20 64 61 74 61 20 |his copi|ed data |
|00003990| 69 73 0a 09 70 6c 61 63 | 65 64 20 61 72 65 20 72 |is..plac|ed are r|
|000039a0| 65 66 65 72 72 65 64 20 | 74 6f 20 61 73 20 60 60 |eferred |to as ``|
|000039b0| 63 6f 70 79 27 27 0a 09 | 65 6e 76 69 72 6f 6e 6d |copy''..|environm|
|000039c0| 65 6e 74 73 2e 5c 69 6e | 64 65 78 42 7b 64 69 73 |ents.\in|dexB{dis|
|000039d0| 74 72 69 62 75 74 65 64 | 20 64 61 74 61 7d 7b 63 |tributed| data}{c|
|000039e0| 6f 70 79 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 7d |opy envi|ronment}|
|000039f0| 0a 09 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 |..For ex|ample, i|
|00003a00| 66 20 79 6f 75 20 68 61 | 76 65 20 62 72 6f 6b 65 |f you ha|ve broke|
|00003a10| 6e 20 61 20 32 44 20 61 | 72 72 61 79 0a 09 75 70 |n a 2D a|rray..up|
|00003a20| 20 62 79 20 63 6f 6c 75 | 6d 6e 73 2c 20 65 61 63 | by colu|mns, eac|
|00003a30| 68 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 6d 69 |h enviro|nment mi|
|00003a40| 67 68 74 20 6e 65 65 64 | 20 74 68 65 20 76 61 6c |ght need| the val|
|00003a50| 75 65 73 20 66 72 6f 6d | 20 74 68 65 0a 09 6e 65 |ues from| the..ne|
|00003a60| 69 67 68 62 6f 72 69 6e | 67 20 63 6f 6c 75 6d 6e |ighborin|g column|
|00003a70| 73 20 74 6f 20 64 6f 20 | 69 74 73 20 63 6f 6d 70 |s to do |its comp|
|00003a80| 75 74 61 74 69 6f 6e 73 | 2e 20 20 49 6e 20 74 68 |utations|. In th|
|00003a90| 69 73 20 63 61 73 65 2c | 20 79 6f 75 20 77 6f 75 |is case,| you wou|
|00003aa0| 6c 64 0a 09 77 61 6e 74 | 20 61 20 63 6f 70 79 20 |ld..want| a copy |
|00003ab0| 6f 66 20 65 61 63 68 20 | 63 6f 6c 75 6d 6e 20 74 |of each |column t|
|00003ac0| 6f 20 62 65 20 6f 6e 20 | 74 68 65 20 65 6e 76 69 |o be on |the envi|
|00003ad0| 72 6f 6e 6d 65 6e 74 73 | 20 74 6f 20 74 68 65 20 |ronments| to the |
|00003ae0| 60 60 72 69 67 68 74 27 | 27 0a 09 61 6e 64 20 74 |``right'|'..and t|
|00003af0| 68 65 20 60 60 6c 65 66 | 74 27 27 20 6f 66 20 74 |he ``lef|t'' of t|
|00003b00| 68 65 20 60 60 68 6f 6d | 65 27 27 20 65 6e 76 69 |he ``hom|e'' envi|
|00003b10| 72 6f 6e 6d 65 6e 74 20 | 66 6f 72 20 74 68 61 74 |ronment |for that|
|00003b20| 20 63 6f 6c 75 6d 6e 20 | 28 65 78 63 65 70 74 0a | column |(except.|
|00003b30| 09 66 6f 72 20 74 68 65 | 20 65 6e 64 20 63 6f 6c |.for the| end col|
|00003b40| 75 6d 6e 73 29 2e 0a 0a | 09 54 68 65 20 63 6f 6d |umns)...|.The com|
|00003b50| 70 69 6c 65 72 20 75 73 | 65 73 20 74 68 69 73 20 |piler us|es this |
|00003b60| 63 6f 70 79 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |copy inf|ormation|
|00003b70| 20 74 6f 20 73 69 6d 70 | 6c 69 66 79 20 63 6f 6d | to simp|lify com|
|00003b80| 6d 75 6e 69 63 61 74 69 | 6f 6e 73 2e 0a 09 57 68 |municati|ons...Wh|
|00003b90| 65 6e 20 79 6f 75 20 74 | 65 6c 6c 20 5c 64 69 6e |en you t|ell \din|
|00003ba0| 6f 5c 20 74 6f 20 60 60 | 73 65 6e 64 27 27 5c 69 |o\ to ``|send''\i|
|00003bb0| 6e 64 65 78 41 7b 73 65 | 6e 64 73 7d 20 74 68 65 |ndexA{se|nds} the|
|00003bc0| 20 60 60 68 6f 6d 65 27 | 27 20 63 6f 6c 75 6d 6e | ``home'|' column|
|00003bd0| 2c 0a 09 69 74 20 6b 6e | 6f 77 73 20 74 6f 20 73 |,..it kn|ows to s|
|00003be0| 65 6e 64 0a 09 69 74 20 | 74 6f 20 74 68 65 20 65 |end..it |to the e|
|00003bf0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 73 20 77 68 65 72 |nvironme|nts wher|
|00003c00| 65 20 63 6f 70 69 65 73 | 20 65 78 69 73 74 2e 20 |e copies| exist. |
|00003c10| 20 57 68 65 6e 20 79 6f | 75 20 74 65 6c 6c 20 5c | When yo|u tell \|
|00003c20| 64 69 6e 6f 5c 20 74 6f | 0a 09 60 60 72 65 63 65 |dino\ to|..``rece|
|00003c30| 69 76 65 27 27 5c 69 6e | 64 65 78 41 7b 72 65 63 |ive''\in|dexA{rec|
|00003c40| 65 69 76 65 73 7d 20 61 | 20 60 60 63 6f 70 79 27 |eives} a| ``copy'|
|00003c50| 27 20 63 6f 6c 75 6d 6e | 2c 20 69 74 20 6b 6e 6f |' column|, it kno|
|00003c60| 77 73 20 77 68 61 74 0a | 09 65 6e 76 69 72 6f 6e |ws what.|.environ|
|00003c70| 6d 65 6e 74 20 74 6f 20 | 72 65 63 65 69 76 65 0a |ment to |receive.|
|00003c80| 09 69 74 20 66 72 6f 6d | 2e 20 20 28 54 68 65 20 |.it from|. (The |
|00003c90| 63 6f 6d 70 69 6c 65 72 | 20 61 6c 73 6f 20 63 72 |compiler| also cr|
|00003ca0| 65 61 74 65 73 20 70 65 | 72 6d 61 6e 65 6e 74 20 |eates pe|rmanent |
|00003cb0| 73 74 6f 72 61 67 65 20 | 66 6f 72 20 61 6e 79 20 |storage |for any |
|00003cc0| 60 60 63 6f 70 79 27 27 | 0a 09 64 61 74 61 20 6f |``copy''|..data o|
|00003cd0| 6e 20 61 6e 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |n an env|ironment|
|00003ce0| 2c 20 61 20 66 61 63 74 | 20 79 6f 75 20 6d 61 79 |, a fact| you may|
|00003cf0| 20 66 69 6e 64 20 69 6d | 70 6f 72 74 61 6e 74 20 | find im|portant |
|00003d00| 69 66 20 79 6f 75 20 68 | 61 76 65 20 76 65 72 79 |if you h|ave very|
|00003d10| 0a 09 6c 61 72 67 65 20 | 64 61 74 61 20 73 74 72 |..large |data str|
|00003d20| 75 63 74 75 72 65 73 2e | 29 0a 0a 09 5c 65 6e 64 |uctures.|)...\end|
|00003d30| 7b 69 74 65 6d 69 7a 65 | 58 7d 0a 5c 6e 6f 69 6e |{itemize|X}.\noin|
|00003d40| 64 65 6e 74 0a 54 68 65 | 20 6d 65 63 68 61 6e 69 |dent.The| mechani|
|00003d50| 63 73 20 6f 66 20 73 70 | 65 63 69 66 79 69 6e 67 |cs of sp|ecifying|
|00003d60| 20 74 68 69 73 20 74 6f | 20 5c 64 69 6e 6f 5c 20 | this to| \dino\ |
|00003d70| 61 72 65 20 75 73 75 61 | 6c 6c 79 20 73 69 6d 70 |are usua|lly simp|
|00003d80| 6c 65 2e 20 20 54 68 65 | 72 65 20 61 72 65 20 61 |le. The|re are a|
|00003d90| 0a 66 61 69 72 20 6e 75 | 6d 62 65 72 20 6f 66 20 |.fair nu|mber of |
|00003da0| 70 72 65 64 65 66 69 6e | 65 64 20 6d 61 70 70 69 |predefin|ed mappi|
|00003db0| 6e 67 73 5c 69 6e 64 65 | 78 42 7b 6d 61 70 70 69 |ngs\inde|xB{mappi|
|00003dc0| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 73 7d 7b 70 72 |ng funct|ions}{pr|
|00003dd0| 65 64 65 66 69 6e 65 64 | 7d 0a 69 6e 20 74 68 65 |edefined|}.in the|
|00003de0| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 0a 60 60 | include| file.``|
|00003df0| 64 69 6e 6f 2e 68 27 27 | 2e 5c 69 6e 64 65 78 41 |dino.h''|.\indexA|
|00003e00| 7b 64 69 6e 6f 2e 68 20 | 28 69 6e 63 6c 75 64 65 |{dino.h |(include|
|00003e10| 20 66 69 6c 65 20 66 6f | 72 20 70 72 65 64 65 66 | file fo|r predef|
|00003e20| 69 6e 65 64 20 6d 61 70 | 70 69 6e 67 73 29 7d 0a |ined map|pings)}.|
|00003e30| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 5c 62 6f |For exam|ple, \bo|
|00003e40| 6c 64 7b 42 6c 6f 63 6b | 7d 0a 70 75 74 73 20 65 |ld{Block|}.puts e|
|00003e50| 61 63 68 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 61 |ach elem|ent of a|
|00003e60| 20 76 65 63 74 6f 72 20 | 6f 6e 20 61 6e 20 65 6e | vector |on an en|
|00003e70| 76 69 72 6f 6e 6d 65 6e | 74 20 69 6e 20 61 20 76 |vironmen|t in a v|
|00003e80| 65 63 74 6f 72 20 6f 66 | 20 65 6e 76 69 72 6f 6e |ector of| environ|
|00003e90| 6d 65 6e 74 73 0a 28 61 | 73 73 75 6d 69 6e 67 20 |ments.(a|ssuming |
|00003ea0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 65 6c |the numb|er of el|
|00003eb0| 65 6d 65 6e 74 73 20 65 | 71 75 61 6c 73 20 74 68 |ements e|quals th|
|00003ec0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 65 6e 76 69 |e number| of envi|
|00003ed0| 72 6f 6e 6d 65 6e 74 73 | 29 2e 0a 54 68 65 20 6d |ronments|)..The m|
|00003ee0| 61 70 70 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 20 |apping f|unction |
|00003ef0| 5c 62 6f 6c 64 7b 61 6c | 6c 7d 20 72 65 70 6c 69 |\bold{al|l} repli|
|00003f00| 63 61 74 65 73 20 61 20 | 64 61 74 61 20 73 74 72 |cates a |data str|
|00003f10| 75 63 74 75 72 65 20 6f | 6e 20 65 61 63 68 20 65 |ucture o|n each e|
|00003f20| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2e 0a 5c 62 6f 6c |nvironme|nt..\bol|
|00003f30| 64 7b 42 6c 6f 63 6b 4f | 76 65 72 6c 61 70 7d 0a |d{BlockO|verlap}.|
|00003f40| 70 75 74 73 20 65 61 63 | 68 20 65 6c 65 6d 65 6e |puts eac|h elemen|
|00003f50| 74 20 6f 66 20 61 20 76 | 65 63 74 6f 72 20 6f 6e |t of a v|ector on|
|00003f60| 20 61 6e 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 | an envi|ronment |
|00003f70| 69 6e 20 61 20 76 65 63 | 74 6f 72 20 6f 66 20 65 |in a vec|tor of e|
|00003f80| 6e 76 69 72 6f 6e 6d 65 | 6e 74 73 0a 61 6e 64 20 |nvironme|nts.and |
|00003f90| 61 20 63 6f 70 79 20 6f | 66 20 65 61 63 68 20 65 |a copy o|f each e|
|00003fa0| 6c 65 6d 65 6e 74 20 6f | 6e 20 74 68 65 20 74 77 |lement o|n the tw|
|00003fb0| 6f 20 6e 65 69 67 68 62 | 6f 72 69 6e 67 20 65 6e |o neighb|oring en|
|00003fc0| 76 69 72 6f 6e 6d 65 6e | 74 73 20 28 65 78 63 65 |vironmen|ts (exce|
|00003fd0| 70 74 20 66 6f 72 0a 74 | 68 65 20 65 64 67 65 73 |pt for.t|he edges|
|00003fe0| 29 2e 20 20 59 6f 75 20 | 73 69 6d 70 6c 79 20 75 |). You |simply u|
|00003ff0| 73 65 20 74 68 65 20 6f | 6e 65 20 6f 66 20 74 68 |se the o|ne of th|
|00004000| 65 73 65 20 74 68 61 74 | 20 66 69 74 73 20 79 6f |ese that| fits yo|
|00004010| 75 72 20 73 69 74 75 61 | 74 69 6f 6e 2e 0a 49 66 |ur situa|tion..If|
|00004020| 20 79 6f 75 20 68 61 76 | 65 20 74 6f 2c 20 79 6f | you hav|e to, yo|
|00004030| 75 20 63 61 6e 20 62 75 | 69 6c 64 20 79 6f 75 72 |u can bu|ild your|
|00004040| 20 6f 77 6e 0a 6d 61 70 | 70 69 6e 67 73 5c 69 6e | own.map|pings\in|
|00004050| 64 65 78 42 7b 6d 61 70 | 70 69 6e 67 20 66 75 6e |dexB{map|ping fun|
|00004060| 63 74 69 6f 6e 73 7d 7b | 75 73 65 72 20 64 65 66 |ctions}{|user def|
|00004070| 69 6e 65 64 7d 20 28 69 | 6e 66 6f 72 6d 61 74 69 |ined} (i|nformati|
|00004080| 6f 6e 20 6f 6e 20 74 68 | 69 73 0a 70 72 6f 63 65 |on on th|is.proce|
|00004090| 73 73 20 63 61 6e 20 62 | 65 20 66 6f 75 6e 64 20 |ss can b|e found |
|000040a0| 69 6e 20 53 65 63 74 69 | 6f 6e 7e 5c 72 65 66 7b |in Secti|on~\ref{|
|000040b0| 6d 61 70 70 69 6e 67 20 | 64 65 66 69 6e 69 74 69 |mapping |definiti|
|000040c0| 6f 6e 7d 29 2e 0a 09 0a | 5c 69 74 65 6d 58 20 7b |on})....|\itemX {|
|000040d0| 53 74 65 70 20 33 20 2d | 2d 2d 20 57 72 69 74 65 |Step 3 -|-- Write|
|000040e0| 20 61 20 5c 75 6e 64 65 | 72 6c 69 6e 65 7b 5c 65 | a \unde|rline{\e|
|000040f0| 6d 20 63 6f 6d 70 6f 73 | 69 74 65 20 70 72 6f 63 |m compos|ite proc|
|00004100| 65 64 75 72 65 7d 20 74 | 6f 20 69 6d 70 6c 65 6d |edure} t|o implem|
|00004110| 65 6e 74 0a 63 6f 6d 70 | 75 74 61 74 69 6f 6e 20 |ent.comp|utation |
|00004120| 69 6e 20 74 68 65 20 73 | 74 72 75 63 74 75 72 65 |in the s|tructure|
|00004130| 20 6f 66 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 | of envi|ronments|
|00004140| 2e 7d 0a 5c 69 6e 64 65 | 78 42 7b 4f 76 65 72 76 |.}.\inde|xB{Overv|
|00004150| 69 65 77 20 6f 66 20 44 | 49 4e 4f 7d 7b 63 6f 6d |iew of D|INO}{com|
|00004160| 70 6f 73 69 74 65 20 70 | 72 6f 63 65 64 75 72 65 |posite p|rocedure|
|00004170| 73 7d 0a 0a 44 65 74 65 | 72 6d 69 6e 65 20 77 68 |s}..Dete|rmine wh|
|00004180| 61 74 20 63 6f 6d 70 75 | 74 61 74 69 6f 6e 73 20 |at compu|tations |
|00004190| 77 69 6c 6c 20 74 61 6b | 65 20 70 6c 61 63 65 20 |will tak|e place |
|000041a0| 69 6e 20 61 6e 20 65 6e | 76 69 72 6f 6e 6d 65 6e |in an en|vironmen|
|000041b0| 74 2e 20 20 54 68 65 0a | 63 6f 64 65 20 73 68 6f |t. The.|code sho|
|000041c0| 75 6c 64 20 62 65 20 77 | 72 69 74 74 65 6e 20 66 |uld be w|ritten f|
|000041d0| 6f 72 20 6f 6e 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |or one e|nvironme|
|000041e0| 6e 74 2e 20 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |nt. Thi|s means |
|000041f0| 74 68 61 74 20 79 6f 75 | 20 6d 75 73 74 20 68 61 |that you| must ha|
|00004200| 76 65 0a 73 6f 6d 65 20 | 77 61 79 20 6f 66 20 69 |ve.some |way of i|
|00004210| 64 65 6e 74 69 66 79 69 | 6e 67 20 74 68 65 20 70 |dentifyi|ng the p|
|00004220| 61 72 74 69 63 75 6c 61 | 72 20 65 6e 76 69 72 6f |articula|r enviro|
|00004230| 6e 6d 65 6e 74 20 79 6f | 75 72 20 63 6f 64 65 20 |nment yo|ur code |
|00004240| 69 73 20 65 78 65 63 75 | 74 69 6e 67 0a 6f 6e 2e |is execu|ting.on.|
|00004250| 20 20 54 68 61 74 20 69 | 73 20 74 68 65 20 66 75 | That i|s the fu|
|00004260| 6e 63 74 69 6f 6e 20 6f | 66 20 74 68 65 20 69 64 |nction o|f the id|
|00004270| 65 6e 74 69 66 69 65 72 | 73 20 69 6e 20 74 68 65 |entifier|s in the|
|00004280| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 66 6f | declara|tions fo|
|00004290| 72 20 65 61 63 68 0a 6f | 66 20 74 68 65 20 65 6e |r each.o|f the en|
|000042a0| 76 69 72 6f 6e 6d 65 6e | 74 20 69 6e 64 69 63 65 |vironmen|t indice|
|000042b0| 73 2c 20 72 65 66 65 72 | 72 65 64 20 74 6f 20 69 |s, refer|red to i|
|000042c0| 6e 20 74 68 69 73 20 6d | 61 6e 75 61 6c 20 61 73 |n this m|anual as|
|000042d0| 0a 7b 5c 65 6d 20 65 6e | 76 69 72 6f 6e 6d 65 6e |.{\em en|vironmen|
|000042e0| 74 20 69 6e 64 65 78 20 | 69 64 65 6e 74 69 66 69 |t index |identifi|
|000042f0| 65 72 73 7d 2e 5c 69 6e | 64 65 78 41 7b 65 6e 76 |ers}.\in|dexA{env|
|00004300| 69 72 6f 6e 6d 65 6e 74 | 20 69 6e 64 65 78 20 69 |ironment| index i|
|00004310| 64 65 6e 74 69 66 69 65 | 72 73 7d 0a 46 6f 72 20 |dentifie|rs}.For |
|00004320| 65 78 61 6d 70 6c 65 2c | 20 69 66 20 74 68 65 20 |example,| if the |
|00004330| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 64 65 63 6c |environm|ent decl|
|00004340| 61 72 61 74 69 6f 6e 20 | 69 73 0a 60 60 7b 5c 74 |aration |is.``{\t|
|00004350| 74 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 6e 6f |t enviro|nment no|
|00004360| 64 65 5b 31 30 3a 69 64 | 5d 20 5c 7b 20 24 5c 63 |de[10:id|] \{ $\c|
|00004370| 64 6f 74 73 24 20 5c 7d | 7d 27 27 2c 0a 60 60 69 |dots$ \}|}'',.``i|
|00004380| 64 27 27 20 69 73 20 61 | 20 63 6f 6e 73 74 61 6e |d'' is a| constan|
|00004390| 74 20 74 68 61 74 20 63 | 6f 6e 74 61 69 6e 73 0a |t that c|ontains.|
|000043a0| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 68 |the numb|er of th|
|000043b0| 65 20 63 75 72 72 65 6e | 74 20 65 6e 76 69 72 6f |e curren|t enviro|
|000043c0| 6e 6d 65 6e 74 2e 0a 0a | 59 6f 75 20 63 61 6e 20 |nment...|You can |
|000043d0| 63 6f 6e 63 65 70 74 75 | 61 6c 6c 79 20 62 72 65 |conceptu|ally bre|
|000043e0| 61 6b 20 77 72 69 74 69 | 6e 67 20 61 20 63 6f 6d |ak writi|ng a com|
|000043f0| 70 6f 73 69 74 65 20 70 | 72 6f 63 65 64 75 72 65 |posite p|rocedure|
|00004400| 20 64 6f 77 6e 20 69 6e | 74 6f 20 74 68 72 65 65 | down in|to three|
|00004410| 0a 60 60 73 74 65 70 73 | 27 27 3a 0a 0a 09 5c 62 |.``steps|'':...\b|
|00004420| 65 67 69 6e 7b 69 74 65 | 6d 69 7a 65 58 7d 0a 0a |egin{ite|mizeX}..|
|00004430| 09 5c 69 74 65 6d 58 20 | 7b 57 72 69 74 65 20 74 |.\itemX |{Write t|
|00004440| 68 65 20 63 6f 64 65 20 | 66 6f 72 20 74 68 65 20 |he code |for the |
|00004450| 5c 75 6e 64 65 72 6c 69 | 6e 65 7b 5c 65 6d 20 63 |\underli|ne{\em c|
|00004460| 6f 6d 70 75 74 61 74 69 | 6f 6e 7d 2e 7d 0a 0a 09 |omputati|on}.}...|
|00004470| 57 72 69 74 65 20 74 68 | 65 20 63 6f 64 65 20 66 |Write th|e code f|
|00004480| 6f 72 20 6f 6e 65 20 65 | 6e 76 69 72 6f 6e 6d 65 |or one e|nvironme|
|00004490| 6e 74 20 61 73 73 75 6d | 69 6e 67 20 74 68 61 74 |nt assum|ing that|
|000044a0| 20 61 6c 6c 20 74 68 65 | 0a 09 6e 65 63 65 73 73 | all the|..necess|
|000044b0| 61 72 79 20 64 61 74 61 | 20 69 73 20 61 76 61 69 |ary data| is avai|
|000044c0| 6c 61 62 6c 65 20 74 68 | 65 72 65 2e 0a 0a 09 5c |lable th|ere....\|
|000044d0| 69 74 65 6d 58 20 7b 49 | 6e 73 65 72 74 20 61 6e |itemX {I|nsert an|
|000044e0| 79 20 6e 65 63 65 73 73 | 61 72 79 20 5c 75 6e 64 |y necess|ary \und|
|000044f0| 65 72 6c 69 6e 65 7b 5c | 65 6d 20 72 65 63 65 69 |erline{\|em recei|
|00004500| 76 65 73 7d 2e 7d 0a 09 | 5c 69 6e 64 65 78 42 7b |ves}.}..|\indexB{|
|00004510| 6f 76 65 72 76 69 65 77 | 20 6f 66 20 44 49 4e 4f |overview| of DINO|
|00004520| 7d 7b 72 65 63 65 69 76 | 65 73 7d 0a 0a 09 49 66 |}{receiv|es}...If|
|00004530| 20 64 75 72 69 6e 67 20 | 74 68 65 20 63 6f 6d 70 | during |the comp|
|00004540| 75 74 61 74 69 6f 6e 2c | 20 79 6f 75 20 77 69 6c |utation,| you wil|
|00004550| 6c 20 6e 65 65 64 20 75 | 70 64 61 74 65 64 20 76 |l need u|pdated v|
|00004560| 61 6c 75 65 73 20 69 6e | 0a 09 74 68 65 20 64 61 |alues in|..the da|
|00004570| 74 61 20 74 68 61 74 20 | 69 73 20 60 60 63 6f 70 |ta that |is ``cop|
|00004580| 79 27 27 20 64 61 74 61 | 5c 69 6e 64 65 78 41 7b |y'' data|\indexA{|
|00004590| 63 6f 70 79 20 64 61 74 | 61 7d 20 6f 6e 20 74 68 |copy dat|a} on th|
|000045a0| 69 73 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2c 0a |is envir|onment,.|
|000045b0| 09 70 75 74 20 69 6e 20 | 72 65 63 65 69 76 65 73 |.put in |receives|
|000045c0| 0a 09 66 6f 72 20 74 68 | 61 74 20 64 61 74 61 2e |..for th|at data.|
|000045d0| 20 20 41 20 67 6f 6f 64 | 20 72 75 6c 65 20 6f 66 | A good| rule of|
|000045e0| 20 74 68 75 6d 62 20 69 | 73 20 74 6f 20 70 75 74 | thumb i|s to put|
|000045f0| 20 74 68 65 20 72 65 63 | 65 69 76 65 73 20 69 6e | the rec|eives in|
|00004600| 20 61 73 0a 09 6c 61 74 | 65 20 69 6e 20 74 68 65 | as..lat|e in the|
|00004610| 20 63 6f 6d 70 75 74 61 | 74 69 6f 6e 20 61 73 20 | computa|tion as |
|00004620| 70 6f 73 73 69 62 6c 65 | 2e 0a 09 41 20 73 65 63 |possible|...A sec|
|00004630| 6f 6e 64 20 72 75 6c 65 | 20 6f 66 20 74 68 75 6d |ond rule| of thum|
|00004640| 62 20 69 73 20 74 68 61 | 74 20 64 61 74 61 20 63 |b is tha|t data c|
|00004650| 6f 6d 6d 75 6e 69 63 61 | 74 65 64 20 62 65 74 77 |ommunica|ted betw|
|00004660| 65 65 6e 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 |een envi|ronments|
|00004670| 0a 09 73 68 6f 75 6c 64 | 20 62 65 20 73 65 6e 74 |..should| be sent|
|00004680| 20 61 6e 64 20 72 65 63 | 65 69 76 65 64 20 69 6e | and rec|eived in|
|00004690| 20 61 73 20 6c 61 72 67 | 65 20 62 6c 6f 63 6b 73 | as larg|e blocks|
|000046a0| 20 61 73 20 69 73 20 70 | 6f 73 73 69 62 6c 65 2e | as is p|ossible.|
|000046b0| 0a 09 4f 62 76 69 6f 75 | 73 6c 79 2c 20 74 68 65 |..Obviou|sly, the|
|000046c0| 73 65 20 74 77 6f 20 72 | 75 6c 65 73 20 73 6f 6d |se two r|ules som|
|000046d0| 65 74 69 6d 65 73 20 63 | 6f 6e 66 6c 69 63 74 2c |etimes c|onflict,|
|000046e0| 20 61 6e 64 20 79 6f 75 | 20 6d 75 73 74 20 64 65 | and you| must de|
|000046f0| 63 69 64 65 64 0a 09 77 | 68 61 74 20 74 68 65 20 |cided..w|hat the |
|00004700| 62 65 73 74 20 74 72 61 | 64 65 2d 6f 66 66 20 69 |best tra|de-off i|
|00004710| 73 2e 0a 0a 09 5c 69 74 | 65 6d 58 20 7b 49 6e 73 |s....\it|emX {Ins|
|00004720| 65 72 74 20 74 68 65 20 | 63 6f 72 72 65 73 70 6f |ert the |correspo|
|00004730| 6e 64 69 6e 67 20 5c 75 | 6e 64 65 72 6c 69 6e 65 |nding \u|nderline|
|00004740| 7b 5c 65 6d 20 73 65 6e | 64 73 7d 2e 7d 0a 09 5c |{\em sen|ds}.}..\|
|00004750| 69 6e 64 65 78 42 7b 6f | 76 65 72 76 69 65 77 20 |indexB{o|verview |
|00004760| 6f 66 20 44 49 4e 4f 7d | 7b 73 65 6e 64 73 7d 0a |of DINO}|{sends}.|
|00004770| 0a 09 46 69 6e 61 6c 6c | 79 2c 20 79 6f 75 20 68 |..Finall|y, you h|
|00004780| 61 76 65 20 74 6f 20 70 | 75 74 20 69 6e 20 73 65 |ave to p|ut in se|
|00004790| 6e 64 73 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |nds corr|espondin|
|000047a0| 67 20 74 6f 20 74 68 65 | 20 72 65 63 65 69 76 65 |g to the| receive|
|000047b0| 73 20 79 6f 75 0a 09 69 | 6e 73 65 72 74 65 64 20 |s you..i|nserted |
|000047c0| 69 6e 20 74 68 65 20 6c | 61 73 74 20 73 74 65 70 |in the l|ast step|
|000047d0| 2e 20 20 41 67 61 69 6e | 2c 20 61 20 67 6f 6f 64 |. Again|, a good|
|000047e0| 20 72 75 6c 65 20 6f 66 | 20 74 68 75 6d 62 20 69 | rule of| thumb i|
|000047f0| 73 20 74 6f 20 70 75 74 | 0a 09 74 68 65 20 73 65 |s to put|..the se|
|00004800| 6e 64 73 20 69 6e 20 61 | 73 20 65 61 72 6c 79 20 |nds in a|s early |
|00004810| 69 6e 20 74 68 65 20 63 | 6f 6d 70 75 74 61 74 69 |in the c|omputati|
|00004820| 6f 6e 20 61 73 20 70 6f | 73 73 69 62 6c 65 2c 20 |on as po|ssible, |
|00004830| 61 6e 64 20 74 6f 20 73 | 65 6e 64 0a 09 69 6e 20 |and to s|end..in |
|00004840| 62 6c 6f 63 6b 73 20 77 | 68 65 72 65 20 70 6f 73 |blocks w|here pos|
|00004850| 73 69 62 6c 65 2e 0a 0a | 09 5c 65 6e 64 7b 69 74 |sible...|.\end{it|
|00004860| 65 6d 69 7a 65 58 7d 0a | 0a 5c 6e 6f 69 6e 64 65 |emizeX}.|.\noinde|
|00004870| 6e 74 0a 57 68 65 6e 20 | 64 6f 69 6e 67 20 74 68 |nt.When |doing th|
|00004880| 65 73 65 20 73 74 65 70 | 73 2c 20 77 65 27 76 65 |ese step|s, we've|
|00004890| 20 66 6f 75 6e 64 20 74 | 68 61 74 20 69 74 27 73 | found t|hat it's|
|000048a0| 20 62 65 73 74 20 74 6f | 20 77 72 69 74 65 20 63 | best to| write c|
|000048b0| 6f 64 65 20 66 6f 72 20 | 74 68 65 0a 60 60 6d 69 |ode for |the.``mi|
|000048c0| 64 64 6c 65 27 27 20 66 | 69 72 73 74 2e 20 20 4d |ddle'' f|irst. M|
|000048d0| 6f 73 74 20 6f 66 20 74 | 68 65 20 63 6f 6d 70 6c |ost of t|he compl|
|000048e0| 69 63 61 74 69 6f 6e 73 | 20 69 6e 20 5c 64 69 6e |ications| in \din|
|000048f0| 6f 20 63 6f 64 65 20 6f | 63 63 75 72 20 61 74 20 |o code o|ccur at |
|00004900| 74 68 65 0a 60 60 65 64 | 67 65 73 2c 27 27 20 73 |the.``ed|ges,'' s|
|00004910| 6f 20 77 65 20 73 75 67 | 67 65 73 74 20 74 68 61 |o we sug|gest tha|
|00004920| 74 20 79 6f 75 20 77 72 | 69 74 65 20 63 6f 64 65 |t you wr|ite code|
|00004930| 20 66 6f 72 20 74 68 65 | 20 6d 69 64 64 6c 65 20 | for the| middle |
|00004940| 66 69 72 73 74 2e 20 20 | 54 68 65 6e 0a 6d 6f 64 |first. |Then.mod|
|00004950| 69 66 79 20 69 74 20 74 | 6f 20 74 61 6b 65 20 69 |ify it t|o take i|
|00004960| 6e 74 6f 20 61 63 63 6f | 75 6e 74 20 74 68 65 20 |nto acco|unt the |
|00004970| 65 78 74 72 61 20 63 6f | 6d 70 6c 69 63 61 74 69 |extra co|mplicati|
|00004980| 6f 6e 73 20 69 6e 74 72 | 6f 64 75 63 65 64 20 62 |ons intr|oduced b|
|00004990| 79 20 74 68 65 0a 65 64 | 67 65 20 63 6f 6e 64 69 |y the.ed|ge condi|
|000049a0| 74 69 6f 6e 73 2e 0a 0a | 57 65 20 6d 65 61 6e 20 |tions...|We mean |
|000049b0| 60 60 6d 69 64 64 6c 65 | 27 27 20 69 6e 20 74 77 |``middle|'' in tw|
|000049c0| 6f 20 73 65 6e 73 65 73 | 20 2d 2d 2d 20 73 70 61 |o senses| --- spa|
|000049d0| 74 69 61 6c 6c 79 20 61 | 6e 64 20 74 65 6d 70 6f |tially a|nd tempo|
|000049e0| 72 61 6c 6c 79 2e 0a 53 | 70 61 74 69 61 6c 6c 79 |rally..S|patially|
|000049f0| 20 6d 65 61 6e 73 20 74 | 68 65 20 6d 69 64 64 6c | means t|he middl|
|00004a00| 65 20 6f 66 20 79 6f 75 | 72 20 64 69 73 74 72 69 |e of you|r distri|
|00004a10| 62 75 74 65 64 20 64 61 | 74 61 20 73 74 72 75 63 |buted da|ta struc|
|00004a20| 74 75 72 65 73 2e 20 20 | 4f 66 74 65 6e 2c 0a 6d |tures. |Often,.m|
|00004a30| 6f 72 65 20 63 6f 6d 70 | 6c 69 63 61 74 65 64 20 |ore comp|licated |
|00004a40| 63 6f 64 65 20 68 61 73 | 20 74 6f 20 62 65 20 77 |code has| to be w|
|00004a50| 72 69 74 74 65 6e 20 66 | 6f 72 20 74 68 65 20 65 |ritten f|or the e|
|00004a60| 64 67 65 73 2c 20 66 6f | 72 20 6f 6e 65 20 6f 66 |dges, fo|r one of|
|00004a70| 20 74 68 65 0a 66 6f 6c | 6c 6f 77 69 6e 67 20 72 | the.fol|lowing r|
|00004a80| 65 61 73 6f 6e 73 3a 0a | 0a 5c 62 65 67 69 6e 7b |easons:.|.\begin{|
|00004a90| 65 6e 75 6d 65 72 61 74 | 65 7d 0a 0a 5c 69 74 65 |enumerat|e}..\ite|
|00004aa0| 6d 20 54 68 65 20 61 63 | 74 75 61 6c 20 65 64 67 |m The ac|tual edg|
|00004ab0| 65 20 6f 66 20 74 68 65 | 20 67 6c 6f 62 61 6c 20 |e of the| global |
|00004ac0| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 6d |data str|ucture m|
|00004ad0| 61 79 20 68 61 76 65 20 | 64 69 66 66 65 72 65 6e |ay have |differen|
|00004ae0| 74 0a 63 6f 6d 6d 75 6e | 69 63 61 74 69 6f 6e 20 |t.commun|ication |
|00004af0| 70 61 74 74 65 72 6e 73 | 20 74 68 61 6e 20 74 68 |patterns| than th|
|00004b00| 65 20 63 65 6e 74 72 61 | 6c 20 70 6f 72 74 69 6f |e centra|l portio|
|00004b10| 6e 73 2e 20 20 59 6f 75 | 72 20 63 6f 64 65 20 6d |ns. You|r code m|
|00004b20| 61 79 20 6e 65 65 64 20 | 74 6f 0a 72 65 66 6c 65 |ay need |to.refle|
|00004b30| 63 74 20 74 68 69 73 2e | 0a 0a 5c 69 74 65 6d 20 |ct this.|..\item |
|00004b40| 49 66 20 79 6f 75 20 62 | 6c 6f 63 6b 20 79 6f 75 |If you b|lock you|
|00004b50| 72 20 64 69 73 74 72 69 | 62 75 74 65 64 20 64 61 |r distri|buted da|
|00004b60| 74 61 20 28 70 75 74 20 | 6d 6f 72 65 20 74 68 61 |ta (put |more tha|
|00004b70| 6e 20 6f 6e 65 20 65 6c | 65 6d 65 6e 74 20 6f 6e |n one el|ement on|
|00004b80| 20 61 6e 0a 61 78 69 73 | 20 69 6e 20 61 6e 20 65 | an.axis| in an e|
|00004b90| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2c 29 20 74 68 65 |nvironme|nt,) the|
|00004ba0| 6e 20 74 68 65 6e 20 65 | 64 67 65 20 6f 66 20 74 |n then e|dge of t|
|00004bb0| 68 65 20 62 6c 6f 63 6b | 20 6f 6e 20 61 6e 20 65 |he block| on an e|
|00004bc0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 0a 6d 61 79 20 68 |nvironme|nt.may h|
|00004bd0| 61 76 65 20 74 6f 20 62 | 65 20 74 72 65 61 74 65 |ave to b|e treate|
|00004be0| 64 20 64 69 66 66 65 72 | 65 6e 74 6c 79 2e 0a 0a |d differ|ently...|
|00004bf0| 5c 65 6e 64 20 7b 65 6e | 75 6d 65 72 61 74 65 7d |\end {en|umerate}|
|00004c00| 0a 0a 54 65 6d 70 6f 72 | 61 6c 6c 79 20 6d 65 61 |..Tempor|ally mea|
|00004c10| 6e 73 20 74 68 61 74 20 | 74 68 65 20 66 69 72 73 |ns that |the firs|
|00004c20| 74 20 61 6e 64 20 6c 61 | 73 74 20 69 74 65 72 61 |t and la|st itera|
|00004c30| 74 69 6f 6e 73 20 6f 66 | 20 61 20 6c 6f 6f 70 20 |tions of| a loop |
|00004c40| 61 72 65 20 6f 66 74 65 | 6e 0a 64 69 66 66 65 72 |are ofte|n.differ|
|00004c50| 65 6e 74 20 74 68 61 6e | 20 74 68 65 20 6f 74 68 |ent than| the oth|
|00004c60| 65 72 73 2e 20 20 46 6f | 72 20 65 78 61 6d 70 6c |ers. Fo|r exampl|
|00004c70| 65 2c 20 5c 64 69 6e 6f | 5c 20 69 6e 69 74 69 61 |e, \dino|\ initia|
|00004c80| 6c 69 7a 65 73 20 63 6f | 70 79 20 64 61 74 61 20 |lizes co|py data |
|00004c90| 77 68 65 6e 0a 70 61 72 | 61 6d 65 74 65 72 73 20 |when.par|ameters |
|00004ca0| 61 72 65 20 64 69 73 74 | 72 69 62 75 74 65 64 2e |are dist|ributed.|
|00004cb0| 20 20 54 68 69 73 20 6d | 61 79 20 6d 65 61 6e 20 | This m|ay mean |
|00004cc0| 74 68 61 74 20 61 20 66 | 69 72 73 74 20 73 65 6e |that a f|irst sen|
|00004cd0| 64 2f 72 65 63 65 69 76 | 65 20 70 61 69 72 0a 69 |d/receiv|e pair.i|
|00004ce0| 73 20 75 6e 6e 65 63 65 | 73 73 61 72 79 2e 0a 0a |s unnece|ssary...|
|00004cf0| 5c 69 74 65 6d 58 20 7b | 53 74 65 70 20 34 20 2d |\itemX {|Step 4 -|
|00004d00| 2d 2d 20 46 69 6e 61 6c | 6c 79 2c 20 77 72 69 74 |-- Final|ly, writ|
|00004d10| 65 20 61 0a 5c 75 6e 64 | 65 72 6c 69 6e 65 7b 5c |e a.\und|erline{\|
|00004d20| 65 6d 20 68 6f 73 74 20 | 65 6e 76 69 72 6f 6e 6d |em host |environm|
|00004d30| 65 6e 74 7d 2c 5c 69 6e | 64 65 78 42 7b 6f 76 65 |ent},\in|dexB{ove|
|00004d40| 72 76 69 65 77 20 6f 66 | 20 44 49 4e 4f 7d 7b 68 |rview of| DINO}{h|
|00004d50| 6f 73 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 7d |ost envi|ronment}|
|00004d60| 0a 63 6f 6e 74 61 69 6e | 69 6e 67 20 61 0a 5c 75 |.contain|ing a.\u|
|00004d70| 6e 64 65 72 6c 69 6e 65 | 7b 5c 65 6d 20 6d 61 69 |nderline|{\em mai|
|00004d80| 6e 28 29 20 66 75 6e 63 | 74 69 6f 6e 7d 2c 5c 69 |n() func|tion},\i|
|00004d90| 6e 64 65 78 42 7b 6f 76 | 65 72 76 69 65 77 20 6f |ndexB{ov|erview o|
|00004da0| 66 20 44 49 4e 4f 7d 7b | 6d 61 69 6e 28 29 20 66 |f DINO}{|main() f|
|00004db0| 75 6e 63 74 69 6f 6e 7d | 0a 74 6f 20 69 6d 70 6c |unction}|.to impl|
|00004dc0| 65 6d 65 6e 74 20 63 6f | 6d 70 75 74 61 74 69 6f |ement co|mputatio|
|00004dd0| 6e 20 6f 6e 20 74 68 65 | 20 68 6f 73 74 20 65 6e |n on the| host en|
|00004de0| 76 69 72 6f 6e 6d 65 6e | 74 2e 7d 0a 0a 57 72 69 |vironmen|t.}..Wri|
|00004df0| 74 65 20 74 68 65 20 63 | 6f 64 65 20 74 68 61 74 |te the c|ode that|
|00004e00| 20 64 6f 65 73 20 61 6e | 79 20 69 6e 69 74 69 61 | does an|y initia|
|00004e10| 6c 69 7a 61 74 69 6f 6e | 2c 20 63 61 6c 6c 73 20 |lization|, calls |
|00004e20| 74 68 65 20 63 6f 6d 70 | 6f 73 69 74 65 0a 70 72 |the comp|osite.pr|
|00004e30| 6f 63 65 64 75 72 65 28 | 73 29 2c 20 61 6e 64 20 |ocedure(|s), and |
|00004e40| 70 72 6f 63 65 73 73 65 | 73 20 74 68 65 20 72 65 |processe|s the re|
|00004e50| 73 75 6c 74 73 20 66 72 | 6f 6d 20 74 68 65 20 63 |sults fr|om the c|
|00004e60| 6f 6d 70 6f 73 69 74 65 | 20 70 72 6f 63 65 64 75 |omposite| procedu|
|00004e70| 72 65 28 73 29 2e 0a 41 | 6c 6c 20 74 68 65 20 64 |re(s)..A|ll the d|
|00004e80| 61 74 61 20 75 73 65 64 | 20 62 79 20 63 6f 6d 70 |ata used| by comp|
|00004e90| 6f 73 69 74 65 20 70 72 | 6f 63 65 64 75 72 65 73 |osite pr|ocedures|
|00004ea0| 20 69 73 20 70 61 73 73 | 65 64 20 69 6e 20 61 73 | is pass|ed in as|
|00004eb0| 20 70 61 72 61 6d 65 74 | 65 72 73 20 74 6f 0a 74 | paramet|ers to.t|
|00004ec0| 68 65 73 65 20 70 72 6f | 63 65 64 75 72 65 73 2e |hese pro|cedures.|
|00004ed0| 20 20 5c 64 69 6e 6f 5c | 20 77 69 6c 6c 20 61 75 | \dino\| will au|
|00004ee0| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 64 69 73 74 |tomatica|lly dist|
|00004ef0| 72 69 62 75 74 65 20 74 | 68 69 73 20 64 61 74 61 |ribute t|his data|
|00004f00| 20 69 6e 20 74 68 65 0a | 6d 61 6e 6e 65 72 20 73 | in the.|manner s|
|00004f10| 70 65 63 69 66 69 65 64 | 20 62 79 20 79 6f 75 72 |pecified| by your|
|00004f20| 20 6d 61 70 70 69 6e 67 | 73 2e 0a 0a 5c 65 6e 64 | mapping|s...\end|
|00004f30| 7b 69 74 65 6d 69 7a 65 | 58 7d 0a 0a 5c 73 75 62 |{itemize|X}..\sub|
|00004f40| 73 75 62 73 65 63 74 69 | 6f 6e 58 7b 57 61 6c 6b |subsecti|onX{Walk|
|00004f50| 74 68 72 6f 75 67 68 7d | 0a 5c 69 6e 64 65 78 41 |through}|.\indexA|
|00004f60| 7b 77 61 6c 6b 74 68 72 | 6f 75 67 68 7d 0a 5c 69 |{walkthr|ough}.\i|
|00004f70| 6e 64 65 78 42 7b 6f 76 | 65 72 76 69 65 77 20 6f |ndexB{ov|erview o|
|00004f80| 66 20 44 49 4e 4f 7d 7b | 77 61 6c 6b 74 68 72 6f |f DINO}{|walkthro|
|00004f90| 75 67 68 7d 0a 0a 54 6f | 20 69 6c 6c 75 73 74 72 |ugh}..To| illustr|
|00004fa0| 61 74 65 20 77 72 69 74 | 69 6e 67 20 61 20 5c 64 |ate writ|ing a \d|
|00004fb0| 69 6e 6f 5c 20 70 72 6f | 67 72 61 6d 2c 20 77 65 |ino\ pro|gram, we|
|00004fc0| 20 6f 66 66 65 72 20 74 | 77 6f 20 65 78 61 6d 70 | offer t|wo examp|
|00004fd0| 6c 65 73 2e 0a 54 68 65 | 20 66 69 72 73 74 20 69 |les..The| first i|
|00004fe0| 73 20 61 20 76 65 72 79 | 20 73 69 6d 70 6c 65 20 |s a very| simple |
|00004ff0| 70 72 6f 67 72 61 6d 20 | 69 6e 74 65 6e 64 65 64 |program |intended|
|00005000| 20 74 6f 20 73 68 6f 77 | 20 74 68 65 20 62 61 73 | to show| the bas|
|00005010| 69 63 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0a 6f |ic appli|cation.o|
|00005020| 66 20 74 68 65 20 70 72 | 69 6e 63 69 70 6c 65 73 |f the pr|inciples|
|00005030| 20 6f 75 74 6c 69 6e 65 | 64 20 69 6e 20 74 68 65 | outline|d in the|
|00005040| 20 6f 76 65 72 76 69 65 | 77 2e 20 20 54 68 65 20 | overvie|w. The |
|00005050| 73 65 63 6f 6e 64 20 69 | 73 20 61 0a 73 6f 6d 65 |second i|s a.some|
|00005060| 77 68 61 74 20 6d 6f 72 | 65 20 63 6f 6d 70 6c 65 |what mor|e comple|
|00005070| 78 20 65 78 61 6d 70 6c | 65 20 69 6e 74 65 6e 64 |x exampl|e intend|
|00005080| 65 64 20 74 6f 20 73 68 | 6f 77 20 73 6f 6d 65 20 |ed to sh|ow some |
|00005090| 6f 66 20 74 68 65 20 73 | 75 62 74 6c 65 74 69 65 |of the s|ubtletie|
|000050a0| 73 0a 69 6e 76 6f 6c 76 | 65 64 20 69 6e 20 75 73 |s.involv|ed in us|
|000050b0| 69 6e 67 20 5c 64 69 6e | 6f 2e 20 20 57 65 20 77 |ing \din|o. We w|
|000050c0| 69 6c 6c 20 77 61 6c 6b | 20 74 68 72 6f 75 67 68 |ill walk| through|
|000050d0| 20 74 68 65 20 73 74 65 | 70 73 20 6f 75 74 6c 69 | the ste|ps outli|
|000050e0| 6e 65 64 20 61 62 6f 76 | 65 0a 66 6f 72 20 65 61 |ned abov|e.for ea|
|000050f0| 63 68 20 65 78 61 6d 70 | 6c 65 20 74 6f 20 69 6c |ch examp|le to il|
|00005100| 6c 75 73 74 72 61 74 65 | 20 74 68 65 20 70 72 6f |lustrate| the pro|
|00005110| 63 65 73 73 2e 0a 0a 54 | 68 65 73 65 20 65 78 61 |cess...T|hese exa|
|00005120| 6d 70 6c 65 73 20 69 6c | 6c 75 73 74 72 61 74 65 |mples il|lustrate|
|00005130| 20 74 68 65 20 74 68 6f | 75 67 68 74 20 70 72 6f | the tho|ught pro|
|00005140| 63 65 73 73 20 74 68 61 | 74 20 61 20 70 72 6f 67 |cess tha|t a prog|
|00005150| 72 61 6d 6d 65 72 20 73 | 68 6f 75 6c 64 20 67 6f |rammer s|hould go|
|00005160| 0a 74 68 72 6f 75 67 68 | 20 77 68 65 6e 20 77 72 |.through| when wr|
|00005170| 69 74 74 69 6e 67 20 61 | 20 5c 64 69 6e 6f 5c 20 |itting a| \dino\ |
|00005180| 70 72 6f 67 72 61 6d 2e | 20 20 54 6f 20 67 65 74 |program.| To get|
|00005190| 20 6d 75 63 68 20 6f 75 | 74 20 6f 66 20 74 68 65 | much ou|t of the|
|000051a0| 6d 2c 20 74 68 65 79 20 | 68 61 76 65 0a 74 6f 20 |m, they |have.to |
|000051b0| 62 65 20 72 65 61 64 20 | 63 61 72 65 66 75 6c 6c |be read |carefull|
|000051c0| 79 20 61 6e 64 20 6e 6f | 74 20 6a 75 73 74 20 73 |y and no|t just s|
|000051d0| 6b 69 6d 6d 65 64 2e 20 | 20 57 65 20 72 65 63 6f |kimmed. | We reco|
|000051e0| 6d 6d 65 6e 64 20 73 65 | 74 74 69 6e 67 20 61 73 |mmend se|tting as|
|000051f0| 69 64 65 0a 73 6f 6d 65 | 20 74 69 6d 65 20 74 6f |ide.some| time to|
|00005200| 20 77 6f 72 6b 20 74 68 | 72 6f 75 67 68 20 74 68 | work th|rough th|
|00005210| 65 6d 20 63 61 72 65 66 | 75 6c 6c 79 2e 0a 0a 5c |em caref|ully...\|
|00005220| 73 75 62 73 75 62 73 65 | 63 74 69 6f 6e 58 7b 4d |subsubse|ctionX{M|
|00005230| 61 74 72 69 78 2d 56 65 | 63 74 6f 72 20 4d 75 6c |atrix-Ve|ctor Mul|
|00005240| 74 69 70 6c 79 7d 0a 5c | 69 6e 64 65 78 43 7b 65 |tiply}.\|indexC{e|
|00005250| 78 61 6d 70 6c 65 73 7d | 7b 6d 61 74 72 69 78 20 |xamples}|{matrix |
|00005260| 76 65 63 74 6f 72 20 6d | 75 6c 74 69 70 6c 69 63 |vector m|ultiplic|
|00005270| 61 74 69 6f 6e 7d 7b 77 | 61 6c 6b 74 68 72 6f 75 |ation}{w|alkthrou|
|00005280| 67 68 7d 0a 0a 54 68 69 | 73 20 65 78 61 6d 70 6c |gh}..Thi|s exampl|
|00005290| 65 20 74 61 6b 65 73 20 | 20 61 20 76 65 72 79 20 |e takes | a very |
|000052a0| 73 69 6d 70 6c 65 20 70 | 72 6f 62 6c 65 6d 2c 20 |simple p|roblem, |
|000052b0| 61 20 6d 61 74 72 69 78 | 2d 76 65 63 74 6f 72 20 |a matrix|-vector |
|000052c0| 6d 75 6c 74 69 70 6c 69 | 63 61 74 69 6f 6e 0a 77 |multipli|cation.w|
|000052d0| 68 65 72 65 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |here the| number |
|000052e0| 6f 66 20 72 6f 77 73 20 | 69 6e 20 74 68 65 20 6d |of rows |in the m|
|000052f0| 61 74 72 69 78 20 69 73 | 20 74 68 65 20 73 61 6d |atrix is| the sam|
|00005300| 65 20 61 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |e as the| number |
|00005310| 6f 66 0a 70 72 6f 63 65 | 73 73 6f 72 73 20 61 76 |of.proce|ssors av|
|00005320| 61 69 6c 61 62 6c 65 2c | 20 61 6e 64 20 73 68 6f |ailable,| and sho|
|00005330| 77 73 20 68 6f 77 20 74 | 6f 20 77 72 69 74 65 20 |ws how t|o write |
|00005340| 61 20 5c 64 69 6e 6f 5c | 20 70 72 6f 67 72 61 6d |a \dino\| program|
|00005350| 20 74 6f 20 73 6f 6c 76 | 65 0a 74 68 69 73 20 70 | to solv|e.this p|
|00005360| 72 6f 62 6c 65 6d 2e 0a | 0a 5c 62 65 67 69 6e 7b |roblem..|.\begin{|
|00005370| 69 74 65 6d 69 7a 65 58 | 7d 0a 0a 5c 69 74 65 6d |itemizeX|}..\item|
|00005380| 58 20 7b 53 74 65 70 20 | 30 20 2d 2d 2d 20 42 65 |X {Step |0 --- Be|
|00005390| 67 69 6e 20 77 69 74 68 | 20 61 20 67 6f 6f 64 20 |gin with| a good |
|000053a0| 75 6e 64 65 72 73 74 61 | 6e 64 69 6e 67 20 6f 66 |understa|nding of|
|000053b0| 20 74 68 65 0a 70 72 6f | 62 6c 65 6d 20 61 6e 64 | the.pro|blem and|
|000053c0| 20 61 20 67 65 6e 65 72 | 61 6c 20 61 70 70 72 6f | a gener|al appro|
|000053d0| 61 63 68 20 74 6f 20 69 | 74 73 20 73 6f 6c 75 74 |ach to i|ts solut|
|000053e0| 69 6f 6e 2e 7d 0a 0a 54 | 68 65 20 61 6c 67 6f 72 |ion.}..T|he algor|
|000053f0| 69 74 68 6d 20 69 73 20 | 61 6c 6d 6f 73 74 20 74 |ithm is |almost t|
|00005400| 72 69 76 69 61 6c 20 2d | 2d 2d 20 65 61 63 68 20 |rivial -|-- each |
|00005410| 65 6c 65 6d 65 6e 74 20 | 6f 66 20 74 68 65 20 73 |element |of the s|
|00005420| 6f 6c 75 74 69 6f 6e 20 | 76 65 63 74 6f 72 20 69 |olution |vector i|
|00005430| 73 0a 6f 62 74 61 69 6e | 65 64 20 62 79 20 74 61 |s.obtain|ed by ta|
|00005440| 6b 69 6e 67 20 74 68 65 | 20 64 6f 74 20 70 72 6f |king the| dot pro|
|00005450| 64 75 63 74 20 6f 66 20 | 74 68 65 20 63 6f 72 72 |duct of |the corr|
|00005460| 65 73 70 6f 6e 64 69 6e | 67 20 72 6f 77 20 6f 66 |espondin|g row of|
|00005470| 20 74 68 65 0a 6d 75 6c | 74 69 70 6c 69 63 61 6e | the.mul|tiplican|
|00005480| 64 20 6d 61 74 72 69 78 | 20 77 69 74 68 20 74 68 |d matrix| with th|
|00005490| 65 20 6d 75 6c 74 69 70 | 6c 69 63 61 6e 64 20 76 |e multip|licand v|
|000054a0| 65 63 74 6f 72 2e 20 20 | 54 6f 20 70 61 72 61 6c |ector. |To paral|
|000054b0| 6c 65 6c 69 7a 65 20 74 | 68 69 73 0a 70 72 6f 62 |lelize t|his.prob|
|000054c0| 6c 65 6d 2c 20 77 65 20 | 77 69 6c 6c 20 63 68 6f |lem, we |will cho|
|000054d0| 6f 73 65 20 74 6f 20 73 | 65 6e 64 20 65 61 63 68 |ose to s|end each|
|000054e0| 20 72 6f 77 20 6f 66 20 | 74 68 65 20 6d 75 6c 74 | row of |the mult|
|000054f0| 69 70 6c 69 63 61 6e 64 | 20 6d 61 74 72 69 78 20 |iplicand| matrix |
|00005500| 74 6f 0a 61 20 70 72 6f | 63 65 73 73 6f 72 2c 20 |to.a pro|cessor, |
|00005510| 61 20 63 6f 70 79 20 6f | 66 20 74 68 65 20 6d 75 |a copy o|f the mu|
|00005520| 6c 74 69 70 6c 69 63 61 | 6e 64 20 76 65 63 74 6f |ltiplica|nd vecto|
|00005530| 72 20 74 6f 20 65 61 63 | 68 20 70 72 6f 63 65 73 |r to eac|h proces|
|00005540| 73 6f 72 2c 20 61 6e 64 | 0a 63 6f 6c 6c 65 63 74 |sor, and|.collect|
|00005550| 20 65 61 63 68 20 65 6c | 65 6d 65 6e 74 20 6f 66 | each el|ement of|
|00005560| 20 74 68 65 20 61 6e 73 | 77 65 72 20 76 65 63 74 | the ans|wer vect|
|00005570| 6f 72 20 62 61 63 6b 20 | 66 72 6f 6d 20 74 68 65 |or back |from the|
|00005580| 20 70 72 6f 63 65 73 73 | 6f 72 73 2e 0a 0a 49 66 | process|ors...If|
|00005590| 20 77 65 20 64 72 61 77 | 20 61 20 70 69 63 74 75 | we draw| a pictu|
|000055a0| 72 65 20 6f 66 20 6f 75 | 72 20 61 6c 67 6f 72 69 |re of ou|r algori|
|000055b0| 74 68 6d 20 28 77 65 20 | 75 73 75 61 6c 6c 79 0a |thm (we |usually.|
|000055c0| 72 65 73 6f 72 74 20 74 | 6f 20 64 72 61 77 69 6e |resort t|o drawin|
|000055d0| 67 20 70 69 63 74 75 72 | 65 73 20 74 6f 20 75 6e |g pictur|es to un|
|000055e0| 64 65 72 73 74 61 6e 64 | 20 61 6c 6c 20 62 75 74 |derstand| all but|
|000055f0| 20 74 68 65 20 73 69 6d | 70 6c 65 73 74 20 61 6c | the sim|plest al|
|00005600| 67 6f 72 69 74 68 6d 73 | 29 2c 0a 77 65 20 67 65 |gorithms|),.we ge|
|00005610| 74 20 73 6f 6d 65 74 68 | 69 6e 67 20 6c 69 6b 65 |t someth|ing like|
|00005620| 20 74 68 69 73 3a 0a 0a | 5c 65 6e 64 7b 69 74 65 | this:..|\end{ite|
|00005630| 6d 69 7a 65 58 7d 0a 0a | 5c 62 65 67 69 6e 7b 63 |mizeX}..|\begin{c|
|00005640| 65 6e 74 65 72 7d 0a 5c | 62 65 67 69 6e 7b 74 61 |enter}.\|begin{ta|
|00005650| 62 75 6c 61 72 7d 7b 7c | 6c 7c 20 6c 20 7c 6c 7c |bular}{||l| l |l||
|00005660| 20 6c 20 7c 6c 7c 7d 20 | 5c 63 6c 69 6e 65 7b 31 | l |l|} |\cline{1|
|00005670| 2d 31 7d 20 5c 63 6c 69 | 6e 65 7b 33 2d 33 7d 20 |-1} \cli|ne{3-3} |
|00005680| 5c 63 6c 69 6e 65 7b 35 | 2d 35 7d 0a 20 26 20 26 |\cline{5|-5}. & &|
|00005690| 20 26 20 26 20 5c 5c 0a | 20 26 20 26 20 26 20 26 | & & \\.| & & & &|
|000056a0| 20 5c 5c 20 5c 63 6c 69 | 6e 65 7b 31 2d 31 7d 20 | \\ \cli|ne{1-1} |
|000056b0| 5c 63 6c 69 6e 65 7b 35 | 2d 35 7d 0a 20 26 20 26 |\cline{5|-5}. & &|
|000056c0| 20 26 20 26 20 5c 5c 0a | 5c 68 73 70 61 63 65 7b | & & \\.|\hspace{|
|000056d0| 31 2e 32 35 69 6e 7d 20 | 26 20 26 20 5c 68 73 70 |1.25in} |& & \hsp|
|000056e0| 61 63 65 7b 2e 32 69 6e | 7d 20 26 20 26 20 5c 68 |ace{.2in|} & & \h|
|000056f0| 73 70 61 63 65 7b 2e 32 | 69 6e 7d 20 5c 5c 20 5c |space{.2|in} \\ \|
|00005700| 63 6c 69 6e 65 7b 31 2d | 31 7d 20 5c 63 6c 69 6e |cline{1-|1} \clin|
|00005710| 65 7b 35 2d 35 7d 0a 20 | 26 20 7b 5c 4c 61 72 67 |e{5-5}. |& {\Larg|
|00005720| 65 20 7b 5c 62 66 20 58 | 7d 7d 20 26 20 26 20 7b |e {\bf X|}} & & {|
|00005730| 5c 4c 61 72 67 65 20 7b | 5c 62 66 20 3d 7d 7d 20 |\Large {|\bf =}} |
|00005740| 26 20 5c 5c 0a 20 26 20 | 26 20 26 20 26 20 5c 5c |& \\. & |& & & \\|
|00005750| 20 5c 63 6c 69 6e 65 7b | 31 2d 31 7d 20 5c 63 6c | \cline{|1-1} \cl|
|00005760| 69 6e 65 7b 35 2d 35 7d | 0a 20 26 20 26 20 26 20 |ine{5-5}|. & & & |
|00005770| 26 20 5c 5c 0a 20 26 20 | 26 20 26 20 26 20 5c 5c |& \\. & |& & & \\|
|00005780| 20 5c 63 6c 69 6e 65 7b | 31 2d 31 7d 20 5c 63 6c | \cline{|1-1} \cl|
|00005790| 69 6e 65 7b 33 2d 33 7d | 20 5c 63 6c 69 6e 65 7b |ine{3-3}| \cline{|
|000057a0| 35 2d 35 7d 0a 5c 65 6e | 64 7b 74 61 62 75 6c 61 |5-5}.\en|d{tabula|
|000057b0| 72 7d 0a 5c 65 6e 64 7b | 63 65 6e 74 65 72 7d 0a |r}.\end{|center}.|
|000057c0| 0a 5c 62 65 67 69 6e 7b | 69 74 65 6d 69 7a 65 58 |.\begin{|itemizeX|
|000057d0| 7d 0a 0a 5c 69 74 65 6d | 58 20 7b 53 74 65 70 20 |}..\item|X {Step |
|000057e0| 31 20 2d 2d 2d 20 43 68 | 6f 6f 73 65 20 61 20 5c |1 --- Ch|oose a \|
|000057f0| 75 6e 64 65 72 6c 69 6e | 65 7b 5c 65 6d 20 73 74 |underlin|e{\em st|
|00005800| 72 75 63 74 75 72 65 20 | 6f 66 20 65 6e 76 69 72 |ructure |of envir|
|00005810| 6f 6e 6d 65 6e 74 73 7d | 0a 61 70 70 72 6f 70 72 |onments}|.appropr|
|00005820| 69 61 74 65 20 74 6f 20 | 74 68 65 20 70 72 6f 62 |iate to |the prob|
|00005830| 6c 65 6d 2e 7d 0a 5c 69 | 6e 64 65 78 42 7b 73 74 |lem.}.\i|ndexB{st|
|00005840| 72 75 63 74 75 72 65 20 | 6f 66 20 65 6e 76 69 72 |ructure |of envir|
|00005850| 6f 6e 6d 65 6e 74 73 7d | 7b 69 6e 20 6d 61 74 72 |onments}|{in matr|
|00005860| 69 78 20 76 65 63 74 6f | 72 20 6d 75 6c 74 69 70 |ix vecto|r multip|
|00005870| 6c 69 63 61 74 69 6f 6e | 7d 0a 0a 47 69 76 65 6e |lication|}..Given|
|00005880| 20 74 68 65 20 77 61 79 | 20 77 65 20 68 61 76 65 | the way| we have|
|00005890| 20 64 65 63 69 64 65 64 | 20 74 6f 20 62 72 65 61 | decided| to brea|
|000058a0| 6b 20 75 70 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |k up the| problem|
|000058b0| 2c 20 61 20 76 65 63 74 | 6f 72 20 6f 66 0a 65 6e |, a vect|or of.en|
|000058c0| 76 69 72 6f 6e 6d 65 6e | 74 73 20 73 65 65 6d 73 |vironmen|ts seems|
|000058d0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 2e 20 20 57 | appropr|iate. W|
|000058e0| 65 20 77 69 6c 6c 20 75 | 73 65 20 61 20 73 74 72 |e will u|se a str|
|000058f0| 75 63 74 75 72 65 0a 6f | 66 20 65 6e 76 69 72 6f |ucture.o|f enviro|
|00005900| 6e 6d 65 6e 74 73 20 74 | 68 65 20 73 69 7a 65 20 |nments t|he size |
|00005910| 6f 66 20 74 68 65 20 6d | 61 63 68 69 6e 65 20 28 |of the m|achine (|
|00005920| 77 68 69 63 68 20 77 65 | 20 61 73 73 75 6d 65 20 |which we| assume |
|00005930| 74 6f 20 62 65 20 31 36 | 29 2e 20 20 53 6f 20 6f |to be 16|). So o|
|00005940| 75 72 0a 63 6f 64 65 20 | 69 6e 69 74 69 61 6c 6c |ur.code |initiall|
|00005950| 79 20 6c 6f 6f 6b 73 20 | 6c 69 6b 65 20 74 68 69 |y looks |like thi|
|00005960| 73 3a 0a 0a 5c 62 65 67 | 69 6e 7b 71 75 6f 74 61 |s:..\beg|in{quota|
|00005970| 74 69 6f 6e 7d 5c 62 65 | 67 69 6e 7b 76 65 72 62 |tion}\be|gin{verb|
|00005980| 61 74 69 6d 7d 0a 65 6e | 76 69 72 6f 6e 6d 65 6e |atim}.en|vironmen|
|00005990| 74 20 6e 6f 64 65 5b 4e | 5d 0a 20 20 20 7b 0a 20 |t node[N|]. {. |
|000059a0| 20 20 7d 0a 5c 65 6e 64 | 7b 76 65 72 62 61 74 69 | }.\end|{verbati|
|000059b0| 6d 7d 5c 65 6e 64 7b 71 | 75 6f 74 61 74 69 6f 6e |m}\end{q|uotation|
|000059c0| 7d 0a 5c 6e 6f 69 6e 64 | 65 6e 74 0a 54 6f 20 6d |}.\noind|ent.To m|
|000059d0| 61 6b 65 20 74 68 69 6e | 67 73 20 65 61 73 69 65 |ake thin|gs easie|
|000059e0| 72 20 74 6f 20 63 68 61 | 6e 67 65 2c 20 77 65 20 |r to cha|nge, we |
|000059f0| 77 69 6c 6c 20 75 73 65 | 20 61 20 6d 61 63 72 6f |will use| a macro|
|00005a00| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 2d 2d 20 24 | definit|ion -- $|
|00005a10| 4e 24 2c 0a 77 68 69 63 | 68 20 77 69 6c 6c 20 72 |N$,.whic|h will r|
|00005a20| 65 70 72 65 73 65 6e 74 | 20 62 6f 74 68 20 74 68 |epresent| both th|
|00005a30| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 6d 61 |e size o|f the ma|
|00005a40| 63 68 69 6e 65 20 61 6e | 64 20 74 68 65 20 73 69 |chine an|d the si|
|00005a50| 7a 65 20 6f 66 20 74 68 | 65 20 61 72 72 61 79 0a |ze of th|e array.|
|00005a60| 61 6e 64 20 76 65 63 74 | 6f 72 73 20 28 31 36 29 |and vect|ors (16)|
|00005a70| 2e 0a 0a 5c 69 74 65 6d | 58 20 7b 53 74 65 70 20 |...\item|X {Step |
|00005a80| 32 20 2d 2d 2d 20 44 65 | 74 65 72 6d 69 6e 65 20 |2 --- De|termine |
|00005a90| 68 6f 77 20 74 68 65 20 | 70 72 69 6e 63 69 70 61 |how the |principa|
|00005aa0| 6c 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |l data s|tructure|
|00005ab0| 73 20 73 68 6f 75 6c 64 | 20 62 65 0a 64 69 73 74 |s should| be.dist|
|00005ac0| 72 69 62 75 74 65 64 20 | 61 6d 6f 6e 67 20 74 68 |ributed |among th|
|00005ad0| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 73 20 69 |e enviro|nments i|
|00005ae0| 6e 20 74 68 65 20 73 74 | 72 75 63 74 75 72 65 20 |n the st|ructure |
|00005af0| 79 6f 75 20 68 61 76 65 | 20 63 68 6f 73 65 6e 0a |you have| chosen.|
|00005b00| 28 73 70 65 63 69 66 79 | 20 74 68 65 20 5c 75 6e |(specify| the \un|
|00005b10| 64 65 72 6c 69 6e 65 7b | 5c 65 6d 20 6d 61 70 70 |derline{|\em mapp|
|00005b20| 69 6e 67 73 7d 2e 29 7d | 0a 5c 69 6e 64 65 78 42 |ings}.)}|.\indexB|
|00005b30| 7b 6d 61 70 70 69 6e 67 | 20 66 75 6e 63 74 69 6f |{mapping| functio|
|00005b40| 6e 73 7d 7b 69 6e 20 6d | 61 74 72 69 78 20 76 65 |ns}{in m|atrix ve|
|00005b50| 63 74 6f 72 20 6d 75 6c | 74 69 70 6c 69 63 61 74 |ctor mul|tiplicat|
|00005b60| 69 6f 6e 7d 0a 0a 09 5c | 62 65 67 69 6e 7b 69 74 |ion}...\|begin{it|
|00005b70| 65 6d 69 7a 65 58 7d 0a | 0a 09 5c 69 74 65 6d 58 |emizeX}.|..\itemX|
|00005b80| 20 7b 44 65 74 65 72 6d | 69 6e 65 20 74 68 65 20 | {Determ|ine the |
|00005b90| 62 61 73 69 63 20 5c 75 | 6e 64 65 72 6c 69 6e 65 |basic \u|nderline|
|00005ba0| 7b 5c 65 6d 20 70 61 72 | 74 69 74 69 6f 6e 69 6e |{\em par|titionin|
|00005bb0| 67 7d 2e 7d 0a 5c 69 6e | 64 65 78 42 7b 70 61 72 |g}.}.\in|dexB{par|
|00005bc0| 74 69 74 69 6f 6e 69 6e | 67 20 6f 66 20 64 61 74 |titionin|g of dat|
|00005bd0| 61 20 73 74 72 75 63 74 | 75 72 65 73 7d 7b 69 6e |a struct|ures}{in|
|00005be0| 20 6d 61 74 72 69 78 20 | 76 65 63 74 6f 72 20 6d | matrix |vector m|
|00005bf0| 75 6c 74 69 70 6c 69 63 | 61 74 69 6f 6e 7d 0a 0a |ultiplic|ation}..|
|00005c00| 09 4c 65 74 73 20 63 61 | 6c 6c 20 74 68 65 20 6d |.Lets ca|ll the m|
|00005c10| 75 6c 74 69 70 6c 69 63 | 61 6e 64 20 6d 61 74 72 |ultiplic|and matr|
|00005c20| 69 78 20 24 41 24 2c 0a | 09 74 68 65 20 6d 75 6c |ix $A$,.|.the mul|
|00005c30| 74 69 70 6c 69 63 61 6e | 64 20 76 65 63 74 6f 72 |tiplican|d vector|
|00005c40| 20 24 42 24 2c 20 61 6e | 64 20 74 68 65 20 73 6f | $B$, an|d the so|
|00005c50| 6c 75 74 69 6f 6e 20 76 | 65 63 74 6f 72 20 24 43 |lution v|ector $C|
|00005c60| 24 2e 20 20 57 65 20 62 | 6c 6f 63 6b 20 24 41 24 |$. We b|lock $A$|
|00005c70| 0a 09 62 79 20 72 6f 77 | 73 20 61 6e 64 20 24 43 |..by row|s and $C|
|00005c80| 24 20 62 79 20 65 6c 65 | 6d 65 6e 74 73 2e 20 20 |$ by ele|ments. |
|00005c90| 28 57 65 20 64 6f 6e 27 | 74 20 70 61 72 74 69 74 |(We don'|t partit|
|00005ca0| 69 6f 6e 20 24 42 24 20 | 61 74 20 61 6c 6c 3b 20 |ion $B$ |at all; |
|00005cb0| 73 65 65 20 74 68 65 0a | 09 6e 65 78 74 20 70 6f |see the.|.next po|
|00005cc0| 69 6e 74 2e 29 0a 0a 09 | 5c 69 74 65 6d 58 20 7b |int.)...|\itemX {|
|00005cd0| 44 65 74 65 72 6d 69 6e | 65 20 61 6e 79 20 5c 75 |Determin|e any \u|
|00005ce0| 6e 64 65 72 6c 69 6e 65 | 7b 5c 65 6d 20 72 65 70 |nderline|{\em rep|
|00005cf0| 6c 69 63 61 74 69 6f 6e | 7d 2e 7d 0a 5c 69 6e 64 |lication|}.}.\ind|
|00005d00| 65 78 42 7b 72 65 70 6c | 69 63 61 74 69 6f 6e 20 |exB{repl|ication |
|00005d10| 6f 66 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |of data |structur|
|00005d20| 65 73 7d 7b 69 6e 20 6d | 61 74 72 69 78 20 76 65 |es}{in m|atrix ve|
|00005d30| 63 74 6f 72 20 6d 75 6c | 74 69 70 6c 69 63 61 74 |ctor mul|tiplicat|
|00005d40| 69 6f 6e 7d 0a 0a 09 57 | 65 20 77 61 6e 74 20 61 |ion}...W|e want a|
|00005d50| 20 63 6f 6d 70 6c 65 74 | 65 20 63 6f 70 79 20 6f | complet|e copy o|
|00005d60| 66 20 24 42 24 20 6f 6e | 20 65 61 63 68 20 65 6e |f $B$ on| each en|
|00005d70| 76 69 72 6f 6e 6d 65 6e | 74 2c 20 73 6f 20 77 65 |vironmen|t, so we|
|00005d80| 20 72 65 70 6c 69 63 61 | 74 65 20 69 74 2e 0a 0a | replica|te it...|
|00005d90| 09 5c 69 74 65 6d 58 20 | 7b 44 65 74 65 72 6d 69 |.\itemX |{Determi|
|00005da0| 6e 65 20 77 68 65 72 65 | 20 61 6e 79 20 5c 75 6e |ne where| any \un|
|00005db0| 64 65 72 6c 69 6e 65 7b | 5c 65 6d 20 63 6f 70 69 |derline{|\em copi|
|00005dc0| 65 73 7d 0a 09 28 75 73 | 65 64 20 66 6f 72 20 63 |es}..(us|ed for c|
|00005dd0| 6f 6d 6d 75 6e 69 63 61 | 74 69 6f 6e 29 20 67 6f |ommunica|tion) go|
|00005de0| 2e 7d 0a 5c 69 6e 64 65 | 78 42 7b 63 6f 70 69 65 |.}.\inde|xB{copie|
|00005df0| 73 20 69 6e 20 64 69 73 | 74 72 69 62 75 74 65 64 |s in dis|tributed|
|00005e00| 20 64 61 74 61 20 73 74 | 72 75 63 74 75 72 65 73 | data st|ructures|
|00005e10| 7d 7b 69 6e 20 6d 61 74 | 72 69 78 20 76 65 63 74 |}{in mat|rix vect|
|00005e20| 6f 72 20 6d 75 6c 74 69 | 70 6c 69 63 61 74 69 6f |or multi|plicatio|
|00005e30| 6e 7d 0a 0a 09 54 68 65 | 72 65 20 69 73 20 6e 6f |n}...The|re is no|
|00005e40| 20 69 6e 74 65 72 2d 70 | 72 6f 63 65 73 73 6f 72 | inter-p|rocessor|
|00005e50| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 69 | communi|cation i|
|00005e60| 6e 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 28 |n this p|rogram (|
|00005e70| 65 78 63 65 70 74 2c 20 | 6f 66 0a 09 63 6f 75 72 |except, |of..cour|
|00005e80| 73 65 2c 20 66 6f 72 20 | 70 61 72 61 6d 65 74 65 |se, for |paramete|
|00005e90| 72 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |r distri|bution a|
|00005ea0| 6e 64 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 2c 20 62 |nd colle|ction, b|
|00005eb0| 75 74 20 74 68 61 74 20 | 69 73 20 74 6f 74 61 6c |ut that |is total|
|00005ec0| 6c 79 0a 09 61 75 74 6f | 6d 61 74 69 63 2e 29 20 |ly..auto|matic.) |
|00005ed0| 20 54 68 75 73 2c 20 6e | 6f 20 63 6f 70 69 65 73 | Thus, n|o copies|
|00005ee0| 20 61 72 65 20 6e 65 65 | 64 65 64 2e 0a 0a 09 5c | are nee|ded....\|
|00005ef0| 65 6e 64 7b 69 74 65 6d | 69 7a 65 58 7d 0a 0a 54 |end{item|izeX}..T|
|00005f00| 68 65 20 6d 61 70 70 69 | 6e 67 73 20 74 68 61 74 |he mappi|ngs that|
|00005f10| 20 67 69 76 65 20 74 68 | 65 20 70 61 72 74 69 74 | give th|e partit|
|00005f20| 69 6f 6e 69 6e 67 20 77 | 65 20 77 61 6e 74 20 61 |ioning w|e want a|
|00005f30| 72 65 0a 5c 62 6f 6c 64 | 7b 42 6c 6f 63 6b 52 6f |re.\bold|{BlockRo|
|00005f40| 77 7d 5c 69 6e 64 65 78 | 42 7b 6d 61 70 70 69 6e |w}\index|B{mappin|
|00005f50| 67 20 66 75 6e 63 74 69 | 6f 6e 73 7d 7b 42 6c 6f |g functi|ons}{Blo|
|00005f60| 63 6b 52 6f 77 7d 2c 0a | 5c 62 6f 6c 64 7b 61 6c |ckRow},.|\bold{al|
|00005f70| 6c 7d 5c 69 6e 64 65 78 | 42 7b 6d 61 70 70 69 6e |l}\index|B{mappin|
|00005f80| 67 20 66 75 6e 63 74 69 | 6f 6e 73 7d 7b 61 6c 6c |g functi|ons}{all|
|00005f90| 7d 2c 20 61 6e 64 0a 5c | 62 6f 6c 64 7b 42 6c 6f |}, and.\|bold{Blo|
|00005fa0| 63 6b 7d 5c 69 6e 64 65 | 78 42 7b 6d 61 70 70 69 |ck}\inde|xB{mappi|
|00005fb0| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 73 7d 7b 42 6c |ng funct|ions}{Bl|
|00005fc0| 6f 63 6b 7d 2e 0a 28 57 | 65 20 6c 6f 6f 6b 65 64 |ock}..(W|e looked|
|00005fd0| 20 61 74 20 74 68 65 20 | 70 72 65 64 65 66 69 6e | at the |predefin|
|00005fe0| 65 64 0a 5c 64 69 6e 6f | 5c 20 6d 61 70 70 69 6e |ed.\dino|\ mappin|
|00005ff0| 67 73 5c 69 6e 64 65 78 | 42 7b 6d 61 70 70 69 6e |gs\index|B{mappin|
|00006000| 67 20 66 75 6e 63 74 69 | 6f 6e 73 7d 7b 70 72 65 |g functi|ons}{pre|
|00006010| 64 65 66 69 6e 65 64 7d | 20 74 6f 20 66 69 6e 64 |defined}| to find|
|00006020| 20 74 68 69 73 20 2d 2d | 2d 0a 73 65 65 20 53 65 | this --|-.see Se|
|00006030| 63 74 69 6f 6e 7e 5c 72 | 65 66 7b 70 72 65 64 65 |ction~\r|ef{prede|
|00006040| 66 69 6e 65 64 20 6d 61 | 70 70 69 6e 67 20 66 75 |fined ma|pping fu|
|00006050| 6e 63 74 69 6f 6e 73 7d | 2e 29 0a 4f 75 72 20 64 |nctions}|.).Our d|
|00006060| 65 63 6c 61 72 61 74 69 | 6f 6e 73 20 74 68 65 72 |eclarati|ons ther|
|00006070| 65 66 6f 72 65 20 6c 6f | 6f 6b 20 6c 69 6b 65 3a |efore lo|ok like:|
|00006080| 0a 0a 5c 62 65 67 69 6e | 7b 71 75 6f 74 61 74 69 |..\begin|{quotati|
|00006090| 6f 6e 7d 5c 6e 6f 69 6e | 64 65 6e 74 5c 62 65 67 |on}\noin|dent\beg|
|000060a0| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0a 66 6c 6f |in{verba|tim}.flo|
|000060b0| 61 74 20 64 69 73 74 72 | 69 62 75 74 65 64 20 41 |at distr|ibuted A|
|000060c0| 5b 4e 5d 5b 4e 5d 20 6d | 61 70 20 42 6c 6f 63 6b |[N][N] m|ap Block|
|000060d0| 52 6f 77 3b 0a 66 6c 6f | 61 74 20 64 69 73 74 72 |Row;.flo|at distr|
|000060e0| 69 62 75 74 65 64 20 42 | 5b 4e 5d 20 6d 61 70 20 |ibuted B|[N] map |
|000060f0| 61 6c 6c 3b 0a 66 6c 6f | 61 74 20 64 69 73 74 72 |all;.flo|at distr|
|00006100| 69 62 75 74 65 64 20 43 | 5b 4e 5d 20 6d 61 70 20 |ibuted C|[N] map |
|00006110| 42 6c 6f 63 6b 3b 0a 5c | 65 6e 64 7b 76 65 72 62 |Block;.\|end{verb|
|00006120| 61 74 69 6d 7d 5c 65 6e | 64 7b 71 75 6f 74 61 74 |atim}\en|d{quotat|
|00006130| 69 6f 6e 7d 0a 0a 5c 69 | 74 65 6d 58 20 7b 53 74 |ion}..\i|temX {St|
|00006140| 65 70 20 33 20 2d 2d 2d | 20 57 72 69 74 65 20 61 |ep 3 ---| Write a|
|00006150| 20 5c 75 6e 64 65 72 6c | 69 6e 65 7b 5c 65 6d 20 | \underl|ine{\em |
|00006160| 63 6f 6d 70 6f 73 69 74 | 65 20 70 72 6f 63 65 64 |composit|e proced|
|00006170| 75 72 65 7d 0a 74 6f 20 | 69 6d 70 6c 65 6d 65 6e |ure}.to |implemen|
|00006180| 74 20 63 6f 6d 70 75 74 | 61 74 69 6f 6e 20 69 6e |t comput|ation in|
|00006190| 20 74 68 65 20 73 74 72 | 75 63 74 75 72 65 20 6f | the str|ucture o|
|000061a0| 66 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 73 2e 7d |f enviro|nments.}|
|000061b0| 0a 5c 69 6e 64 65 78 42 | 7b 63 6f 6d 70 6f 73 69 |.\indexB|{composi|
|000061c0| 74 65 20 70 72 6f 63 65 | 64 75 72 65 73 7d 7b 69 |te proce|dures}{i|
|000061d0| 6e 20 6d 61 74 72 69 78 | 20 76 65 63 74 6f 72 20 |n matrix| vector |
|000061e0| 6d 75 6c 74 69 70 6c 69 | 63 61 74 69 6f 6e 7d 0a |multipli|cation}.|
|000061f0| 0a 09 5c 62 65 67 69 6e | 7b 69 74 65 6d 69 7a 65 |..\begin|{itemize|
|00006200| 58 7d 0a 0a 09 5c 69 74 | 65 6d 58 20 7b 57 72 69 |X}...\it|emX {Wri|
|00006210| 74 65 20 74 68 65 20 63 | 6f 64 65 20 66 6f 72 20 |te the c|ode for |
|00006220| 74 68 65 20 5c 75 6e 64 | 65 72 6c 69 6e 65 7b 5c |the \und|erline{\|
|00006230| 65 6d 20 63 6f 6d 70 75 | 74 61 74 69 6f 6e 7d 2e |em compu|tation}.|
|00006240| 7d 0a 0a 09 54 68 69 73 | 20 69 73 20 61 6c 6d 6f |}...This| is almo|
|00006250| 73 74 20 74 72 69 76 69 | 61 6c 2e 20 20 57 65 20 |st trivi|al. We |
|00006260| 6e 65 65 64 20 61 20 73 | 69 6e 67 6c 65 20 6c 6f |need a s|ingle lo|
|00006270| 6f 70 20 74 6f 20 64 6f | 20 74 68 65 20 64 6f 74 |op to do| the dot|
|00006280| 20 70 72 6f 64 75 63 74 | 2e 0a 09 54 68 65 20 6f | product|...The o|
|00006290| 6e 6c 79 20 63 6f 6d 70 | 6c 69 63 61 74 69 6f 6e |nly comp|lication|
|000062a0| 20 69 73 20 74 68 61 74 | 20 77 65 20 6d 75 73 74 | is that| we must|
|000062b0| 20 6b 6e 6f 77 20 77 68 | 69 63 68 20 65 6e 76 69 | know wh|ich envi|
|000062c0| 72 6f 6e 6d 65 6e 74 20 | 77 65 20 61 72 65 20 6f |ronment |we are o|
|000062d0| 6e 0a 09 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 6b |n..in or|der to k|
|000062e0| 6e 6f 77 20 77 68 69 63 | 68 20 72 6f 77 20 6f 66 |now whic|h row of|
|000062f0| 20 24 41 24 20 61 6e 64 | 20 65 6c 65 6d 65 6e 74 | $A$ and| element|
|00006300| 20 6f 66 20 24 43 24 20 | 74 6f 20 75 73 65 20 69 | of $C$ |to use i|
|00006310| 6e 20 74 68 65 0a 09 63 | 6f 6d 70 75 74 61 74 69 |n the..c|omputati|
|00006320| 6f 6e 2e 20 20 54 68 65 | 72 65 20 69 73 20 61 20 |on. The|re is a |
|00006330| 73 70 65 63 69 61 6c 20 | 63 6f 6e 73 74 61 6e 74 |special |constant|
|00006340| 20 77 65 20 63 61 6e 20 | 64 65 63 6c 61 72 65 20 | we can |declare |
|00006350| 74 68 61 74 20 77 69 6c | 6c 20 68 61 76 65 0a 09 |that wil|l have..|
|00006360| 74 68 65 20 76 61 6c 75 | 65 20 6f 66 20 6f 75 72 |the valu|e of our|
|00006370| 20 69 6e 64 65 78 20 69 | 6e 20 69 74 2c 20 77 68 | index i|n it, wh|
|00006380| 69 63 68 20 69 73 20 6b | 6e 6f 77 6e 20 61 73 20 |ich is k|nown as |
|00006390| 61 6e 0a 09 5c 75 6e 64 | 65 72 6c 69 6e 65 7b 65 |an..\und|erline{e|
|000063a0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 69 6e 64 65 78 |nvironme|nt index|
|000063b0| 20 69 64 65 6e 74 69 66 | 69 65 72 7d 0a 09 5c 69 | identif|ier}..\i|
|000063c0| 6e 64 65 78 41 7b 65 6e | 76 69 72 6f 6e 6d 65 6e |ndexA{en|vironmen|
|000063d0| 74 20 69 6e 64 65 78 20 | 69 64 65 6e 74 69 66 69 |t index |identifi|
|000063e0| 65 72 73 7d 0a 09 28 73 | 65 65 20 53 65 63 74 69 |ers}..(s|ee Secti|
|000063f0| 6f 6e 7e 5c 72 65 66 7b | 65 6e 76 69 72 6f 6e 6d |on~\ref{|environm|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.