Re: RE : Re: [eigen] Help on solving a race condition

[ Thread Index | Date Index | More Archives ]

Indeed, it seems I looked at an old version which did not support ARM.
So that shows in the future might be able to make the initialization
function obsolete.


On Fri, Jun 15, 2012 at 3:43 PM, Bastien ROUCARIES
<roucaries.bastien@xxxxxxxxx> wrote:
> Sorry for top post from my phone.
> My definition of portable is I think quite wide libatomic-ops is portable to
> every target of gcc >4.1
> Because it is used for static initialisation of static members
> It is a pretty safe fallback, and it is used even in embeded world because
> bohem garbage collect use it, and bohem garbage is used by free java.
> Bastien
> Le 15 juin 2012 14:15, "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx> a
> écrit :
> Hi,
> yes I already had a look at a few atomic libs, including atomic-ops,
> but we don't have the same definition of portable. So clearly some
> architectures/systems will require a manual initialization.
> Nevertheless, we could still enable atomic ops for the few systems for
> which we are sure about the results:
> Windows-x86-MSVC -> _InterlockedCompareExchange intrinsic
> Linux/windows-x86-ICC-GCC -> __sync_val_compare_and_swap intrinsic.
> That probably already cover 95% of the use cases, so why not. I
> already have a version doing so.
> Using C++11 atomics is dangerous because currently the compilers
> defines __cplusplus >= 201103L even though they don't support all
> c++11 features. For instance, atomic are supported by clang only from
> the 3.1 version. So in addition to checking for __cplusplus >=
> 201103L, we also have to check the compiler name and version, and
> that's how the nightmare starts...
> gael
> On Fri, Jun 15, 2012 at 1:23 PM, Ilja Honkonen
> <ilja.honkonen@xxxxxxxxxxx> wrote:
>>>>> If you want ...

Mail converted by MHonArc 2.6.19+