{"id":3482,"date":"2018-05-15T11:11:46","date_gmt":"2018-05-15T10:11:46","guid":{"rendered":"http:\/\/roboblog.fatal-fury.de\/?p=3482"},"modified":"2018-05-15T11:13:42","modified_gmt":"2018-05-15T10:13:42","slug":"c-guns-simdvalarray-stdvalarray-for-sse","status":"publish","type":"post","link":"http:\/\/roboblog.fatal-fury.de\/?p=3482","title":{"rendered":"C++ Guns: SIMDvalarray; std::valarray for SSE"},"content":{"rendered":"<p>SIMDvalarray is the class for representing and manipulating arrays of values like std::valarray but it uses SIMD techniques like SSE, AVX ... and has no subscript operators like slicing.<\/p>\n<p>Einfach SIMDarray mit Operatoren +, -, *, \/, +=, -=, *=, \/=<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\ntemplate&lt;typename T, std::size_t N&gt;\r\nstruct SIMDvalarray : acpl::SIMDarray&lt;T,N&gt; \r\n{ };\r\n\r\n...\r\n\r\nSIMDvalarray arr1 {1.0, 2.0};\r\nSIMDvalarray arr2 {2.0, 4.0};\r\nSIMDvalarray erg1 = arr1+arr2;\r\n<\/pre>\n<p>Erzeugt packed values SIMD Assember Code, wie gew\u00fcnscht. Und mit C++17 Decudtion Guidelines muss man die nervigen, redundanten Template Parameter auch nicht mehr mit angeben.<\/p>\n<p><a href=\"https:\/\/sourceforge.net\/p\/acpl\/code\/ci\/master\/tree\/acpl\/acpllib\/include\/core\/util\/SIMDvalarray.hpp\">https:\/\/sourceforge.net\/p\/acpl\/code\/ci\/master\/tree\/acpl\/acpllib\/include\/core\/util\/SIMDvalarray.hpp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SIMDvalarray is the class for representing and manipulating arrays of values like std::valarray but it uses SIMD techniques like SSE, AVX ... and has no subscript operators like slicing. Einfach SIMDarray mit Operatoren +, -, *, \/, +=, -=, *=, \/= template&lt;typename T, std::size_t N&gt; struct SIMDvalarray : acpl::SIMDarray&lt;T,N&gt; { }; ... SIMDvalarray arr1 {1.0, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17],"class_list":["post-3482","post","type-post","status-publish","format-standard","hentry","category-allgemein","tag-cpp"],"_links":{"self":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3482"}],"version-history":[{"count":2,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3482\/revisions"}],"predecessor-version":[{"id":3484,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=\/wp\/v2\/posts\/3482\/revisions\/3484"}],"wp:attachment":[{"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3482"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/roboblog.fatal-fury.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}