| <HTML> |
| <BODY> |
| |
| <H2>Overview</H2> |
| Text filter that demonstrates class pipeline. Example program reads a file |
| containing decimal integers in text format, and changes each to its square. |
| |
| <H2>Files</H2> |
| <DL> |
| <DT><A HREF="square.cpp">square.cpp</A> |
| <DD>Source code for example. |
| <DT><A HREF="gen_input.cpp">gen_input.cpp </A> |
| <DD>Source code for sample input generation. |
| <DT><A HREF="Makefile">Makefile</A> |
| <DD>Makefile for building example. |
| </DL> |
| |
| <H2>Directories</H2> |
| <DL> |
| <DT><A HREF="msvs">msvs</A> |
| <DD>Contains Microsoft* Visual Studio* 2005 workspace for building and running the example. |
| <DT><A HREF="xcode">xcode</A> |
| <DD>Contains Xcode* IDE workspace for building and running the example. |
| </DL> |
| |
| <H2>To Build</H2> |
| General build directions can be found <A HREF=../../index.html#build>here</A>. |
| <P></P> |
| Two additional targets for this example: |
| <DL> |
| <DT><TT>make gen_input</TT> |
| <DD>Create an input generator program that prints out a sequence of integers. |
| <DT><TT>make input.txt</TT> |
| <DD>Create an input file for the example (with help of <TT>gen_input</TT>). |
| </DL> |
| <P></P> |
| |
| <H2>Usage</H2> |
| <DL> |
| <DT><TT>square <I>inputfile</I> <I>outputfile</I> <I>N</I></TT> |
| <DD>Run the example on the named <I>inputfile</I> (optional, default value is "input.txt") and produce the named <I>outputfile</I> (optional, default value is "output.txt"). |
| <I>N</I> is the number of threads to be used (optional). |
| |
| <DT><TT>gen_input [<I>LN</I>] > <I>inputfile</I></TT> |
| <DD>Generate a file named <I>inputfile</I> consisting of <I>LN</I> lines each containing one integer. |
| If not specified, <I>LN</I> is assumed to be 1000000. |
| |
| <DT>To run a short version of this example, e.g., for use with Intel® Threading Tools: |
| <DD>Build a <I>debug</I> version of the example |
| (see the <A HREF=../../index.html#build>build directions</A>). |
| <BR>Prepare an <I>inputfile</I> with about 5,000 lines of text (see the instruction above). |
| <BR>Run it with this <I>inputfile</I> and the desired number of threads, |
| e.g., <TT>square <I>inputfile</I> <I>outputfile</I> 4</TT>. |
| </DL> |
| |
| <HR> |
| <A HREF="../index.html">Up to parent directory</A> |
| <p></p> |
| Copyright © 2005-2010 Intel Corporation. All Rights Reserved. |
| <p></p> |
| Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are |
| registered trademarks or trademarks of Intel Corporation or its |
| subsidiaries in the United States and other countries. |
| <p></p> |
| * Other names and brands may be claimed as the property of others. |
| </BODY> |
| </HTML> |
| |