Re: [eigen] ThreadSafety of Eigen?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2010/3/31 Björn Piltz <bjornpiltz@xxxxxxxxxxxxxx>:
>> By thread-safe we mean what i described in my first email: if
>> you have two matrices m1 and m2, then you can have thread1 working on
>> m1 and thread2 working on m2 without any interference.
>>
>> By re-entrant we mean that the same function can be called
>> concurrently by 2 threads.
>
> I think that should be the otherway around.
> Here is how Qt defines it(Not that it matters, since we are on the
> same page on which kind ot thread safety Eigen should provide):
>
> reentrant - Describes a function which can be called simultaneously by
> multiple threads when each invocation of the function references
> unique data. Calling a reentrant function simultaneously with the same
> data is not safe, and such invocations should be serialized.
>
> thread-safe - Describes a function which can be called simultaneously
> by multiple threads when each invocation references shared data.
> Calling a thread-safe function simultaneously with the same data is
> safe, since all access to the shared data are serialized.

Ah ok so:
 - Qt's notion of "reentrant" is what I was calling "BOTH reentrant
and thread-safe". Eigen has that.
 - Qt's notion of "thread-safe" is what Eigen does not have at all
(and can only be achieved through some locking or atomicity
mechanism).

I'm not an expert, I'm OK to follow Qt's terminology. It's just that,
according to it, Eigen's methods are not thread-safe, which sounds
strange to hear..!

Benoit

>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/