Threading Technologies

The Intel Compiler is compatible with Microsoft* Visual C++ on Windows*, GNU* gcc on Linux* or OS X*, so it supports the threading technolgies supported by those compilers. The Intel Compiler supports the following threading technologies:

  1. Intel® Cilk™ Plus
  2. OpenMP* 4.0
  3. Intel® Threading Building Blocks

Intel® Cilk™ Plus

Intel® Cilk™ Plus is an extension to the C and C++ languages that supports both data and task parallelism. It uses an optimized work-stealing scheduler that provides efficient parallel task scheduling. It is very easy to learn with only 3 new keywords (cilk_spawn, cilk_sync, cilk_for) for task parallelism, #pragma simd, SIMD-enabled functions and array notation for data parallelism that utilizes SIMD hardware through vectorization. Intel® Cilk™ Plus is also supported by GNU gcc, please visit https://www.cilkplus.org/ for detail information.

To quickly learn the Intel® Cilk™ Plus from a series of short videos, please see Vectorization Essentials

  • Threading Samples using Intel® Cilk™ Plus
  • Click on the sample name to see an in-depth description and source code.
    Sample Name Program Domain/Area Description Target Platforms OSes
    AOBench Rendering Approximates the reflection of light off non-reflective surfaces by ray-casting into the scene from the screen, and the once again from a collision point.
    Usage of Intel® Cilk™ Plus: cilk_for and #pragma simd
    Desktop Windows*; Linux*; OS X*
    Averaging Filter Image Processing A commonly used filter in the field of image processing and is mainly used for removing any noise in a given image.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    Binomial Lattice Finance Used to evaluate an American option, which can be redeemed any time between two dates.
    Usage of Intel® Cilk™ Plus: cilk_for and #pragma simd
    Desktop Windows*; Linux*; OS X*
    Black-Scholes Equation Finance Estimates the price of an option over time. Can be used to smartly hedge the option on its underlying assets, among many other applications.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    CilkSamples Classic Algorithms Illustrates parallel processing techniques using Intel® Cilk™ Plus.
    Host OS: Windows*, OS X*
    Target OS: Android*
    Mobile Android*
    Discrete Cosine Transforms (DCT) Image Processing DCT and Quantization are the first two steps in the JPEG compression standard.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    Fluid Animate Computational Fluid Dynamics Simulate the flow of fluid in a container using the Smoothed-Particle Hydrodynamics model.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    Mandelbrot Image Processing A visually impressive iterative algorithm that checks the bounds of a complex (imaginary) number over iterations and plots the depth (number of iterations) on a complex plane.
    Usage of Intel® Cilk™ Plus: cilk_for and #pragma simd
    Desktop Windows*; Linux*; OS X*
    Merge Sort Classic Algorithms Merge sort algorithm is a comparison-based sorting algorithm. In this sample, we use top-down implementation, which recursively splits list into two halves (called sublists) until size of list is 1. Then merge these two sublists and produce a sorted list.
    Usage of Intel® Cilk™ Plus: cilk_spawn
    Desktop Windows*; Linux*; OS X*
    Monte Carlo Finance Utilizes Monte Carlo simulation to estimate the valuation of a swaption portfolio.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    RTM Stencil Stencil Solve the wave equation using the finite difference method. This sample computes a 3-D 25-point stencil.
    Usage of Intel® Cilk™ Plus: cilk_spawn and #pragma simd
    Desktop Windows*; Linux*; OS X*
    Sepia Filter Image Processing Converts a color image to a duotone image with a dark Brown-Gray color.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*
    Shortest Path Classic Algorithms Dijkstra algorithm is a graph search algorithm that solves the single-source shortest path problem for a graph with non-negative edge path costs, producing a shortest path tree.
    Usage of Intel® Cilk™ Plus: cilk_for and Array Notation
    Desktop Windows*; Linux*; OS X*

Please check back frequently as more samples will be added in the future.

For more complete information about compiler optimizations, see our Optimization Notice.