You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
3.1 KiB

  1. <HTML>
  2. <BODY>
  3. <H2>Overview</H2>
  4. This directory contains common code that is used in the Intel&reg; Threading Building Blocks (Intel&reg; TBB) examples.
  5. <P>
  6. This code is not intended to be used directly. It is incorporated automatically by the examples that need it.
  7. </P>
  8. <H2>Directories</H2>
  9. <DL>
  10. <DT><A HREF="gui">gui</A>
  11. <DD>GUI code for examples that have graphical user interfaces. Currently supports:
  12. <UL>
  13. <LI>GDI+*, DirectDraw*, Direct2D* (Windows* systems)
  14. <LI>OpenGL* (OS X* systems)
  15. <LI>X window (Linux* or OS X* systems)
  16. </UL>
  17. See the examples that use the GUI
  18. (<A HREF=../parallel_for/tachyon/index.html>tachyon</A>, <A HREF=../parallel_for/seismic/index.html>seismic</A>)
  19. for more details.
  20. </DL>
  21. <DL>
  22. <DT><A HREF="utility">utility</A>
  23. <DD>Common driver & utility code for examples. Currently provides:
  24. <UL>
  25. <LI>class FastRandom - a random number generator that uses linear congruental method
  26. (<A HREF="utility/fast_random.h">fast_random.h</A>)
  27. <LI>class thread_number_range - a class to specify the numbers of threads an example should use
  28. (<A HREF="utility/utility.h">utility.h</A>)
  29. <LI>support for command line interface - class cli_argument_pack and function parse_cli_arguments
  30. (<A HREF="utility/utility.h">utility.h</A>)
  31. </UL>
  32. </DL>
  33. <H2>Common information</H2>
  34. <H3>Number of threads</H3>
  35. Most Intel TBB examples allow to specify <I>n-of-threads</I>, the set of thread numbers that should be used to run an example.
  36. <BR>Usually, it is a range of the form <I>low[:high[:(+|*|#)S]]</I>, where <I>low</I> and optional <I>high</I>
  37. are non-negative integers or 'auto' for the default choice, and optional step expression <I>(+|*|#)S</I>
  38. specifies how thread numbers are chosen within the range:
  39. <UL>
  40. <LI>With <I>+/*</I>, the previous number is incremented/multiplied by <I>S</I>.
  41. E.g., expression '12:16:+1' means 12,13,14,15,16 threads, and '1:16:*2' means 1,2,4,8,16 threads.
  42. <LI>With <I>#</I>, <I>S</I> is the desired number of steps between any subsequent powers of 2;
  43. it must be a power of 2 on its own, with most meaningful values being 2,4, and 8.
  44. For a given number of threads, the actual step value is computed as the quotient
  45. of the nearest smaller power of 2 divided by the number of steps, but is at least 1.
  46. E.g., '1:32:#4' means 1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32 threads;
  47. note the step doubling at 8 and 16 to keep 4 steps between powers of 2.
  48. </UL>
  49. A default value for the number of threads can be customized in an example; if not customized, it is '1:auto:#4'.
  50. The 'auto' parameter is substituted with a value returned by a specified function, which typically is
  51. tbb::task_scheduler_init::default_num_threads().
  52. <P/>
  53. <HR>
  54. <A HREF="../index.html">Up to parent directory</A>
  55. <p></p>
  56. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  57. <P></P>
  58. Intel is a registered trademark or trademark of Intel Corporation
  59. or its subsidiaries in the United States and other countries.
  60. <p></p>
  61. * Other names and brands may be claimed as the property of others.
  62. </BODY>
  63. </HTML>