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: a07f3367d7,904e84d5dc020db1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.76.201 with SMTP id m9mr59801paw.33.1361489656107; Thu, 21 Feb 2013 15:34:16 -0800 (PST) Path: ov8ni13556pbb.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-hub.siol.net!news.mi.ras.ru!goblin-spool!goblin1!goblin.stu.neva.ru!ottix-news.ottix.net!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Question about concurrent access to array Date: Thu, 14 Feb 2013 16:53:57 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <947b0951-54e4-4a4d-bd26-760eb66390c3@googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1360878837 23423 192.74.137.71 (14 Feb 2013 21:53:57 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 14 Feb 2013 21:53:57 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:pKOVWmtAPlZEp1TMZ8tVSn6yw/c= Content-Type: text/plain; charset=us-ascii Date: 2013-02-14T16:53:57-05:00 List-Id: Adam Beneschan writes: > I'd use an alignment aspect (or representation clause) to make sure > that the array elements are aligned on some boundary, probably based > on the largest integer that your machine can deal with. That's not necessary for correctness. It might be necessary to avoid false sharing of cache lines, as Niklas Holsti mentioned. Depends on the machine. >...Otherwise > there's the risk that two consecutive array elements that "belong" to > different tasks might share part of a "word" (or something), and the > code to write into an element might involve reading the entire word, > modifying part of the word, then writing it back. That would be incorrect code generation, assuming there's no Pack or Component_Size clause. - Bob