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.

72 lines
2.9 KiB

  1. <HTML>
  2. <BODY>
  3. <H2>Overview</H2>
  4. This directory contains a simple tbb::flow example that performs
  5. binpacking of N integer values into a near-optimal number of bins
  6. of capacity V. It features a source_node which passes randomly
  7. generated integer values of size<=V to a queue_node. Multiple
  8. function_nodes set about taking values from this queue_node and
  9. packing them into bins according to a best-fit policy. Items that
  10. cannot be made to fit are rejected and returned to the queue. When
  11. a bin is packed as well as it can be, it is passed to a buffer_node
  12. where it waits to be picked up by another function_node. This final
  13. function nodes gathers stats about the bin and optionally prints its
  14. contents. When all bins are accounted for, it optionally prints a
  15. summary of the quality of the bin-packing.
  16. <H2>Files</H2>
  17. <DL>
  18. <DT><A HREF="binpack.cpp">binpack.cpp</A>
  19. <DD>Driver.
  20. <DT><A HREF="Makefile">Makefile</A>
  21. <DD>Makefile for building example.
  22. </DL>
  23. <H2>Directories</H2>
  24. <DL>
  25. <DT><A HREF="msvs">msvs</A>
  26. <DD>Contains Microsoft* Visual Studio* 2008 workspace for building and running the example with the Intel&reg; C++ compiler (Windows* systems only).
  27. <DT><A HREF="xcode">xcode</A>
  28. <DD>Contains Xcode* IDE workspace for building and running the example (OS X* systems only).
  29. </DL>
  30. <H2>To Build</H2>
  31. General build directions can be found <A HREF=../../index.html#build>here</A>.
  32. <P></P>
  33. <H2>Usage</H2>
  34. <DL>
  35. <DT><TT>binpack <I>-h</I></TT>
  36. <DD>Prints the help for command line options
  37. <DT><TT>binpack [<I>#threads</I>=value] [<I>verbose</I>] [<I>silent</I>] [<I>N</I>=value] [<I>V</I>=value] [<I>#packers</I>=value] [<I>optimality</I>=value] [<I>#threads</I>]</TT>
  38. <DD><I>#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 the TBB default.<BR>
  39. <I>verbose</I> print diagnostic output to screen<BR>
  40. <I>silent</I> limits output to timing info; overrides verbose<BR>
  41. <I>N</I> number of values to pack<BR>
  42. <I>V</I> capacity of each bin<BR>
  43. <I>#packers</I> number of concurrent bin packers to use (default=#threads)<BR>
  44. <I>optimality</I> controls optimality of solution; 1 is highest, use larger numbers for less optimal but faster solution<BR>
  45. <DT>To run a short version of this example, e.g., for use with Intel&reg; Parallel Inspector:
  46. <DD>Build a <I>debug</I> version of the example
  47. (see the <A HREF=../../index.html#build>build directions</A>).
  48. <BR>Run it with a small problem size and the desired number of threads, e.g., <TT>binpack 4 N=100</TT>.
  49. </DL>
  50. <HR>
  51. <A HREF="../index.html">Up to parent directory</A>
  52. <p></p>
  53. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  54. <P></P>
  55. Intel is a registered trademark or trademark of Intel Corporation
  56. or its subsidiaries in the United States and other countries.
  57. <p></p>
  58. * Other names and brands may be claimed as the property of others.
  59. </BODY>
  60. </HTML>