[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Intel C++ Compiler - Automatic Parallelization



Pessoal,
Oq vocês acham disso?

http://www.devx.com/Intel/Article/28617?trk=DXRSS_intelopt

"Auto-Parallelization
Intel's OpenMP Libraries
The version 9.0 compilers include a production support library to help
developers use OpenMP efficiently. For Linux, the library is
libguide.a; for Windows, it's libguide.lib. Those libraries include the
appropriate headers that can handle all the pragmas and directives.
Intel has also included a number of extensions to OpenMP 2.5, which
assist with getting and setting stack size for parallel threads, and
for fine-tuning memory allocation. These can be invoked by using either
pragmas or environment variables.
Auto-parallelization optimization is designed to thread loops and other
structures wherever possible. This option, invoked with the /Qparallel
switch on Windows, or -parallel switch on Linux, detects parallel loops
capable of being executed safely in parallel and automatically
generates multi-threaded code. The auto-parallelization feature
automatically translates serial portions of the input program into
equivalent multithreaded code.

How does it work? The auto-parallelizer analyzes the dataflow of the
program's loops and generates multithreaded code for those loops which
can be safely and efficiently executed in parallel. For the most part,
the auto-parallelizer focuses on sophisticated loop unrolling and
splitting, and can handle both inner and outer loops. For example, it
would translate the following code:

for (i=1; i<100; i++)
{
  a[i] = a[i] + b[i] * c[i];
}

into

// Thread 1
for (i=1; i<50; i++)
{
  a[i] = a[i] + b[i] * c[i];
}
// Thread 2 
for (i=50; i<100; i++) 
{ 
  a[i] = a[i] + b[i] * c[i]; 
}"



Reply to: