At 8:03 AM -0800 1/3/02, Cliff Click wrote:
>I can write-combine if I'm going to slather over the whole
>array anyways, right? I.e., if there's already a race
>condition and 2 threads are busy wiping over the whole
>array it doesn't matter whose write wins.
>
>E.g., this is ok to unroll & write-combine:
> for( int i=0; i<A.length; i++ )
> A[i] = translate(A[i]);
Yes, this is perfectly OK. If you don't have any synchronization
operations in a loop, it is perfectly fine to combine several writes.
The prohibition is against writing to memory locations your thread is
not writing to.
Bill
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:37 EDT