Intel® C++ Parallelism Exploration Compiler, Prototype Edition

Important Update for Downloaders

Features in the Intel® C++ Parallelism Exploration Compiler, Prototype Edition, have been incorporated into the Intel® Parallel Studio product now in public beta.  Go to the Intel® Parallel Studio page now, download the beta and start adding parallelism to your applications today.

Product Overview

In recent years, multicore processors have overtaken single core processors as the predominant processor in the hardware system marketplace. Multicore processors provide a greater performance advantage when software is written with parallel programming. The need for new APIs continues to grow as current well known APIs serve only particular segments of the developer market.

The Intel® C++ Parallel Exploration Compiler, Prototype Edition, uses novel C and C++ language extensions to make parallel programming easier. There are four keywords introduced within this version of the prototype compiler - __parallel, __spawn, __par, and __critical. These are used as statement prefixes.  In order for the application to benefit from the parallelism afforded by these keywords, the compiler switch /Qpar must be used during compilation.  The compiler will link in the appropriate runtime support libraries, and the runtime system will manage the actual degree of parallelism.


Sample Code

Example 1
This example demonstrates the difference between summing the elements of two arrays in a third array using a conventional compiler and using the Intel® C++ Parallel Exploration Compiler, Prototype Edition. Since the arrays are independent of each other, these tasks can be performed in parallel using the __parallel and __spawn prefixes.

Computing a Sum of Elements
The following is a function that computes the sum of elements:

int a[1000], b[1000], c[1000]; 


void f_sum ( int length, int *a, int *b, int *c ) 

{ 

int i; 

for (i=0; i<length; i++) 

{ 

c[i] = a[i] + b[i]; 

} 

} 

 

Typical Compiler – Call the Function Sequentially
In a conventional compiler, the following statement uses the above function to sum the elements of two arrays sequentially:

f_sum(1000, a, b, c);

 

Intel C++ Parallelism Exploration Compiler Method 1 – Call the Function in Parallel using _spawn and _parallel
The Intel® C++ Parallel Exploration Compliler, Prototype Edition allows you to change the way this function is called. The loop is divided into two concurrent computations:

__parallel 

{ 

__spawn f_sum(500, a, b, c); 

__spawn f_sum(500, a+500, b+500, c+500); 

}

 

Intel C++ Parallelism Exploration Compiler Method 2 – Parallelize the Function using _par
The Intel® C++ Parallel Exploration Compliler, Prototype Edition allows you to modify the function for parallel processing. Assuming that there is no overlap among arguments, the f_sum function is modified with the addition of the __par keyword. With no change to the way the function is called, the computation is parallelized.

void f_sum ( int length, int *a, int *b, int *c ) 

{ 

int i; 

__par for (i=0; i<length; i++) 

{ 

c[i] = a[i] + b[i]; 

} 

}

 

The following example uses the Intel® C++ Parallel Exploration Compiler, Prototype Edition to perform two parallel searches within a binary tree.

To compile this example, use the following command line to create the binary.

icl /Qpar example2.c
Please download and review the files example2.c , dict.txt and sample.txt.

The program works with a dictionary dict.txt file and an input sample.txt file. To sum the number of times each word in the dict.txt files appears in the sample.txt file, invoke the program with the following command:

Example2.exe sample.txt dict.txt

Technical Requirements

Features in the Intel® C++ Parallelism Exploration Compiler, Prototype Edition, have been incorporated into the Intel® Parallel Studio product now in public beta.  Go to the Intel® Parallel Studio page now, download the beta and start adding parallelism to your applications today.


Frequently Asked Questions

Q - What happened to the Intel® C++ Parallelism Exploration Compiler, Prototype Edition?
A - Our experiment with this compiler was successful and it is no longer available as a prototype.  Features of the Prototype Edition have been incorporated into the Intel® Parallel Studio product now in public beta.  Go to the Intel® Parallel Studio page now, download it and start adding parallelism to your applications today.

 

Q - What are some of the prerequisites to using these keywords?
A - These keywords are available on a Windows* operating system with C and C++ programming languages., using the Intel® C++ Compiler.

Q - Do I have to buy the Intel compiler to use these?
A - No you don't. You just need to make sure that you have an active license of the Intel® C++ Compiler. for Windows on your system. Acquire a commercial license or try an evaluation copy of the Intel® C++ Compiler by visiting /en-us/

Q – What type of feedback is the development team of Intel® C++ Parallel Exploration Compiler Prototype Edition looking for?
A – We are interested in your opinion on the usability of these extensions. We would like to know if they help you write parallel programs or if they impose too many restrictions. Also, please inform us if you find any yet unknown limitations.

Q - How do I get support?
A - Support for the prototype edition is no longer offered; past posts related to the prototype edition are viewable in the What If forum.  Support for Intel® Parallel Studio is available in the Intel® Parallel Studio forum.

Q - What are the complete licensing terms for this product?

A - The licensing terms are listed on the download page.


Primary Technology Contact

Rajiv Deodhar
Senior Staff Engineer in Intel’s Compiler Lab. Rajiv has worked on compilers / architecture for a range of processors including embedded i960, the IXP network processor, IA-32 and Intel® Itanium. He has written assemblers and linkers and developed compilers for Pascal, C/C++, COBOL, and some proprietary languages. His current interests are in heterogeneous compilation: built-in compiler support for architectures that include a host processor and attached accelerators. His other interest is in making parallel programming more accessible by providing simple interfaces built into the programming language. Rajiv holds a Bachelors degree in Electrical Engineering and a Masters in Computer Science both from the Indian Institute of Technology, Bombay.


 

Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.