Re: [eigen] Help on solving a race condition |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Help on solving a race condition
- From: Rhys Ulerich <rhys.ulerich@xxxxxxxxx>
- Date: Fri, 8 Jun 2012 11:54:43 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=C2dL8CwUXRYvMqqE0o+N2GA2I7esoo+1kpMX9OXf7vA=; b=nYjvYI86+TAM1PMDCchasrVfqQuZpSCBA80MqnUbUkMYAYWO4k01bGJvwml6c3A5s3 z5RbkRdAHX7HXNMb0u85pkzsa6OXtQRLBwMLnC4Hq45TYmjr1MkgYrRr2cvROCTDPtQG 9U9fdN7NUqxRzqcPuYDycMhpM0HK5NfI0yKUiXpSRbD/iNDlycfw3fitWDKwYKJhiF4I bDTKd12vDr0YPy7ajDCDqtj8cQ3pJR7MxHwHV2A7Q0SgQ//sUKmSz9EUCMF4Y09ymRBR hzc5idOIvrWQelJenrjsE571Fo4vSMujQn1QNm4TVUX5gRglZoUzH1p+iEaVaJBQXjKE Ropw==
> Couldn't C++11 also be used if available?
> http://en.cppreference.com/w/cpp/keyword/thread_local
> https://secure.wikimedia.org/wikipedia/en/wiki/C%2B%2B11#Thread-local_storage
Probably. I'd probably say to prefer OpenMP, C++11, non-GNU vendor
extensions, GNU extensions in that order.
One other dumb thought-- if the thread local solution requires static
variables, does this one-per-thread overhead also occur
once-per-translation-unit? That'd be an argument for
Eigen::init_parallel() if the relevant storage could be made global
instead of file static.
- Rhys