Overview
- A simple example that uses the parallel_for template in a substring matching program. For each position 
in a string, the program displays the length of the largest matching substring elsewhere in the string. 
The program also displays the location of a largest match for each position.  Consider the string "babba" 
as an example. Starting at position 0, "ba" is the largest substring with a match elsewhere in the 
string (position 3). 
- The code located in the sub_string_finder_extended.cpp file 
demonstrates offload programming for Intel® Many Integrated Core (Intel® MIC) Architecture (see build instructions).
Files
- sub_string_finder.cpp
- The example as it appears in the Getting Started Guide.
- sub_string_finder_extended.cpp
- An example similar to the one in the Getting Started Guide, but with an added sequential
    implementation, and with an offload region added that can be executed on Intel® MIC Architecture based coprocessor.
    The three implementations are timed, by using tick_count,
    and the speedup of the parallel version and 
    the speedup of the parallel version and, if applicable, the offload version is calculated and displayed.
- sub_string_finder_pretty.cpp
- An example similar to the one in the Getting Started Guide, but with more attractive printing of the results.
- Makefile
- Makefile for building example.
Directories
- msvs
- Contains Microsoft* Visual Studio* 2010 workspace for building and running the example (Windows* systems only).
- xcode
- Contains Xcode* IDE workspace for building and running the example (OS X* systems only).
To Build
General build directions can be found here.
Usage
- sub_string_finder
- Runs the example as it appears in the Getting Started Guide.
- sub_string_finder_pretty
- Runs the similar example with more attractive printing of the results.
- sub_string_finder_extended
- Runs the example extended with a sequential implementation and an offload region that can be executed on Intel® MIC Architecture based coprocessor.
- To run a short version of this example, e.g., for use with Intel® Threading Tools:
- Build a debug version of the sub_string_finder_pretty example
    (see the build directions).
    
 Run it, e.g., sub_string_finder_pretty.
Up to parent directory
Copyright © 2005-2015 Intel Corporation.  All Rights Reserved.
Intel is a registered trademark or trademark 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.