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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.234.38 with SMTP id ub6mr6353422pbc.2.1337000996412; Mon, 14 May 2012 06:09:56 -0700 (PDT) Path: pr3ni24969pbb.0!nntp.google.com!news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 14 May 2012 15:09:54 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> In-Reply-To: Message-ID: <4fb10423$0$6628$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 14 May 2012 15:09:55 CEST NNTP-Posting-Host: f7ff707f.newsspool2.arcor-online.net X-Trace: DXC=WM^?PfFH`5`m7>ihJR;B_cA9EHlD;3Ycb4Fo<]lROoRa8kFjLh>_cHTX3jmc1^d?NGgDXo X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2012-05-14T15:09:55+02:00 List-Id: On 14.05.12 14:19, Dmitry A. Kazakov wrote: > On Mon, 14 May 2012 11:25:55 +0200, stefan-lucks@see-the.signature wrote: > >> On Thu, 10 May 2012, Gustaf Thorslund wrote: >> >>> I like the idea of parallel loops. Parallel functions I don't really >>> know what it is so can't tell. For importance I suppose it depends on >>> who you ask. There might even be those who could live without tasks. >>> >> [...] >>> >>> parfor I in 1..10 loop -- parfor might not be best name, but I had to >>> -- invent something >> >> That looks like the ideal place for a new pragma, rather than a new >> keyword: >> >> for I in 1 .. 10 loop >> pragma(Parallelize_Loop); >> ... >> end loop; > > No. If that is an advise to try to optimize the loop if possible, that > should be a compiler switch. > > When the compiler is rather ordered to run it in parallel and must flag it > as an error if cannot (e.g. a mutex is taken inside etc), then that should > be a statement. > > P.S. I wonder why people keep on calling that thing loop. It has little to > do with iterations. It is a set of paramerized sequences of statements > executed asynchronously with a synchronization point at the end. The syntax > should reflect that. For a start, for all I in 1 .. 10 do { stmt } end do all; for some I in 1 .. 10 do { stmt } end do some; all: do stmt for every I of 1 .. 10, in any order some: do stmt for one I from 1 .. 10, arbitrarily chosen While we are at it, can we have goal directed evaluation � la Icon? while some I ... => P(I, ...) do { stmt } end do some;