From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c08aa0f01f894da6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!q15g2000yqk.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: GPUs and CUDA Date: Mon, 11 Jul 2011 16:28:00 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <09ad3bbb-b0a3-438b-9263-b2cb49098e5c@glegroupsg2000goo.googlegroups.com> NNTP-Posting-Host: 24.230.151.194 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1310429230 30572 127.0.0.1 (12 Jul 2011 00:07:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 12 Jul 2011 00:07:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q15g2000yqk.googlegroups.com; posting-host=24.230.151.194; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:21141 Date: 2011-07-11T16:28:00-07:00 List-Id: On Jul 11, 12:45=A0pm, Anatoly Chernyshev wrote: > On Jul 9, 3:18=A0am, 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.