Intel® Array Building Blocks Code Samples

Submit New Article

May 11, 2011 12:00 AM PDT


Overview

We provide code samples that illustrate the use of Intel® Array Building Blocks (Intel® ArBB) in various workloads including those often used for financial services, graphics, image processing, medical imaging and more. The sample applications provide the most direct way to determine:

  • Whether the software is working on your system
  • How you can use the different language constructs (for example, operators, functions, facilities and so on)
  • How to write code and create an application


Installation


The code samples are contained in the installation package and by default are installed to

  • Windows* directory C:\Program Files\Intel\arbb\<version>\samples
  • Linux* directory /opt/intel/arbb/<version>/samples
where <version> is the version of the product being installed.


Building and Running the Samples

On Windows*, open one of the Microsoft* Visual Studio* solution (.sln) files located in the samples folder. For examples, if you use Visual Studio 2005, double-click the file C:\Program Files\Intel\arbb\<version>\samples\samples-vs05.sln.

  1. Select a configuration (the default setting is Debug - Win32 configuration)
  2. From the Build menu, select Build Solution to build the entire solution, which consists of individual projects for each sample. Use the Solution Explorer to view projects grouped in folders by category.
  3. In the Solution Explorer, right-click the name of the sample you are interested in and choose the Set as StartUp Project option from the context menu.
  4. Click the Run button to run the selected sample.
On Linux*, use one of the following shell scripts, located in the folder /opt/intel/arbb/<version>/tools, to build and run the samples:

  • build_run-icc.sh - automatically build and run the sample applications using Intel® C++ Compiler
  • build_run-gcc.sh - automatically build and run the sample applications using GCC*

Samples are grouped into directories corresponding to application areas (categories) such as <installation_directory>/samples/imaging, <installation_directory>/samples/seismic and so on.

The directory <installation_directory>/samples/common includes shared utility code such as methods for reading image files and displaying performance results.

The table below lists the available samples, with short descriptions and Intel ArBB keywords.

Sample

Category

Description

Intel ArBB Keywords

montecarlo

finance

Monte Carlo simulation to estimate the price of a set of European ("call") options

dense, bind, call, mul_scan, rotate, _for, _end_for, add_reduce, replace, exp, log, sqrt, cos

sobel

imaging

Sobel is an edge detection operator for a 2D image.

dense, bind, call, shift, map, neighbor

convolution

imaging

Convolution is an example of 1D, 2D and 3D edge enhancement.

auto_closure, neighbor, clamp, map, dense, bind, capture

mandelbrot

graphics

The Mandelbrot set is produced by evaluating a complex quadratic recurrence within a given domain.

dense, bind, map, call, position, as, _while,_end_while,_if,_end_if, break

kirchhoff

seismic

Kirchhoff migration is applied to a set of traces to reconstruct a sub-surface image.

dense, bind, map, call, position, array, _for,_end_for, sqrt

matrix_vector

math

Single-precision matrix-vector multiplication.

dense, bind, call, repeat_row, add_reduce

math

Single-precision sparse matrix-vector multiplication.

dense, bind, call, repeat_row, add_reduce

fft

math

Computes the fast Fourier transform of a complex 2-dimensional input

std::complex, dense, indices, log, map, cos, sin, _for, section, repeat, cat, replace_col, replace_row

histogram

math

The histogram sample computes the number of pixels at each gray level in a 2D grayscale image

dense, u8, u32, bind, call, add_merge, uncaptured

backprojection

medical

The backprojection algorithm is used for tomographic reconstruction

num_rows, num_cols, num_pages, dense, indices, flatten, _for, _end_for, fill, sin, cos, replace_page, reshape, and shift

 

 



Do you need more help?


This article applies to: Intel® Array Building Blocks Knowledge Base