{"title":"critical\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30c8\u3078\u306e\u540d\u524d\u6307\u5b9a","type":"rich","blog_url":"https://yohhoy.hatenadiary.jp/","height":"190","version":"1.0","blog_title":"yohhoy\u306e\u65e5\u8a18","description":"OpenMP\u306ecritical\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u540d\u524d\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 int acc = 0; #pragma omp parallel for for (int i = 0; i < 10; i++) { #pragma omp critical (acc) acc += func(i); } OpenMP\u30e9\u30f3\u30bf\u30a4\u30e0\u306b\u3088\u308b\u6392\u4ed6\u5236\u5fa1\u3067\u306f\u3001\u540c\u3058\u540d\u524d\u3092\u4ed8\u4e0e\u3057\u305f\u30b3\u30fc\u30c9\u533a\u9593\u540c\u58eb\u304c\u5bfe\u8c61\u3068\u306a\u308b\uff08\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u540d\u524dacc\u3092\u4ed8\u4e0e\uff09\u3002\u540d\u524d\u3092\u660e\u793a\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u6392\u4ed6\u5236\u5fa1\u304c\u884c\u308f\u308c\u308b\u305f\u3081\u3001\u4e26\u884c\u5b9f\u884c\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u4f4e\u4e0b\u306b\u7e4b\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002OpenMP API Version 2.\u2026","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/yohhoy/","published":"2015-11-07 00:00:00","width":"100%","image_url":null,"provider_name":"Hatena Blog","categories":["OpenMP","C","C++"],"url":"https://yohhoy.hatenadiary.jp/entry/20151107/p1","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20151107%2Fp1\" title=\"critical\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30c8\u3078\u306e\u540d\u524d\u6307\u5b9a - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"yohhoy"}