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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT and Tasklets Date: Fri, 19 Dec 2014 19:05:45 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8277a521-7317-4839-b0b6-97f8155be1a4@googlegroups.com> <9e1d2b9f-1b97-4679-8eec-5ba75f3c357c@googlegroups.com> <478c81f9-5233-4ae1-a3eb-e67c4dbd0da1@googlegroups.com> <1r2ziulc78imb$.ad6zx5upic6s$.dlg@40tude.net> <1gfkkgi7ukoj3$.1pqtchynzp9rc$.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1419037546 2364 24.196.82.226 (20 Dec 2014 01:05:46 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 20 Dec 2014 01:05:46 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:24171 Date: 2014-12-19T19:05:45-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1gfkkgi7ukoj3$.1pqtchynzp9rc$.dlg@40tude.net... > On Fri, 19 Dec 2014 11:35:05 -0700, Brad Moore wrote: ... >> I haven't listed all the semantics but for the questions you ask, >> each arm of the parallel block is a separate thread of execution (which >> we have been calling a tasklet). >> >> Each tasklet starts off with its own local declaration of Total, >> initialized to 0, which is the Identity value for the reduction. >> >> So, for the top Total, you end up with {Top_}Total := 1 + A + B; >> for the bottom Total, you end up with {Bottom_}Total := C + D; >> >> Then during the reduction phase, those two results get reduced using the >> reduction operation, which in this case is "+". >> >> So the end result is Total = 1 + A + B + C + D; > > I think that the block should have explicit parameters, e.g. Total must be > an in-out parameter of the block. The syntax should be similar to the > selective accept. Each arm must also have parameters, and only those and > of > the block must be visible within an arm. E.g. A, B must be parameters. > Nothing else should be visible. Interesting. This does sound like a better approach to me. (The whole reduction object idea seems to me to be the worst part of the parallel proposals -- something needs to be available, but that doesn't seem to be the way to do it.) OTOH, the syntax to specify such parameters doesn't seem natural. We surely don't want to force a parallel block or loop to be the only contents of a subprogram. More thought required. Randy.