Re: [eigen] Help on solving a race condition

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


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



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