Threaded Code examples

AE provided


These samples are from Intel® application engineers.


OpenMP and Win32 Threads Usage Example
by Stanislav Bratanov
The code example computes a trigonometric formula for arrays of input coefficients and parallels the computation either using OpenMP directives or creating threads manually. The performance of both approaches is measured and compared.

  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • Parallel reduce


    Parallel version of the Sieve of Eratosthenes

    Copyright 2005-2006 Intel Corporation. All Rights Reserved.

    Example program that computes number of prime numbers up to n, where n is a command line argument. The algorithm here is a fairly efficient version of the sieve of Eratosthenes. The parallel version demonstrates how to use parallel_reduce, and in particular how to exploit lazy splitting.

  • Threading Building Blocks
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • 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.

     

  • Threading Building Blocks
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • 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).

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

  • Threading Building Blocks
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • 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 Intel® de subprocesamiento
  • Threading Building Blocks
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • Parallel for

    Parallel seismic simulation that demonstrates use of parallel_for.

     

    SeismicSimulation.h
    ==============================================================================
    Copyright 2005-2006 Intel Corporation. All Rights Reserved.
    ==============================================================================

  • Threading Building Blocks
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • Open source samples


    Technion Software Systems Lab Projects

    The students in the Technion university took some open source projects, optimized them using a variety of techniques including threading and microarchitecture level tuning and produced faster versions of these applications. The table below gives the projects they worked on. For each of these projects, we have complete source code for the optimized (threaded) version, design methodologyand performance results (before and after optimization).

     

    LAME

    Gilad Raihshtein

  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Computación en paralelo
  • OpenMP


    OpenMP samples

     

    These samples can be downloaded from Open MP Source code repository in SourceForge. 

    Also refer to  OpenMP specifications in openmp.org.

     

    List of samples in the above site from SourceForge:

     

  • Desarrolladores
  • OpenMP*
  • Multi-thread apps for Multi-Core
  • Threaded Code examples
  • Glossary of Technical Terms
  • Parallel Programming & Multi-Core
  • Computación en paralelo
  • Páginas

    Suscribirse a Threaded Code examples