comp.lang.ada
 help / color / mirror / Atom feed
From: Kim Whitelaw <kim@jrs.com>
Subject: Re: Ada compilers for parallel platforms
Date: 1996/04/29
Date: 1996-04-29T00:00:00+00:00	[thread overview]
Message-ID: <96-04-145@comp.compilers> (raw)
In-Reply-To: 96-04-091@comp.compilers


Samir N. Muhammad wrote:
>
> I am interested in Ada compilers for parallel machines. Does anybody
> know whether Ada was able of entering the mainstream of parallel
> programming?  Specifically speaking, has there been an implementation
> of Ada to run on a parallel platform and exploit parallelism at
> different levels(not only task levels). Your help will be highly
> appreciated.

We retargeted an Ada to Microcode compiler to a SIMD 8 by 8 Systolic
Cellular Array Processor.  We handled the parallism by defining
planar-types to represent 8 by 8 arrays of scalar types with one
element per processor.  The arithmetic operators were overloaded to
work with the planar types, e.g. A*B represents 64 multiplications
(one per processor) if either A or B are planar types.

For example,  givin the declarations   A : planar_real; B : planar_real;
  where(A>B); B:=B*2.0; endwhere;

would double B[i] in those processors-i for which A[i] is greater than
B[i].  Because planar operations were used, the test and multiply
would be done simultaneously in all 64 processors.

All of the planar operations (both arithmetic, selection and
systolic-movement) were implemented as builtin functions that
translate to inline-microcode during compilation.  The optimizer
overlapped data-independent operations, so simultaneous add, multiply,
and data movement could be achieved.  For a carefully written 20-tap
FIR-filter, we achieved an effective thruput of 2.6 gigaflops, which
was close to the peak 3.2 gigaflops for the processor.

Because Ada allows data-abstraction thru the use of packages,
overloaded operators, and generic procedures; we were able to develop
an Ada package that allowed parallel algorithms to be developed and
tested using a conventional Ada compiler, and then cross-compiled to
the Systolic Cellular Array Processor.  This would have been
impossible in C (unless a preprocessor is used) since overloaded
operators are not supported. It would have been difficult in C++ since
operators can only be overloaded for classes, which are hard to
generate 0-overhead code for.  Ada allows distinct scalar types to be
created using the "new" keyword with full support for operator
overloading.  For example, you can use "Type planar_integer is new
integer;" and then redefine "+", "-", "*", ... on the type
planar_integer to map to different microcode. In the host-model
designed for emulating the parallel operations, you define "Type
planar_integer is array(0..7,0..7) of integer", and overload the
operators on this type.

Note, the planar data type enhancements were supported using standard
Ada 83; no extensions to the language were needed.

Hope this helps,

Kim Whitelaw
JRS Research Labs
--
Send compilers articles to compilers@iecc.com,
meta-mail to compilers-request@iecc.com.




      parent reply	other threads:[~1996-04-29  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-16  0:00 Ada compilers for parallel platforms Samir N. Muhammad
1996-04-19  0:00 ` Ram Meenakshisundaram
1996-04-29  0:00   ` Any " Alaric B. Williams
1996-04-29  0:00 ` Kim Whitelaw [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox