{"id":816,"date":"2012-01-26T19:02:33","date_gmt":"2012-01-26T10:02:33","guid":{"rendered":"http:\/\/daily.belltail.jp\/?p=816"},"modified":"2012-01-31T09:04:39","modified_gmt":"2012-01-31T00:04:39","slug":"%e3%82%af%e3%83%a9%e3%82%b9%e5%86%85%e3%82%ab%e3%83%bc%e3%83%8d%e3%83%ab","status":"publish","type":"post","link":"https:\/\/daily.belltail.jp\/?p=816","title":{"rendered":"\u30af\u30e9\u30b9\u5185\u30ab\u30fc\u30cd\u30eb"},"content":{"rendered":"<p>CUDA 4.0\u306e\u8a71\u3067\u3059\u3002\u53e4\u304f\u3066\u3054\u3081\u3093\u306a\u3055\u3044\u3002<\/p>\n<p>nvcc\u306f\u9650\u5b9a\u7684\u306a\u304c\u3089C++\u306b\u5bfe\u5fdc\u3057\u3066\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4f8b\u3048\u3070\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u304cvirtual\u3060\u3063\u305f\u308a\u3059\u308b\u3068\u30c0\u30e1\u3068\u304b\u307f\u305f\u3044\u306a\u5236\u9650\u306f\u3042\u308b\u3093\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u81ea\u4f53\u304c\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u306b\u306a\u308c\u306a\u3044\u3068\u306f\u3002<\/p>\n<pre class=\"brush: cpp; title: prog.cu; notranslate\" title=\"prog.cu\">\r\nclass ACUDAClass\r\n{\r\n\t__global__ void kernel();\r\npublic:\r\n\tvoid func()\r\n\t{\r\n\t\tkernel&lt;&lt;&lt;1, 1&gt;&gt;&gt;();\r\n\t}\r\n};\r\n\r\nvoid ACUDAClass::kernel()\r\n{\r\n}\r\n\r\nint main()\r\n{\r\n\tACUDAClass ob;\r\n\tob.func();\r\n}\r\n<\/pre>\n<p>\u3053\u3093\u306a\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% nvcc prog.cu\r\nprog.cu(3): error: illegal combination of memory qualifiers\r\n\r\n1 error detected in the compilation of &quot;\/tmp\/tmpxft_00003d82_00000000-4_prog.cpp1.ii&quot;.\r\n<\/pre>\n<p>\u3082\u3061\u308d\u3093\u3001\u3053\u3046\u3044\u3046\u98a8\u306b<strong>\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u304b\u3089\u30ab\u30fc\u30cd\u30eb\u3092\u547c\u3076<\/strong>\u306e\u306f\u4f55\u3082\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n__global__ void kernel()\r\n{\r\n}\r\n\r\nclass ACUDAClass\r\n{\r\npublic:\r\n\tvoid func()\r\n\t{\r\n\t\tkernel&lt;&lt;&lt;1, 1&gt;&gt;&gt;();\r\n\t}\r\n};\r\n\r\nint main()\r\n{\r\n\tACUDAClass ob;\r\n\tob.func();\r\n}\r\n<\/pre>\n<p>\u7406\u7531\u306f\u3069\u3046\u3082\u5358\u7d14\u306a\u3082\u306e\u3067\u3001this\u3092\u30ab\u30fc\u30cd\u30eb\u306b\u6e21\u305b\u306a\u3044\u304b\u3089\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u3068\u3057\u3066\u306f\u7f6e\u3051\u306a\u3044\u3088\uff01\uff01\u3068\u3044\u3046\u30a2\u30ec\u307f\u305f\u3044\u3002<\/p>\n<p>\u306a\u3089\u3070\u3068\u601d\u3063\u3066\u30ab\u30fc\u30cd\u30eb\u3092static\u306b\u3057\u3066\u3082\u540c\u3058\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\u3002\u306f\u3066\u3002<br \/>\n\u4f8b\u3048\u3070\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570(\u30db\u30b9\u30c8\u5074\u306b\u3042\u308b)\u3092\u53c2\u7167\u3059\u308b\u3068undefined symbol\u3063\u3066\u3061\u3083\u3093\u3068\u30a8\u30e9\u30fc\u5410\u3051\u3066\u308b\u304b\u3089\u540c\u3058\u7a0b\u5ea6\u306e\u554f\u984c\u306e\u3088\u3046\u306a\u6c17\u3082\u3059\u308b\u3002<\/p>\n<p>\u3068\u3053\u308d\u304c\u3001__device__\u3060\u3068\u304a\u3063\u3051\u30fc\u306a\u3093\u3067\u3059\u306d\u3002<br \/>\n\u3075\u3080\u3002\u308f\u304b\u3089\u3093\u3002<\/p>\n<p>\u8ab0\u304b\u30db\u30f3\u30c8\u306e\u3068\u3053\u308d\u6559\u3048\u3066\u304f\u3060\u3057\u3042\u3002<br \/>\n\u3042\u3068\u6700\u521d\u306b\u8a00\u3063\u305f\u3088\u3046\u306b\u3053\u308cCUDA 4.0\u3067\u306e\u8a71\u306a\u306e\u30674.1\u3067\u306f\u3069\u3046\u306a\u3063\u3066\u308b\u304b\u672a\u78ba\u8a8d\u3067\u3059\u3002\u3054\u3081\u3093\u306d\u2229(\u30fb\u03c9\u30fb)\u2229<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CUDA 4.0\u306e\u8a71\u3067\u3059\u3002\u53e4\u304f\u3066\u3054\u3081\u3093\u306a\u3055\u3044\u3002 nvcc\u306f\u9650\u5b9a\u7684\u306a\u304c\u3089C++\u306b\u5bfe\u5fdc\u3057\u3066\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4f8b\u3048\u3070\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u304cvirtual\u3060\u3063\u305f\u308a\u3059\u308b\u3068\u30c0\u30e1\u3068\u304b\u307f\u305f\u3044\u306a\u5236\u9650\u306f\u3042\u308b\u3093\u3067\u3059\u304c\u3001\u30ab\u30fc\u30cd\u30eb\u81ea\u4f53\u304c\u30af\u30e9\u30b9\u30e1\u30f3\u30d0\u306b\u306a\u308c\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-816","post","type-post","status-publish","format-standard","hentry","category-1","tag-cuda"],"_links":{"self":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=816"}],"version-history":[{"count":0,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/816\/revisions"}],"wp:attachment":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}