comp.lang.ada
 help / color / mirror / Atom feed
From: "cjpsimon@gmail.com" <cjpsimon@gmail.com>
Subject: Re: Question about concurrent access to array
Date: Fri, 15 Feb 2013 01:11:18 -0800 (PST)
Date: 2013-02-15T01:11:18-08:00	[thread overview]
Message-ID: <96a91f86-46af-445c-82a4-0fc7ac7e74b7@googlegroups.com> (raw)
In-Reply-To: <e6c99c16-e511-463f-a842-926f9b5be43b@googlegroups.com>

Le vendredi 15 février 2013 00:31:59 UTC+1, Adam Beneschan a écrit :
> On Thursday, February 14, 2013 1:53:57 PM UTC-8, Robert A Duff wrote:
> 
> 
> 
> > >...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.
> 
> > 

Data locality  is the most important parameter to consider for good speedup.
Sometimes it is preferable that each task works on a copy of the data (in the stack, for example) in order to improve their affinity with the processor and avoid false sharing in the cache. 
It depends on the hardware configuration (multi-processor vs. mulit-core, shared cache or not, cache levels) and volume calculation to be performed on each data.

> 
> > That would be incorrect code generation, assuming there's no Pack
> 
> > or Component_Size clause.
> 
> 
> 
> You're right.  I missed the clause in 9.10 that specifies that.
> 
> 
> 
>                                 -- Adam




  reply	other threads:[~2013-02-15  9:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 20:39 Question about concurrent access to array john
2013-02-14 21:29 ` Adam Beneschan
2013-02-14 21:53   ` Robert A Duff
2013-02-14 23:31     ` Adam Beneschan
2013-02-15  9:11       ` cjpsimon [this message]
2013-02-14 21:41 ` Niklas Holsti
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox