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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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-7-bit Received: by 10.68.223.40 with SMTP id qr8mr6253019pbc.0.1336998002683; Mon, 14 May 2012 05:20:02 -0700 (PDT) Path: pr3ni24836pbb.0!nntp.google.com!news2.google.com!news.glorb.com!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Mon, 14 May 2012 14:19:26 +0200 Organization: cbb software GmbH Message-ID: References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-05-14T14:19:26+02:00 List-Id: 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. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de