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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99210dd26e04d959 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 25 Jan 2011 18:36:29 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Loops and parallel execution References: <4d3eeef7$0$6879$9b4e6d93@newsspool2.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d3f0a1d$0$6993$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Jan 2011 18:36:30 CET NNTP-Posting-Host: ecbfd401.newsspool4.arcor-online.net X-Trace: DXC=k^3g\?[Q@7S=>bdbdS?M0Y4IUK@L?e=@=Snc\616M64>ZLh>_cHTX3j]:EMOcBIRfcX X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:17654 Date: 2011-01-25T18:36:30+01:00 List-Id: On 25.01.11 17:37, Dmitry A. Kazakov wrote: > On Tue, 25 Jan 2011 16:40:38 +0100, Georg Bauhaus wrote: >> Can this be borrowed from HPF (IIUC)? >> Is pragma Pure (P) sufficient to signal reentrance? > > No, it is not sufficient because it is wrong. P cannot be pure because all > instances of P.Op must be synchronized at the end of the "loop." I was thinking of relatively small things, starting from this observation: If a compiler detects two independent paths inside a loop, it will generate sequences of instructions that, while written sequentially, will be executed in parallel by the processor because the processor can do the corresponding distribution across the many register words. Generalize that. The Paraffin library just posted by Brad Moore looks like it will resolve all other issues nicely! :-) On an AS-IF basis, I thought of a tasking profile much < Ravenscar: Other than exiting with a value, each P.Op (K) has no need for communication. Each P.Op (K) is associated with a result object, like this compiler_type Result_Object is limited record Ready : Boolean_Slot; -- a CAS bit? Result : Value_Type; end record; The idea of employing Pure or something similar was to have the compiler prevent each P.Op (K) from meddling in P.Op (J)'s affairs, J /= K, as with protected objects, again on an AS-IF basis, as much as possible.