{"id":6521,"date":"2017-06-11T17:07:56","date_gmt":"2017-06-11T08:07:56","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6521"},"modified":"2017-06-12T00:39:24","modified_gmt":"2017-06-11T15:39:24","slug":"%e8%87%aa%e5%8b%95%e3%83%99%e3%82%af%e3%83%88%e3%83%ab%e5%8c%96%e3%81%af%e3%81%a9%e3%82%8c%e3%81%8f%e3%82%89%e3%81%84%e4%bd%bf%e3%81%84%e7%89%a9%e3%81%ab%e3%81%aa%e3%82%8b%e3%81%8b%ef%bc%88%e3%81%9d-3","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6521","title":{"rendered":"\u81ea\u52d5\u30d9\u30af\u30c8\u30eb\u5316\u306f\u3069\u308c\u304f\u3089\u3044\u4f7f\u3044\u7269\u306b\u306a\u308b\u304b\uff08\u305d\u306e\uff13\uff09"},"content":{"rendered":"<p><a href=\"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6505\">\u305d\u306e\uff12<\/a>\u306e\u7d9a\u304d<\/p>\n<p>2\u8981\u7d20\u306e\u5834\u5408\u3067\u65e2\u306b\u304b\u306a\u308a\u6b8b\u5ff5\u306a\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u30013\u8981\u7d20\u306e\u5834\u5408\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p><!--more--><\/p>\n<blockquote>\n<pre>\r\ntemplate&lt;typename T&gt;\r\nvoid foo(T* __restrict dst, const T* __restrict a, const T* __restrict b, const T* __restrict c, size_t n)\r\n{\r\n\tfor (size_t i = 0; i &lt; n; ++i)\r\n\t{\r\n\t\tdst[0] = *a++;\r\n\t\tdst[1] = *b++;\r\n\t\tdst[2] = *c++;\r\n\t\tdst += 3;\r\n\t}\r\n}\r\n\r\ntemplate void foo&lt;char&gt;(char* __restrict, const char* __restrict, const char* __restrict, const char* __restrict, size_t);\r\n<\/pre>\n<\/blockquote>\n<p>3\u8981\u7d20\u306e\u5834\u5408\u306f\u81ea\u660e\u306a\u6700\u9069\u89e3\u306f\u306a\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001UtVideo \u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote>\n<pre>\r\n    lddqu   xmm0, [rsi+rcx]\r\n    lddqu   xmm1, [rdx+rcx]\r\n    lddqu   xmm2, [rbx+rcx]\r\n\r\n    palignr xmm1, xmm1, 5\r\n    palignr xmm2, xmm2, 11\r\n\r\n    movdqa  xmm5, xmm2\r\n    palignr xmm2, xmm0, 11\r\n    palignr xmm0, xmm1, 11\r\n    palignr xmm1, xmm5, 11\r\n\r\n    movdqa  xmm5, xmm2\r\n    palignr xmm2, xmm1, 10\r\n    palignr xmm1, xmm0, 10\r\n    palignr xmm0, xmm5, 10\r\n\r\n    pshufb  xmm0, xmm7\r\n    pshufb  xmm1, xmm7\r\n    pshufb  xmm2, xmm7\r\n\r\n    movdqu  [rdi   ], xmm0\r\n    movdqu  [rdi+16], xmm1\r\n    movdqu  [rdi+32], xmm2\r\n<\/pre>\n<\/blockquote>\n<p>2\u8981\u7d20\u3067\u30c0\u30e1\u306a\u3082\u306e\u304c3\u8981\u7d20\u3067\u3067\u304d\u308b\u308f\u3051\u304c\u306a\u3044\u306e\u3067\u3001Visual C++ \uff08\u306e cl.exe\uff09\u3068 Clang\/C2 \u306f\u307b\u3063\u3068\u3044\u3066 wandbox \u4e0a\u3067 GCC \u3068 Clang \u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u307e\u305a Clang \u306f 4.0.0 \u3067\u3082 HEAD \u3067\u3082\u30c0\u30e1\u3067\u3001 <a href=\"https:\/\/wandbox.org\/permlink\/qiaO9AMuZjFwS9Ac\" rel=\"nofollow\">GCC \u3060\u3068 5.1.0 \u4ee5\u964d\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u5410\u3044\u3066\u304f\u308c\u307e\u3059\u3002<\/a><\/p>\n<blockquote>\n<pre>\r\n.L5:\r\n    movdqa  xmm0, xmm12\r\n    add     rbx, 1\r\n    add     r11, 48\r\n    movdqu  xmm3, XMMWORD PTR [rsi+r10]\r\n    movdqu  xmm1, XMMWORD PTR [rdx+r10]\r\n    movdqa  xmm4, xmm3\r\n    movdqu  xmm2, XMMWORD PTR [rcx+r10]\r\n    add     r10, 16\r\n    punpcklbw xmm4, xmm1\r\n    movdqa  xmm15, xmm2\r\n    pshufb  xmm4, xmm14\r\n    pshufb  xmm15, xmm13\r\n    pblendvb xmm4, xmm15, xmm0\r\n    movdqa  xmm0, xmm1\r\n    movdqa  xmm15, xmm2\r\n    movups  XMMWORD PTR [r11-64], xmm4\r\n    movdqa  xmm4, xmm3\r\n    pshufb  xmm0, xmm10\r\n    pshufb  xmm4, xmm11\r\n    pshufb  xmm3, xmm7\r\n    pshufb  xmm1, xmm6\r\n    por     xmm4, xmm0\r\n    movdqa  xmm0, xmm8\r\n    pshufb  xmm15, xmm9\r\n    por     xmm1, xmm3\r\n    pshufb  xmm2, xmm5\r\n    pblendvb xmm4, xmm15, xmm0\r\n    movdqa  xmm0, XMMWORD PTR .LC10[rip]\r\n    pblendvb xmm1, xmm2, xmm0\r\n    movups  XMMWORD PTR [r11-48], xmm4\r\n    movups  XMMWORD PTR [r11-32], xmm1\r\n    cmp     r9, rbx\r\n    ja      .L5\r\n<\/pre>\n<\/blockquote>\n<p>\u3053\u308c\u8981\u3059\u308b\u306b\u3001a, b, c \u306e\u305d\u308c\u305e\u308c\u304b\u3089 pshufb \u3067\u8981\u7d20\u3092\u5fc5\u8981\u306a\u4f4d\u7f6e\u306b\u6301\u3063\u3066\u304d\u305f\u5f8c\u3001por \u3084 pblendvb \u3067\u5408\u6210\u3059\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u306e\u3088\u3046\u3067\u3059\u3002x64 \u3067\u30ec\u30b8\u30b9\u30bf\u304c\u591a\u3044\u306e\u3067 pshufb \u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084 pblendvb \u306e\u30bb\u30ec\u30af\u30bf\u306f\u307b\u307c\u5168\u90e8\u30ec\u30b8\u30b9\u30bf\u306b\u4e57\u3063\u3066\u3044\u307e\u3059\u304c\u3001x86 \u3060\u3068\u30ec\u30b8\u30b9\u30bf\u304c\u5c11\u306a\u3044\u306e\u3067\u304b\u306a\u308a\u8f9b\u3044\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u547d\u4ee4\u306e\u6570\u3084\u7a2e\u985e\u3092\u898b\u308b\u9650\u308a\u3067\u306f\u79c1\u304c\u624b\u66f8\u304d\u3057\u305f\u3082\u306e\u306e\u65b9\u304c\u901f\u305d\u3046\u3067\u3059\u3002\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u5358\u7d14\u3067\u3082\u305d\u306e\u3082\u306e\u30ba\u30d0\u30ea\u306e\u547d\u4ee4\u304c\u306a\u3044\u4f8b\u3067\u3059\u304c\u3001\u305d\u3046\u3044\u3046\u3082\u306e\u3053\u305d\u30b3\u30f3\u30d1\u30a4\u30e9\u304c\u8b0e\u306e\u6280\u8853\u3067\u9ad8\u901f\u306a\u30b3\u30fc\u30c9\u3092\u51fa\u529b\u3057\u3066\u307b\u3057\u3044\u6240\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\uff14\u306b\u7d9a\u304f\u304b\u3082\u3057\u308c\u306a\u3044<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u305d\u306e\uff12\u306e\u7d9a\u304d 2\u8981\u7d20\u306e\u5834\u5408\u3067\u65e2\u306b\u304b\u306a\u308a\u6b8b\u5ff5\u306a\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u30013\u8981\u7d20\u306e\u5834\u5408\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-6521","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6521"}],"version-history":[{"count":8,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6521\/revisions"}],"predecessor-version":[{"id":6530,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6521\/revisions\/6530"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6521"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}