In computer science, implicit parallelism is a characteristic of a programming language that allows a compiler or interpreter to automatically exploit the parallelism inherent to the computations expressed by some of the language's constructs. A pure implicitly parallel language does not need special directives, operators or functions to enable parallel execution, in contrast to explicit parallelism.

Programming languages with implicit parallelism include Axum, Binary Modular Dataflow Machine (BMDFM), High Performance Fortran (HPF), Id, LabVIEW, MATLAB M-code, NESL, Single Assignment C (SAC), Streams and Iteration in a Single Assignment Language (SISAL), Z-level programming language (ZPL), and pH.[1]

Example

edit

If a given problem involves performing the same operation on a group of numbers (such as taking the sine or logarithm of each in turn), a language that provides implicit parallelism might allow writing the instruction thus:

numbers = [0 1 2 3 4 5 6 7];
result = sin(numbers);

The compiler or interpreter can calculate the sine of each element independently, spreading the effort across multiple processors if available.

Advantages

edit

A programmer that writes implicitly parallel code does not need to worry about task division or process communication, focusing instead on the problem that their program is intended to solve. Implicit parallelism generally facilitates the design of parallel programs and therefore results in a substantial improvement of programmer productivity.

Many of the constructs necessary to support this also add simplicity or clarity even in the absence of actual parallelism. The example above, of list comprehension in the sin() function, is a useful feature in of itself. By using implicit parallelism, languages effectively have to provide such useful constructs to users simply to support required functionality (a language without a decent for loop, for example, is one few programmers will use).

Disadvantages

edit

Languages with implicit parallelism reduce the control that a programmer has over the parallel execution of a program, resulting sometimes in suboptimal parallel efficiency. The makers of Oz language also note that their early experiments with implicit parallelism showed that implicit parallelism made debugging difficult and object models unnecessarily awkward.[2]

A larger issue is that every program has some parallel and some serial logic. Binary input/output (I/O), for example, requires support for such serial operations as Write() and Seek(). If implicit parallelism is desired, this creates a new requirement for constructs and keywords to support code that cannot be threaded or distributed.

Notes

edit
  1. ^ Nikhil, Rishiyur; Arvind (February 20, 2024). Implicit Parallel Programming in pH. Morgan Kaufmann Publishers. ISBN 978-1-55860-644-9.
  2. ^ Haridi, Seif (June 14, 2006). "Introduction". Tutorial of Oz (Report). Archived from the original on May 14, 2011. Retrieved September 20, 2007.

📚 Artikel Terkait di Wikipedia

Swift (parallel scripting language)

Swift is an implicitly parallel programming language that allows writing scripts that distribute program execution across distributed computing resources

Parallel computing

Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided

Parallel postulate

In geometry, the parallel postulate is the fifth postulate in Euclid's Elements and a distinctive axiom in Euclidean geometry. It states that, in two-dimensional

Id (programming language)

It led to the development of pH, a parallel dialect of Haskell. Id programs are fine grained implicitly parallel. The MVar synchronisation variable abstraction

Implicit-association test

than in-group members as evidence of implicitly biased individuals overcompensating. Oswald's team found that implicit measures were only weakly predictive

Implicit memory

tunes of the songs were the same. This study shows that people are even implicitly making connections amongst their memories. Much memory study focuses on

Implicit surface

( x , y , z ) = 0 {\displaystyle F(x,y,z)=0} can be solved (at least implicitly) for x, y or z. But in general the solution may not be made explicit.

Angel of Light (novel)

clothes. Alone and stubborn and light-headed. In addition to the "implicit parallel" to the Greek drama Oresteia (5th century BCE), Oates draws a thematic