{"id":6870,"date":"2018-05-01T23:05:35","date_gmt":"2018-05-01T14:05:35","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6870"},"modified":"2018-05-01T23:38:54","modified_gmt":"2018-05-01T14:38:54","slug":"cmake-%e3%81%a7%e3%82%bd%e3%83%bc%e3%82%b9%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%94%e3%81%a8%e3%81%ab%e7%95%b0%e3%81%aa%e3%82%8b%e3%82%b3%e3%83%b3%e3%83%91%e3%82%a4%e3%83%ab%e3%82%aa%e3%83%97","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6870","title":{"rendered":"CMake \u3067\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3054\u3068\u306b\u7570\u306a\u308b\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4e0e\u3048\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Ut Video Codec Suite \u306e\u305f\u3081\u306b CMakeLists.txt \u3092\u66f8\u3053\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u5897\u3084\u3059\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001 UtVideo \u5168\u4f53\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3053\u3068\u306f\u8003\u3048\u3066\u3044\u307e\u305b\u3093\u3002\uff08\u5358\u306a\u308b\u6280\u8853\u7684\u8208\u5473\u3001\u306b\u8fd1\u3044\uff09<\/p>\n<p><!--more--><\/p>\n<p>\u3055\u3066\u3001UtVideo \u3067\u306f AVX \u7248 AVX2 \u7248\u2026\u306a\u3069\u3068\u3001CPU \u304c\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u547d\u4ee4\u30bb\u30c3\u30c8\u3054\u3068\u306b\u6700\u9069\u5316\u30eb\u30fc\u30c1\u30f3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u306b\u306f\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3054\u3068\u306b\u7570\u306a\u308b\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4e0e\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070 GCC\/Clang \u3060\u3068\u3059\u308b\u3068\u3001AVX2 \u7248\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306b\u306f <code>-mavx2 -mbmi -bmi2<\/code> \u3092\u4e0e\u3048\u3001AVX \u7248\u306b\u306f <code>-mavx<\/code> \u3092\u4e0e\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u5b9f\u73fe\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<blockquote>\n<pre>\r\nadd_library(libname STATIC\r\n    libname.cpp\r\n    routine_avx2.cpp\r\n)\r\nset_target_properties(libname PROPERTIES\r\n    COMPILE_FLAGS \"-Wall\"\r\n)\r\nset_source_files_properties(routine_avx2.cpp PROPERTIES\r\n    COMPILE_FLAGS \"-mavx2 -mbmi -mbmi2\"\r\n)\r\n<\/pre>\n<\/blockquote>\n<p><code>set_target_properties<\/code> \u3067 libname \u3092\u69cb\u6210\u3059\u308b\u5168\u3066\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\uff08libname.cpp \u3068 routine_avx2.cpp \u306e\u4e21\u65b9\uff09\u306b\u9069\u7528\u3055\u308c\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3001<code>set_source_files_properties<\/code> \u3067 routine_avx2.cpp \u306b\u306e\u307f\u9069\u7528\u3055\u308c\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002\u7d50\u679c\u3068\u3057\u3066\u3001 libname.cpp \u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u306f <code>-Wall<\/code> \u3001routine_avx2.cpp \u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u306f <code>-Wall -mavx2 -mbmi -mbmi2<\/code> \u304c\u4e0e\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3088\u3063\u3066\u306f\u3082\u3063\u3068\u7d30\u304b\u3044\u5236\u5fa1\u304c\u5fc5\u8981\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u81ea\u5206\u304c\u4f7f\u3046\u7bc4\u56f2\u3067\u306f\u3053\u308c\u3067\u9593\u306b\u5408\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ut Video Codec Suite \u306e\u305f\u3081\u306b CMakeLists.txt \u3092\u66f8\u3053\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u5897\u3084\u3059\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\u3001 UtVideo \u5168\u4f53\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3053\u3068\u306f\u8003\u3048\u3066\u3044\u307e\u305b\u3093\u3002\uff08\u5358\u306a [&hellip;]<\/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-6870","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\/6870","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=6870"}],"version-history":[{"count":9,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6870\/revisions"}],"predecessor-version":[{"id":6879,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6870\/revisions\/6879"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6870"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}