|Re: [eigen] ThreadSafety of Eigen?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] ThreadSafety of Eigen?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 31 Mar 2010 13:16:22 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type :content-transfer-encoding; bh=yE5lA81/zmqkAGbvfxU3cJxT3f3TwklFRousdqGCpoQ=; b=QCv3Rcsku987o04p2GaH6I/IJBknEkje1ml20p+Pu7f0b175mjG3RLXt7OI8QvJ04u lTsDWAHuvNdWhVnI+4+vohPYrTYX/pvkh67s1KLcbOow1iDK0BDA4KRHMOd2CFuHQtLW c5334C1CtiBXvzoHRfmq7Oo4ESH7DhqiE7Cjo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=HoYbeqINlw8Ff94u1dp5oDwlSTCmoFX8gbn50RPypvbvyQ/MY75Fagu4ZtGQdIVQq1 I9xgZMr+maZ/d5PcdDWcq05K6nwPytOfJqw4ZOY+k2IK1ZhrAfLTDh4KLr07OnnevMhp l6CMdFQud/uNwDOCPnL82QBpDr1+TA7QrF1YY=
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
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..!