b6ca4b52e3d2f1b0469fa60b20b843f3b430d682
[platform/upstream/tbb.git] / examples / task_arena / fractal / readme.html
1 <!DOCTYPE html>
2 <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
3 <head>
4         <meta charset="UTF-8">
5         <style>
6                 ::selection {
7                         background: #b7ffb7;
8                 }
9                 ::-moz-selection {
10                         background: #b7ffb7;
11                 }
12
13                 body {
14                         font-family: Arial, Helvetica, sans-serif;
15                         font-size: 16px;
16                         width: 800px;
17                         margin: 0 auto;
18                 }
19                 #banner {
20                         /* Div for banner */
21                         float:left;
22                         margin: 0px;
23                         margin-bottom: 10px;
24                         width: 100%;
25                         background-color: #0071C5;
26                         z-index: 0;
27                 }
28                 #banner .logo {
29                         /* Apply to logo in banner. Add as class to image tag. */
30                         float: left;
31                         margin-right: 20px;
32                         margin-left: 20px;
33                         margin-top: 15px;
34                         padding-bottom: 5px;
35                 }
36                 h1 {
37                         text-align: center;
38                         font-size: 36px;
39                 }
40                 h1.title {
41                         /* Add as class to H1 in banner */
42                         font-family: "Intel Clear", Verdana, Arial, sans-serif;
43                         font-weight:normal;
44                         color: #FFFFFF;
45                         font-size: 170%;
46                         margin-right: 40px;
47                         margin-left: 40px;
48                         padding-right: 20px;
49                         text-indent: 20px;
50                 }
51                 .h3-alike {
52                         display:inline;
53                         font-size: 1.17em;
54                         font-weight: bold;
55                         color: #0071C5;
56                 }
57                 h3 {
58                         font-size: 1.17em;
59                         font-weight: bold;
60                         color: #0071C5;
61                 }
62                 .h4-alike {
63                         display:inline;
64                         font-size: 1.05em;
65                         font-weight: bold;
66                 }
67                 pre {
68                         font-family: "Consolas", Monaco, monospace;
69                         font-size:small;
70                         background: #fafafa;
71                         margin: 0;
72                         padding-left:20px;
73                 }
74                 #footer {
75                         font-size: small;
76                 }
77                 code {
78                         font-family: "Consolas", Monaco, monospace;
79                 }
80                 .code-block
81                 {
82                         padding-left:20px;
83                 }
84                 .changes {
85                         margin: 1em 0;
86                 }
87                 .changes input:active {
88                         position: relative;
89                         top: 1px;
90                 }
91                 .changes input:hover:after {
92                         padding-left: 16px;
93                         font-size: 10px;
94                         content: 'More';
95                 }
96                 .changes input:checked:hover:after {
97                         content: 'Less';
98                 }
99                 .changes input + .show-hide {
100                         display: none;
101                 }
102                 .changes input:checked + .show-hide {
103                         display: block;
104                 }
105
106                 ul {
107                         margin: 0;
108                         padding: 0.5em 0 0.5em 2.5em;
109                 }
110                 ul li {
111                         margin-bottom: 3px;
112                 }
113                 ul li:last-child {
114                         margin-bottom: 0;
115                 }
116                 .disc {
117                         list-style-type:disc
118                 }
119                 .circ {
120                         list-style-type:circle
121                 }
122                 
123                 .single {
124                         padding: 0 0.5em;
125                 }
126                 
127                 /* ------------------------------------------------- */
128                 /* Table styles                                      */
129                 table{
130                         margin-bottom:5pt;
131                         border-collapse:collapse;
132                         margin-left:0px;
133                         margin-top:0.3em;
134                         font-size:10pt;
135                 }
136                 tr{
137                         vertical-align:top;
138                 }
139                 th,
140                 th h3{
141                         padding:4px;
142                         text-align:left;
143                         background-color:#0071C5;
144                         font-weight:bold;
145                         margin-top:1px;
146                         margin-bottom:0;
147                         color:#FFFFFF;
148                         font-size:10pt;
149                         vertical-align:middle;
150                 }
151                 th{
152                         border:1px #dddddd solid;
153                         padding-top:2px;                 
154                         padding-bottom:0px;
155                         padding-right:3px;               
156                         padding-left:3px;
157                 }
158                 td{
159                         border:1px #dddddd solid;
160                         vertical-align:top;
161                         font-size:100%;
162                         text-align:left;
163                         margin-bottom:0;
164                 }
165                 td,
166                 td p{
167                         margin-top:0;
168                         margin-left:0;
169                         text-align:left;
170                         font-size:inherit;
171                         line-height:120%;
172                 }
173                 td p{
174                         margin-bottom:0;
175                         padding-top:5px;
176                         padding-bottom:5px;
177                         padding-right:5px;
178                         padding-left:1px;
179                 }
180                 .noborder{
181                         border:0px none;
182                 }
183                 .noborder1stcol{
184                         border:0px none;
185                         padding-left:0pt;
186                 }
187                 td ol{
188                         font-size:inherit;
189                         margin-left:28px;
190                 }
191                 td ul{
192                         font-size:inherit;
193                         margin-left:24px;
194                 }
195                 .DefListTbl{
196                         width:90%;
197                         margin-left:-3pt;
198                 }
199                 .syntaxdiagramtbl{
200                         margin-left:-3pt;
201                 }
202                 .sdtbl{
203                 }
204                 .sdrow{
205                 }
206                 .sdtblp{
207                         border:0px none;
208                         font-size:inherit;
209                         line-height:120%;
210                         margin-bottom:0;
211                         padding-bottom:0px;
212                         padding-top:5px;
213                         padding-left:0px;
214                         padding-right:5px;
215                         vertical-align:top;
216                 }
217                 .idepara, .ide_para{
218                         border:0px none;
219                         font-size:inherit;
220                         line-height:120%;
221                         margin-bottom:0;
222                         padding-bottom:0px;
223                         padding-top:5px;
224                         padding-left:0px;
225                         padding-right:5px;
226                         vertical-align:top;
227                 }
228                 
229                 .specs {
230                         border-collapse:collapse;
231                 }
232                 .specs td, .specs th {
233                         font-size: 14px;
234                 }
235                 .specs td {
236                         border: 1px solid black;
237                 }
238                 .specs td td, .specs td th {
239                         border: none;
240                 }
241                 .specs  td, .specs td td, .specs td th {
242                         padding: 0 0.2em 0.2em;
243                         text-align: center;
244                 }
245                 .specs td tr:last-child td, 
246                 .specs td tr:last-child th {
247                         padding: 0 0.2em;
248                 }
249                 .serial-time {
250                 }
251                 .modified-time {
252                 width: 6.5em;
253                 }
254                 .compiler {
255                 }
256                 .comp-opt {
257                 }
258                 .sys-specs {
259                         width: 18em;
260                 }
261                 .note {
262                         font-size:small;
263                         font-style: italic;
264                 }
265         </style>
266         <title>Intel&reg; Threading Building Blocks. Fractal sample</title>
267 </head>
268 <body>
269         
270         <div id="banner">
271                 <img class="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAAAsCAYAAAA+aAX8AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
272                                 jwv8YQUAAAAJcEhZcwAALiIAAC4iAari3ZIAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVh
273                                 ZHlxyWU8AAAIN0lEQVRoQ+WaCaxdUxSGW2ouatZWaVS15nkqkZhSVERQglLEPCam1BCixhqqCKUS
274                                 NIiYpxhqHmouIeaY5ylFzA/v1fev8+/j3N5737v3vtf3buNP/uy9/7X2Ovuse4a997m9mgltbW2L
275                                 wRHwcHgFfAx+AH+GCb/BT2fNmvUk5ZXwYOrrOsTcCU5CJ74pPBJeA5+Bn8LfOLmagf/f8Af4NrwD
276                                 ngg3wdTHh2pOMMB1Gejx8AE4M85mNqD/A7+D78GXkXQFTIMPwUfhdPg6/AxWTRw29b8QruPD9zwY
277                                 zPrwHPi2xxmg3QrfgDfD05BGU24EB1HvC3s7REXgtwDsDzeEY+Ak+AJsUfwE2sJdcBN37V4whiU4
278                                 +KGUM2JEBtpzUInZEa5g9y4FcYfAo+GLPmwOND2HFrXrnAUHWgnq0vzDB2+Bt0H9coPs1m3gmNvD
279                                 ZyITBu234Jp26XoQfCC80sfTAXVv7wOXskuPgnHoSvnTw9P49MDdyOauAQEXhWdC4Vd4ARxmc1OB
280                                 cW0Gv3U+lJDvKFa0ufMg4GXwR3gs7J57sRNoaWnR2+znLB2RkKds6jwItvbckIQiGO+eTkSby71t
281                                 qh100qtsUCJxmmpSw5i2gWebR1jWm2047T1gf0vyfViJEKi/TtHua7wMdNJs8U/zDzjUpqYA47k4
282                                 O704wY+kUZ2P+glQc5ldac9j323sF1cH2EB6h8BxYZdbRDeDOJ16UBJiHDFuMMdYbhjEGA8DxJ4h
283                                 jXIemmMpz6ccqbZ1JUlT/3SrHC+9XeB0MjzV9RHqKFAXVg2nBkH/lxxO8aZYbhjEKEuGQH1BuCKc
284                                 z1IAN61jAtiut1wZ+ByIkwa6r9t6ZmhSFZw9eL0gxiMw4SLLDYMYFZNRDbhpcpgwzXI5MOqSEvKM
285                                 Ue8D+xU4r/Xe+C8HB1ThkhFgNqAXk6FVqyZuA1LcItBXQd+WUvf6YMslwFZvMs7KvMP/SculwKa3
286                                 hfYPPsZpfsvS9QD9PRHbcOmUC9J+H2qfoRJ/0MHgFhHIQC8mQ8twxZ0Ji099vSGegn/TP0BdD/Db
287                                 Ycn0nna9yZiceQcetFwKDE/4oNtZCtDeXHoC7dWlU1Uyvs7U6sBHJ7FaBAPU82TYJUAzFnCU+1mq
288                                 COyfwGLi6k3G05l34BrL/wFxjA/0mKUcaNqBKiJODHclQ3sLCVqZprfEvVCLtThhiskRDFAvXhnv
289                                 QPlfi5uW7ytTL14Nr0Bd1pfDXy1Lv93h6koGLstCLR/SuPJ5SQBBD8hPZATbWs6BrdZk7B4dDNpT
290                                 Mjkw3bL0YjLOsxygPUWDyExtD1GNV6JAeyTUBlDCKtbrScYxhfjyj1s+B9o+dnifIj94AnpNyaC9
291                                 f3QwkNJCTnjOsvRiMi6xrHiaA3ycyYFNbcqBpisl/aoHWaspGdg03uIc43mb/gOilt3CREslQG80
292                                 GedmlkC1KyNPBnU9wOPWMp6Aut0S74HfwIQJ7ldTMjBPdBIiGWC0TRkQlseWNmR2tlwC9DmZjEmW
293                                 pQ/zOAKqtwdcrnW/DpOBPtp9Ii6F9lhL1yWIo2zUvVhxzYHeLVcG/QfT/iuTA3qwan+zGndVP8p2
294                                 k4G8E/wLW4D6PxTlnxgwaDEjaMe6n+USYOvqZKTbUrjQcor3ZSYHRtjULvCrmgwkfY5oRc9B+3Cb
295                                 S4FhIhS+gAtZLgH9Y6GWuQU6mwx9IEqYajlA+47CsZ6lGovFBDTNkA9xM4CmpXsAWySDUrPjqZQl
296                                 QBsfnSoB41UKAvS9ouJmDfpaDpTQ2WRcXYinCZm+pdyEtDClPgLloP0unABPp3lrpoZ+KkWskSgP
297                                 sVZMhlat2t7LQftE2aoCh0sVBOheXclyCYjTp7W19bUsZAQtJuPLTA39gOhg0D7PJtny1xj1tWA+
298                                 sUpAG2j7mZaqAh9tzPSVP+XStL+w/qY1XRlfWdOSYXvp7QKnU6Ayqk4jLZcB2zD4gv1iu52qkvG5
299                                 NKPsyrCuPs9aDtDeDr4EtS7RRyXNCgfYLPtYfoC33D0Hul6tE6jOfvsMhVqaT8PWG85PXR+WxlOP
300                                 pHUIHPNXDsif7NWAT773STdlX6vK4ebi4WRgWybZqFe86tBXUAw4BL+S7UTautTXo9yFcjdKPbsq
301                                 PuQTsKdbZ16YLzZrAgdRRvXLCF/Big/R/wXInn5dffdMt8opNs214Bz6cyqNbUDRcZwTIWjDt3m+
302                                 XtcBxq3pvL6p6mFftlFUE+i8JPxRCRGoawVbcVepGcF4V4eTGPNPHv+7NjUGAhzmQOl20fyhphlg
303                                 T4CxLcQw9WC9Gxb3P4Q37NY4CHJXCuhSW3JnwEXs0qNgSHqVbw210ZP2XwK0A65/6C6NgziaAU5X
304                                 wCIUHB4H86227gKH1+JtL3gd1N5sCdACbgZo5rtgnQKx+hLs/ixsdjBXBd2TtyKNhUOp1/dprgMQ
305                                 rx9x16fcn1KbttrIyf9OkICWw1KApvY2YyXbpSBobKf7OGXApFtI+5d3Qq1BDoL6V87GcDVc9Ivq
306                                 E4D+bjTQbc1i9demreDu8Ch0ffG6hdnmDMrvFbsSsAXczIGk3fwb4VYe+pwBB9Angkd83ADtqgkq
307                                 AjetdTTV1icDlfl+Qi3AP4elHEjaDXscHgFjPdNt4ID6S9B9sNLiKoelmuFuJbCpDJi+hvqz2qFw
308                                 iIfWc2AQusxPgvq484vH2eUgtpYHH0Hteeqb75ZwMQ+j+cDg9PlwFDwd6o9sr0KtbWI/tSPgp32M
309                                 76H+s6mNX3030df5neGq1OtbZDUbOIlFoFaha0L9j0qfCHeAerDqVtODU8+hNThZfR1fHHbpG6kx
310                                 9Or1LzUmVVz+HJXDAAAAAElFTkSuQmCC">
311                 <h1 class="title">Intel&reg; Threading Building Blocks.<br>Fractal sample</h1>
312         </div>
313         
314         <p>
315                 The example calculates two classical Mandelbrot fractals with different priorities. 
316         <br><br>
317                 The application window is divided into two areas where fractals are rendered. With mouse click on an area the user can change the priority of the calculating fractal. In the clicked area the fractal priority is changed to be "high" and the priority of the other fractal is changed to "low". The fractal with "high" priority we will call active.
318                 The example also has the console mode but in this mode the priorities could not be changed during execution.
319         </p>
320
321         <div class="changes">
322                 <div class="h3-alike">System Requirements</div>
323                 <input type="checkbox">
324                 <div class="show-hide">
325                         <p>
326                                 For the most up to date system requirements, see the <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a>
327                         </p>
328                 </div>
329         </div>
330         
331         <div class="changes">
332                 <div class="h3-alike">Files</div>
333                 <input type="checkbox" checked="checked">
334                 <div class="show-hide">
335                         <dl>
336                                 <dt><a href="main.cpp">main.cpp</a>
337                                 <dd>Main program which parses command line options and runs the fractals calculation in GUI or Console mode.
338                                 <dt><a href="fractal.h">fractal.h</a>
339                                 <dd>Interfaces of fractal and fractal_group classes.
340                                 <dt><a href="fractal.cpp">fractal.cpp</a>
341                                 <dd>Implementations of fractal and fractal_group classes.
342                                 <dt><a href="fractal_video.h">fractal_video.h</a>
343                                 <dd>GUI mode support interface.
344                                 <dt><a href="Makefile">Makefile</a>
345                                 <dd>Makefile for building the example.
346                         </dl>
347                 </div>
348         </div>
349
350         <div class="changes">
351                 <div class="h3-alike">Directories</div>
352                 <input type="checkbox" checked="checked">
353                 <div class="show-hide">
354                         <dl>
355                                 <dt><a href="msvs/">msvs</a>
356                                 <dd>Contains Microsoft* Visual Studio* workspace for building and running the example (Windows* systems only).
357                                 <dt><a href="xcode/">xcode</a>
358                                 <dd>Contains Xcode* IDE workspace for building and running the example (macOS* systems only).
359                         </dl>
360                         <p>For information about the minimum supported version of IDE, see <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a></p>
361                 </div>
362         </div>
363
364         <div class="changes">
365                 <div class="h3-alike">Build instructions</div>
366                 <input type="checkbox" checked="checked">
367                 <div class="show-hide">
368                         <p>General build directions can be found <a href="../../index.html">here</a>.</p>
369                 </div>
370         </div>
371
372         <div class="changes">
373                 <div class="h3-alike">Usage</div>
374                 <input type="checkbox" checked="checked">
375                 <div class="show-hide">
376                         <dl>
377                                 <dt><tt>fractal <i>-h</i></tt>
378                                 <dd>Prints the help for command line options
379                                 <dt><tt>fractal [<i>n-of-threads=value</i>] [<i>n-of-frames=value</i>] [<i>max-of-iterations=value</i>] [<i>grain-size=value</i>] [<i>silent</i>] [<i>single</i>]</tt>
380                                 <dt><tt>fractal [<i>n-of-threads</i> [<i>n-of-frames</i> [<i>max-of-iterations</i> [<i>grain-size</i>]]]] [<i>silent</i>] [<i>single</i>]</tt> 
381                                 <dd><i>n-of-threads</i> is the number of threads to use; a range of the form <i>low</i>[:<i>high</i>], where low and optional high are non-negative integers or 'auto' for a platform-specific default number.<br>
382                                         <i>n-of-frames</i> is a number of frames the example processes internally.<br>
383                                         <i>max-of-iterations</i> is a maximum number of the fractal iterations.<br>
384                                         <i>grain-size</i> is an optional grain size, must be a positive integer. <br>
385                                         <i>use-auto-partitioner</i> - use tbb::auto_partitioner.<br>
386                                         <i>silent</i> - no output except elapsed time.<br>
387                                         <i>single</i> - process only one fractal.<br>
388
389                                 <dt>To run a short version of this example, e.g., for use with Intel&reg; Parallel Inspector:
390                                 <dd>Build a <i>debug</i> version of the example
391                                         (see the <a href="../../index.html">build instructions</a>).
392                                         <br>Run it with a small fractal iterations number and the desired number of threads, e.g., <tt>fractal&nbsp;4&nbsp;1&nbsp;10000</tt>.
393                         </dl>
394                 </div>
395         </div>
396
397         <div class="changes">
398                 <div class="h3-alike">Hot keys</div>
399                 <input type="checkbox" checked="checked">
400                 <div class="show-hide">
401                         <p>
402                                 The following hot keys can be used in interactive execution mode when the example is compiled with the graphical user interface:
403                         </p>
404                         <dl>
405                                 <dt>&lt;left mouse button&gt;
406                                 <dd>Make the fractal active and change its priority to high
407                                 <dt>&lt;space&gt;
408                                 <dd>Switch priorities
409                                 <dt>&lt;w&gt;
410                                 <dd>Move the active fractal up
411                                 <dt>&lt;a&gt;
412                                 <dd>Move the active fractal to the left
413                                 <dt>&lt;s&gt;
414                                 <dd>Move the active fractal down
415                                 <dt>&lt;d&gt;
416                                 <dd>Move the active fractal to the right
417                                 <dt>&lt;q&gt;
418                                 <dd>Zoom in the active fractal
419                                 <dt>&lt;e&gt;
420                                 <dd>Zoom out the active fractal
421                                 <dt>&lt;r&gt;
422                                 <dd>Increase quality (count of iterations for each pixel) the active fractal
423                                 <dt>&lt;f&gt;
424                                 <dd>Decrease quality (count of iterations for each pixel) the active fractal
425                                 <dt>&lt;esc&gt;
426                                 <dd>Stop execution.
427                         </dl>
428                 </div>
429         </div>
430         
431         <br>
432         <a href="../index.html">Up to parent directory</a>
433         <hr>
434         <div class="changes">
435         <div class="h3-alike">Legal Information</div>
436                 <input type="checkbox">
437                 <div class="show-hide">
438                         <p>
439                                 Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
440                                 <br>* Other names and brands may be claimed as the property of others. 
441                                 <br>&copy; 2019, Intel Corporation
442                         </p>
443                 </div>
444         </div>  
445         
446 </body>
447 </html>