Ateji PX
   HOME

TheInfoList



OR:

Ateji PX is an
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
extension for
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. It is intended to facilliate
parallel computing Parallel computing is a type of computing, computation in which many calculations or Process (computing), processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. ...
on
multi-core processor A multi-core processor (MCP) is a microprocessor on a single integrated circuit (IC) with two or more separate central processing units (CPUs), called ''cores'' to emphasize their multiplicity (for example, ''dual-core'' or ''quad-core''). Ea ...
s,
GPU A graphics processing unit (GPU) is a specialized electronic circuit designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal ...
, Grid and Cloud. Ateji PX can be integrated with the
Eclipse IDE Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. It had been the most popular IDE for Java development until 20 ...
, requires minimal learning of the additional parallel constructs and does not alter the development process.


Code examples


Hello World

public class HelloWorld Each , , symbol introduces a parallel branch. Running this program will print either
Hello
World
or
World
Hello
depending on how the parallel branches happen to be scheduled.


Data parallelism

, (int i : array.length) array +; The quantification (int i : N) creates one parallel branch for each value of i. The effect of this code is to increment all elements of array in parallel. This code is equivalent to , array , array , array rray.length-1+; More complex quantifications are possible. The following example quantifies over the upper left triangle of a square matrix: , (int i:N, int j:N, if i+jj+; ] Code that performs a similar and typically small operation on a large collection of elements is called Data parallelism, data parallel, and appears often in high-performance scientific applications. A typical representative of data-parallel languages for the C/C++ or Fortran ecosystems is
OpenMP OpenMP is an application programming interface (API) that supports multi-platform shared-memory multiprocessing programming in C, C++, and Fortran, on many platforms, instruction-set architectures and operating systems, including Solaris, ...
. Data parallelism features can also be implemented by libraries using dedicated data structures, such as
parallel array In computing, a group of parallel arrays (also known as structure of arrays or SoA) is a form of implicit data structure that uses multiple arrays to represent a singular array of records. It keeps a separate, homogeneous data array for each fi ...
s.


Task parallelism

The term task parallelism is used when work can conceptually be decomposed into a number of logical tasks. In this example, tasks are created recursively: int fib(int n) Task parallelism is implemented in languages such as
Cilk Cilk, Cilk++, Cilk Plus and OpenCilk are general-purpose programming languages designed for multithreaded parallel computing. They are based on the C and C++ programming languages, which they extend with constructs to express parallel loop ...
, and in libraries similar to the fork/join pair of Unix system calls.


Message-passing

Parallel branches have two ways of communicating; either by concurrently reading and writing shared variables, or by sending explicit messages. The operators ! and ? respectively send and receive a message on a channel. In this example, two parallel branches communicate via explicit message passing: Chan chan = new Chan(); , chan ! "Hello"; // branch 2 receives a value from the channel and prints it , , chan ? s; System.out.println(s);


Data-flow

A program is said to be
data-flow In computing, dataflow is a broad concept, which has various meanings depending on the application and context. In the context of software architecture, data flow relates to stream processing or reactive programming. Software architecture Dataf ...
when computation is initiated and synchronized by the availability of data in a flow. A typical example is an adder: it has two inputs, one output, and whenever the two inputs are ready, it sends their sum on the output. void adder(Chan in1, Chan in2, Chan out) Note the parallel read , in2 ? value2; /code>. It means that the two input values can come in any order. Without it, the code may deadlock if values were coming in the wrong order. This shows that parallel primitives in a programming language are not only about performance, but also about the behavior of programs. The adder by itself doesn't do anything, since it reacts on input data. It needs to be put in a context where other parts feed input values and read output values. The way to express this is to compose all pieces in a large parallel block: , source(c1); // generates values on c1 , , source(c2); // generates values on c2 , , adder(c1, c2, c3); , , sink(c3); // read values from c3 Anything that can be thought of as a combination of logical gates or electrical circuits can readily be expressed in this way as a data-flow program.


External links

* {{Parallel computing Object-oriented programming languages Concurrent programming languages Java programming language family Statically typed programming languages JVM programming languages