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.

71 lines
2.9 KiB

  1. <HTML>
  2. <BODY>
  3. <H2>Overview</H2>
  4. Text filter that demonstrates class pipeline. Example program reads a file
  5. containing decimal integers in text format, and changes each to its square.
  6. <H2>Files</H2>
  7. <DL>
  8. <DT><A HREF="square.cpp">square.cpp</A>
  9. <DD>Source code for example.
  10. <DT><A HREF="gen_input.cpp">gen_input.cpp </A>
  11. <DD>Source code for sample input generation.
  12. <DT><A HREF="Makefile">Makefile</A>
  13. <DD>Makefile for building example.
  14. </DL>
  15. <H2>Directories</H2>
  16. <DL>
  17. <DT><A HREF="msvs">msvs</A>
  18. <DD>Contains Microsoft* Visual Studio* 2005 workspace for building and running the
  19. example (Windows* systems only).<DT><A HREF="xcode">xcode</A>
  20. <DD>Contains Xcode* IDE workspace for building and running the example (OS X*
  21. systems only).</DL>
  22. <H2>To Build</H2>
  23. General build directions can be found <A HREF=../../index.html#build>here</A>.
  24. <P></P>
  25. Two additional targets for this example:
  26. <DL>
  27. <DT><TT>make gen_input</TT>
  28. <DD>Create an input generator program that prints out a sequence of integers.
  29. <DT><TT>make input.txt</TT>
  30. <DD>Create an input file for the example (with help of <TT>gen_input</TT>).
  31. </DL>
  32. <P></P>
  33. <H2>Usage</H2>
  34. <DL>
  35. <DT><TT>square <I>-h</I></TT>
  36. <DD>Prints the help for command line options
  37. <DT><TT>square [<I>n-of-threads</I>=value] [<I>input-file</I>=value] [<I>output-file</I>=value] [<I>max-slice-size</I>=value] [<I>silent</I>]</TT>
  38. <DT><TT>square [<I>n-of-threads</I> [<I>input-file</I> [<I>output-file</I> [<I>max-slice-size</I>]]]] [<I>silent</I>]</TT>
  39. <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 the TBB default.<BR>
  40. <I>input-file</I> is an input file name.<BR>
  41. <I>output-file</I> is an output file name. <BR>
  42. <I>max-slice-size</I> is the maximum number of characters in one slice.<BR>
  43. <I>silent</I> - no output except elapsed time.<BR>
  44. <DT><TT>gen_input [<I>LN</I>] &gt; <I>inputfile</I></TT>
  45. <DD>Generate a file named <I>inputfile</I> consisting of <I>LN</I> lines each containing one integer.
  46. If not specified, <I>LN</I> is assumed to be 1000000.
  47. <DT>To run a short version of this example, e.g., for use with Intel&reg; Parallel Inspector:
  48. <DD>Build a <I>debug</I> version of the example
  49. (see the <A HREF=../../index.html#build>build directions</A>).
  50. <BR>Prepare an <I>inputfile</I> with about 5,000 lines of text (see the instruction above).
  51. <BR>Run it with this <I>inputfile</I> and the desired number of threads,
  52. e.g., <TT>square 4 <I>inputfile</I> <I>outputfile</I></TT>.
  53. </DL>
  54. <HR>
  55. <A HREF="../index.html">Up to parent directory</A>
  56. <p></p>
  57. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  58. <P></P>
  59. Intel is a registered trademark or trademark of Intel Corporation
  60. or its subsidiaries in the United States and other countries.
  61. <p></p>
  62. * Other names and brands may be claimed as the property of others.
  63. </BODY>
  64. </HTML>