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: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Fri, 8 Jun 2012 16:35:16 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WdLpeokFwCUIUJ8JygzdgaVMv7RSpECkd11Rkh0lc44=; b=ldpfnXH/2SMVyGoTXLjv6AMcoh6dY9oQnnP6Mk7Bj38/OpUfXxLDdhv6BtPT7Z3c49 IEmh2YSVXIiYFAct1YIfzkJFuvfFwBO4TYTwlC0MYs6YCz2hfz/zBySAr9mNVhHkzArB x/CqAn993KTHdEFDoBk5F7L4yTGLInUVEuUOqTDbR9HI6h1u7XRY1IQ+0flg05PtDEr3 PhsLP4WzX5r4MvyAPsEtY5aIta2vY7JB2Tsl0t0l9ATbwshYKMI39zODsME3rkOGwgY7 3F69xMJphIimq9cfmbzasNO5hu/Ai4xViucXrRj7LbvRIM7bCytMhkfFjZHicMnP6Cr8 Hrig==
On Fri, Jun 8, 2012 at 4:24 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> #pragma omp atomic
> static std::ptrdiff_t m_l1CacheSize =
> manage_caching_sizes_helper(queryL1CacheSize(),8 * 1024);
>
> #pragma omp atomic
> static std::ptrdiff_t m_l2CacheSize =
> manage_caching_sizes_helper(queryTopLevelCacheSize(),1*1024*1024);
Ok, MSVC does not like this but accepts this code
#pragma omp critical
{
static std::ptrdiff_t m_l1CacheSize =
manage_caching_sizes_helper(queryL1CacheSize(),8 * 1024);
static std::ptrdiff_t m_l2CacheSize =
manage_caching_sizes_helper(queryTopLevelCacheSize(),1*1024*1024);
}
Regards,
Hauke