Threaded Code examples

Parallel while


Introduction

Example that uses parallel_while to do parallel preorder traversal of a sparse graph.
Each vertex in the graph is called a "cell". Each cell has a value. The value is a matrix. Some of the cells have operators that compute the cell's value, using other cell's values as input. A cell that uses the value of cell x is called a successor of x.

The algorithm works as follows.

 

  • Módulos de sub-rotinas Intel®
  • Threaded Code examples
  • Computação paralela
  • Thread
  • Substring finder


    Introduction

    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).

    ==============================================================================

  • Módulos de sub-rotinas Intel®
  • Threaded Code examples
  • Computação paralela
  • Thread
  • Task - tree sum


    Introduction

    This is a simple example that sums values in a tree. The example exhibits some speedup, but not a lot, because it quickly saturates the system bus on a multiprocessor. For good speedup, there needs to be more computation cycles per memory reference. The point of the example is to teach how to use the raw task interface, so the computation is deliberately trivial.


    SerialSumTree.cpp

    ==============================================================================

    Copyright 2005-2006 Intel Corporation. All Rights Reserved.

  • Módulos de sub-rotinas Intel®
  • Threaded Code examples
  • Computação paralela
  • Thread
  • Assine o Threaded Code examples