[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changesets: Re: Parallel access to data created with Octave
From: |
Jarno Rajahalme |
Subject: |
Re: Changesets: Re: Parallel access to data created with Octave |
Date: |
Tue, 25 May 2010 12:31:14 -0700 |
On May 25, 2010, at 2:23 AM, ext Jaroslav Hajek wrote:
> On Tue, May 25, 2010 at 10:55 AM, Michael D. Godfrey
> <address@hidden> wrote:
>> On 5/25/10 8:43 AM, Jaroslav Hajek wrote:
>>>
>>> Although parts of this work are useful per se, it feels more like a
>>> workaround than a solution. What you really need is a thread-safe
>>> reference-counting.
>>>
>>
>> How hard is this to implement? I seems to me that there will be increasing
>> demand
>> for thread-safe operation and work-arounds are not the way to get there.
>>
>> Michael
>>
>>
>
> In the simplest setup, counter increments and decrements should be
> decorated by #pragma omp atomic.
> I think we could have a set of macros, similar to Py_INCREF et al, for
> doing this.
Would this use a global lock? That would be rather bad, I think.
GCC 4.1 and above has builtins for atomic increment / decrement
(__sync_sub_and_fetch () etc.). This site has very good intro to the topic:
http://golubenco.org/2007/06/14/atomic-operations/
Looks pretty straightforward. Apparently ICC implements these too, so it is not
GCC only.
Jarno
- Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/03
- Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/03
- Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/04
- Changesets: Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave, Michael D. Godfrey, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave, Michael D. Godfrey, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave,
Jarno Rajahalme <=
- Re: Changesets: Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/25
- Thread-safe reference counting (modified dim-vector.h), Jarno Rajahalme, 2010/05/26
- Re: Thread-safe reference counting (modified dim-vector.h), Jaroslav Hajek, 2010/05/26
- Re: Thread-safe reference counting (modified dim-vector.h), Jarno Rajahalme, 2010/05/26
- Re: Thread-safe reference counting (modified dim-vector.h), Jaroslav Hajek, 2010/05/26
- Re: Changesets: Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/25
- Re: Changesets: Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/26
- Re: Changesets: Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/26
- Re: Changesets: Re: Parallel access to data created with Octave, Jaroslav Hajek, 2010/05/27
- Re: Changesets: Re: Parallel access to data created with Octave, Jarno Rajahalme, 2010/05/27