dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10510
Re: Function design / Future multicore support in DOLFIN
"Martin Sandve Alnæs" <martinal@xxxxxxxxx> writes:
> 2008/11/2 Joachim B Haga <jobh@xxxxxxxxxxxx>:
>>>> On Saturday 01 November 2008 17:10:09 Martin Sandve Alnæs wrote:
>>>> > 2008/11/1 Garth N. Wells <gnw20@xxxxxxxxx>:
>>>> > > So if we remove
>>>> > >
>>>> > > mutable Cell* _cell
>>>> > > mutable int _facet
>>>> > >
>>>> > > from the private member data of Function, does this resolve the
>>>> > > biggest design issue for running multi-threaded?
>>>> >
>>>> > Yes. Otherwise the threads will overwrite each others current cell all
>>>> > the time.
>>
>> If you can get away with making these variables static, thread-local
>> variables (storage class __thread) is simpler.
>
>
> But static... That sounds very limiting.
Perhaps. In that case, I'd suggest just letting each thread have its own
instance of any mutable classes, if that's possible.
-j.
Follow ups
References