Overview
Text filter that demonstrates class pipeline. Example program
reads a file contains decimal integers in text format and changes each
to its square.
The Tutorial explains this example in detail.
Files
- square.cpp
- Source code for example.
- gen_input.cpp
- Source code for sample input generation.
- Makefile
- Makefile for building example.
Directories
- vc7.1
- Contains Microsoft* Visual Studio* .NET 2003 workspace for building and running the example.
- vc8
- Contains Microsoft* Visual Studio* 2005 workspace for building and running the example.
- vc9
- Contains Microsoft* Visual Studio* 2008 workspace for building and running the example.
- xcode
- Contains Xcode* IDE workspace for building and running the example.
To Build
General build directions can be found here.
Usage
- square inputfile outputfile N
- Run the example on the named inputfile (optional, default value is "input.txt") and produce the named outputfile (optional, default value is "output.txt").
N is the number of threads to be used (optional).
- To run a short version of this example, e.g., for use with Intel® Threading Tools:
- Build a debug version of the example
(see the build directions).
Prepare an inputfile with about 5,000 lines of text (e.g., by
gen_input 5000).
Run it with this inputfile and the desired number of threads,
e.g., square inputfile outputfile 4.
Up to parent directory
Copyright © 2005-2009 Intel Corporation. All Rights Reserved.
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.
* Other names and brands may be claimed as the property of others.