comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: GPUs and CUDA
Date: Mon, 11 Jul 2011 16:28:00 -0700 (PDT)
Date: 2011-07-11T16:28:00-07:00	[thread overview]
Message-ID: <ddf5e394-3657-4ce9-9d49-a9ebab411c56@q15g2000yqk.googlegroups.com> (raw)
In-Reply-To: bf681a4d-d0d1-4bcc-95b4-b336fe469009@ct4g2000vbb.googlegroups.com

On Jul 11, 12:45 pm, Anatoly Chernyshev <achernys...@gmail.com> wrote:
> On Jul 9, 3:18 am, a...@att.net wrote:
>
> > It seams that Graphics is not a major subsystem for the Ada maintainers.
> > Maybe that will change for for now the answers are No and No!
>
> > You might find some Graphic links in the GNAT Ada for Java. But for
> > the most part Ada is Text only, with a few third parties binding
> > packages for SDL and openGL graphic engines.
>
> Well, the most attractive application of CUDA is not the graphics, but
> parallel computing using modern graphic chips. The performance gain
> for the parallelizable programs, which can use CUDA, is pretty
> significant on a PC. I was looking into using it myself, and eagerly
> waiting when somebody comes up with the Ada binding.

Err... I think "binding" is perhaps a horrid idea. (Raise your hand if
you just want a light wrapper around C-headers.)
The way to go, IMO, is to allow a specialized pragma to indicate to
the compiler that such and such subprogram is intended for
distribution to the GPUs for parallel work.

As per http://archive.adaic.com/standards/83lrm/html/lrm-02-08.html#2.8
Named associations are, however, only possible if the argument
identifiers are defined. A name given in an argument must be either a
name visible at the place of the pragma or an identifier specific to
the pragma. [...] A pragma that is not language-defined has no effect
if its identifier is not recognized by the (current) implementation.
Furthermore, a pragma (whether language-defined or implementation-
defined) has no effect if its placement or its arguments do not
correspond to what is allowed for the pragma. The region of text over
which a pragma has an effect depends on the pragma.

This would allow something like
 Pragma CUDA( Ralph );
to indicate that the subprogram "Ralph" is to be run on the GPUs; and
it would also allow non-CUDA enabled compilers to compile the source
regardless of whether or not their compiler actually knows about CUDA.



  parent reply	other threads:[~2011-07-11 23:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 21:20 GPUs and CUDA Rego, P.
2011-07-08 23:18 ` anon
2011-07-11 17:45   ` Anatoly Chernyshev
2011-07-11 18:38     ` Georg Bauhaus
2011-07-12  5:59       ` Anatoly Chernyshev
2011-07-13 16:44         ` Shark8
2011-07-13 14:52       ` anon
2011-07-11 23:28     ` Shark8 [this message]
2011-07-12  2:02       ` Rego, P.
2011-07-12 10:26         ` ldries46
2011-07-12 18:53           ` Gene
2011-07-12 23:49           ` Shark8
2011-07-13 15:15             ` ldries46
2011-07-12  2:01     ` Rego, P.
2011-07-11 17:51   ` Nicholas Collin Paul de Glouceſter
replies disabled

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