{"id":305360,"date":"2020-06-15T15:01:12","date_gmt":"2020-06-15T15:01:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305360"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305360","title":{"rendered":"\u0414\u043e\u043b\u043e\u0439 \u0446\u0438\u043a\u043b\u044b, \u0438\u043b\u0438 \u041d\u0435\u043b\u0435\u043d\u0438\u0432\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0432 C++"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/506652\/\">\n<blockquote><p>&quot;\u041a\u0442\u043e \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u043f\u0443\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0440\u043e\u0441\u0438\u0442 \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.&quot;<\/p>\n<p>  \u2014 \u0414\u0440\u0435\u0432\u043d\u044f\u044f \u043c\u0443\u0434\u0440\u043e\u0441\u0442\u044c<\/p><\/blockquote>\n<p>\u0426\u0438\u043a\u043b\u044b \u0443\u0436\u0430\u0441\u043d\u044b. \u0426\u0438\u043a\u043b\u044b \u0441\u043b\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, <em>\u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e<\/em> \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442. \u0412 \u0446\u0438\u043a\u043b\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0446\u0438\u043a\u043b\u0430 \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435. \u0426\u0438\u043a\u043b\u044b \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0438 \u0442.\u0434. \u0438 \u0442.\u043f.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u0434\u0440\u0435\u0432\u043b\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u043e\u0432. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0446\u0438\u043a\u043b\u044b \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0417\u0430\u0442\u0435\u043c \u043e\u043d\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b. \u0418 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u0434\u0435\u0439 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0440\u044b\u0432\u043e\u043c. \u041d\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0438\u0434\u0435\u0430\u043b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442, \u0438 \u043b\u044e\u0434\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u043b\u0438\u0442\u044c \u0441\u0432\u0435\u0442 \u043d\u0430 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u043d\u043e\u0432\u0443\u044e, \u043d\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0443\u044e \u0438\u0434\u0435\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0440\u044b\u0432 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0436\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043b\u0451\u0433\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043b\u044c\u0446\u0435\u0432 \u043f\u043e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435?<\/p>\n<p><a name=\"habracut\"><\/a><br \/>  <a name=\"contents\"><\/a>  <\/p>\n<h2 id=\"soderzhanie\">\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<ol>\n<li><a href=\"#existing-models\">\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/li>\n<li><a href=\"#basic-concepts\">\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f<\/a><br \/> \n<ol>\n<li><a href=\"#definition-1-reduction\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u21161: \u0441\u0432\u0451\u0440\u0442\u043a\u0430<\/a><\/li>\n<li><a href=\"#definition-2-reduce-kernel\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u21162: \u044f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/a><\/li>\n<\/ol>\n<\/li>\n<li><a href=\"#philosophy\">\u0418\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u044f<\/a><br \/> \n<ol>\n<li><a href=\"#fact-1\">\u0424\u0430\u043a\u0442 \u21161: \u043a\u0430\u0436\u0434\u044b\u0439 \u0446\u0438\u043a\u043b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/a><\/li>\n<li><a href=\"#fact-2\">\u0424\u0430\u043a\u0442 \u21162: \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0446\u0438\u043a\u043b\u043e\u0432 \u0440\u0430\u0441\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435<\/a><\/li>\n<li><a href=\"#fact-3\">\u0424\u0430\u043a\u0442 \u21163: \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0432\u0451\u0440\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430<\/a><\/li>\n<li><a href=\"#fact-4\">\u0424\u0430\u043a\u0442 \u21164: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f<\/a><\/li>\n<li><a href=\"#back-to-reduce\">\u0421\u043d\u043e\u0432\u0430 \u043a \u0441\u0432\u0451\u0440\u0442\u043a\u0435<\/a><\/li>\n<\/ol>\n<\/li>\n<li><a href=\"#code\">\u042f \u043f\u0442\u0438\u0447\u043a\u0430, \u043c\u043d\u0435 \u0442\u0430\u043a\u043e\u0435 \u0441\u043b\u043e\u0436\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u044f \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0434 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u044e?<\/a><br \/> \n<ol>\n<li><a href=\"#simple-example\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/li>\n<li><a href=\"#constexpr\">constexpr<\/a><\/li>\n<\/ol>\n<\/li>\n<li><a href=\"#multithreading\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/a><\/li>\n<li><a href=\"#comparison\">\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430<\/a><\/li>\n<li><a href=\"#links\">\u0421\u0441\u044b\u043b\u043a\u0438<\/a><\/li>\n<\/ol>\n<p>  <a name=\"existing-models\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/a><\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0446\u0438\u043a\u043b\u043e\u0432 \u2014 \u044d\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <a href=\"https:\/\/www.boost.org\/doc\/libs\/1_73_0\/libs\/iterator\/doc\/index.html\" rel=\"nofollow\">Boost.Iterator<\/a>, <a href=\"https:\/\/www.boost.org\/doc\/libs\/1_73_0\/libs\/range\/doc\/html\/index.html\" rel=\"nofollow\">Boost.Range<\/a> \u0438 <a href=\"https:\/\/github.com\/ericniebler\/range-v3\" rel=\"nofollow\">range-v3<\/a>.<\/p>\n<p>  <\/p>\n<blockquote><p>range-v3 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 C++20, \u043d\u043e, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u043f\u0430\u043b\u0438 \u043e\u043d\u0438 \u0442\u0443\u0434\u0430 \u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u0435\u0447\u0451\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442.<\/p><\/blockquote>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b, \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0438\u0437\u0431\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0446\u0438\u043a\u043b\u043e\u0432, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0435\u0434\u0438\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0410 \u044d\u0442\u043e \u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0441\u0445\u043e\u0434 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0442\u0438\u043f\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445, \u0430 \u0432 C++17 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0433\u0438\u0431\u0440\u0438\u0434\u044b \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\/transform_reduce\" rel=\"nofollow\"><code>std::transform_reduce<\/code><\/a>.<\/p>\n<p>  <\/p>\n<p>\u041b\u0435\u043d\u0438\u0432\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0440\u0435\u0448\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u043e \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u043d\u0435 \u043b\u0438\u0448\u0435\u043d\u044b \u0441\u0432\u043e\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u044b \u043e\u0442 \u0441\u0445\u0435\u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 (\u043e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438), \u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c. \u0410 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0443\u0436\u0435 \u0441 C++17 \u0438\u043c\u0435\u044e\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u044f\u0434\u0435\u0440\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u043e\u0438\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e? \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <a name=\"basic-concepts\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f<\/a><\/h2>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0438\u043d\u0443\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <em>\u0441\u0432\u0451\u0440\u0442\u043a\u0430<\/em>.<\/p>\n<p>  <a name=\"definition-1-reduction\"><\/a>  <\/p>\n<h3 id=\"opredelenie-1-svyortkacontents\"><a href=\"#contents\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u21161: \u0441\u0432\u0451\u0440\u0442\u043a\u0430<\/a><\/h3>\n<p>  <\/p>\n<p><em>\u0421\u0432\u0451\u0440\u0442\u043a\u0430<\/em> \u2014 \u044d\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0434 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443, \u0437\u0430\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c\u0443 <a href=\"#%D0%BE%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-2-%D1%8F%D0%B4%D1%80%D0%BE-%D1%81%D0%B2%D1%91%D1%80%D1%82%D0%BA%D0%B8\">\u044f\u0434\u0440\u043e\u043c \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u044f\u0434\u0440\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <a name=\"definition-2-reduce-kernel\"><\/a>  <\/p>\n<h3 id=\"opredelenie-2-yadro-svyortkicontents\"><a href=\"#contents\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u21162: \u044f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/a><\/h3>\n<p>  <\/p>\n<p><em>\u042f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/em> \u2014 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c\u043e\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u0441\u0432\u0451\u0440\u0442\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m2\/v-\/qe\/m2v-qelcla6hhi6o_mfdfthk0j4.png\" alt=\"\u0421\u0432\u0451\u0440\u0442\u043a\u0430\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5a3\/702\/d36\/5a3702d36df40df655b1a02851437e69.svg\" alt=\"$\\{x_0, x_1, x_2\\}$\" data-tex=\"inline\"><\/math> \u0441 \u044f\u0434\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> \u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/31d\/ff6\/7d9\/31dff67d99f46d7e82a848d1a59fe165.svg\" alt=\"$v_0$\" data-tex=\"inline\"><\/math>. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08b\/1d1\/fe1\/08b1d1fe14f6339c995aa8574fd8417b.svg\" alt=\"$v_3$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u0451\u0440\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0441\u0432\u0451\u0440\u0442\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\/accumulate\" rel=\"nofollow\"><code>std::accumulate<\/code><\/a> \u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\/reduce\" rel=\"nofollow\"><code>std::reduce<\/code><\/a>.<\/p>\n<p>  <a name=\"philosophy\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u0418\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u044f<\/a><\/h2>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0438\u0434\u0435\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u0444\u0430\u043a\u0442\u043e\u0432.<\/p>\n<p>  <a name=\"fact-1\"><\/a>  <\/p>\n<h3 id=\"fakt-1-kazhdyy-cikl-mozhno-predstavit-v-vide-svyortkicontents\"><a href=\"#contents\">\u0424\u0430\u043a\u0442 \u21161: \u043a\u0430\u0436\u0434\u044b\u0439 \u0446\u0438\u043a\u043b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0432\u0451\u0440\u0442\u043a\u0438<\/a><\/h3>\n<p>  <\/p>\n<p>\u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0446\u0438\u043a\u043b\u0430 \u2014 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435;<\/li>\n<li>\u041d\u0430\u0431\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438 \u0442.\u043f. \u2014 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432;<\/li>\n<li>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0430 \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u043c\u0435\u0441\u0442\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u044f\u0434\u0440\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0438) \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/li>\n<\/ol>\n<p>  <\/p>\n<pre><code class=\"cpp\">auto v = 0;                   \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: v_0 for (auto i = 0; i &lt; 10; ++i) \/\/ \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c: [x_0, x_1, ...] {     v = f(v, i);              \/\/ \u0414\u0432\u0443\u043c\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0430\u044f                               \/\/ \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: v_{i + 1} = f(v_i, x_i) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0446\u0438\u043a\u043b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u0437\u0438\u0441\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u0441\u0432\u0451\u0440\u0442\u043a\u0438. \u0410 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u2014 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451.<\/p>\n<p>  <\/p>\n<h4 id=\"primer-1-otobrazhenie-cherez-svyortku\">\u041f\u0440\u0438\u043c\u0435\u0440 \u21161: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u0451\u0440\u0442\u043a\u0443<\/h4>\n<p>  <\/p>\n<pre><code class=\"cpp\">template &lt;ForwardIterator I, OutputIterator J, UnaryFunction F&gt; J transform (I begin, I end, J result, F f) {     \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440.     auto initial_value = result;     \/\/ \u042f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438.     auto binary_op =         [] (auto iterator, auto next_element)         {             \/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f...             *iterator = f(next_element);             \/\/ ... \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440.             return ++iterator;         };     \/\/ \u0421\u0432\u0451\u0440\u0442\u043a\u0430.     return accumulate(begin, end, initial_value, binary_op); }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"primer-2-filtraciya-cherez-svyortku\">\u041f\u0440\u0438\u043c\u0435\u0440 \u21162: \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u0451\u0440\u0442\u043a\u0443<\/h4>\n<p>  <\/p>\n<pre><code class=\"cpp\">template &lt;ForwardIterator I, OutputIterator J, UnaryPredicate P&gt; J copy_if (I begin, I end, J result, P p) {     \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.     auto initial_value = result;     \/\/ \u042f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438.     auto binary_op =         [p] (auto iterator, auto next_element)         {             if (p(next_element))             {                 *iterator = next_element;                 ++iterator;             }             return iterator;         };     \/\/ \u0421\u0432\u0451\u0440\u0442\u043a\u0430.     return accumulate(begin, end, initial_value, binary_op); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u041b\u044e\u0431\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"fact-2\"><\/a>  <\/p>\n<h3 id=\"fakt-2-bolshinstvo-ciklov-rasladyvayutsya-na-prostye-sostavlyayuschiecontents\"><a href=\"#contents\">\u0424\u0430\u043a\u0442 \u21162: \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0446\u0438\u043a\u043b\u043e\u0432 \u0440\u0430\u0441\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435<\/a><\/h3>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0446\u0438\u043a\u043b\u043e\u0432 \u2014 \u0442\u0438\u043f\u043e\u0432\u044b\u0435. \u041e\u043d\u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435;<\/li>\n<li>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f;<\/li>\n<li>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430;<\/li>\n<li>\u041f\u043e\u0434\u0441\u0447\u0451\u0442;<\/li>\n<li>\u0421\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435;<\/li>\n<li>\u0417\u0430\u043f\u0438\u0441\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432;<\/li>\n<li>&#8230;<\/li>\n<li>\u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u0438\u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0446\u0438\u043a\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043b\u0435\u0433\u043a\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>  <a name=\"fact-3\"><\/a>  <\/p>\n<h3 id=\"fakt-3-kazhduyu-svyortku-mozhno-predstavit-v-vide-avtomatacontents\"><a href=\"#contents\">\u0424\u0430\u043a\u0442 \u21163: \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0432\u0451\u0440\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430<\/a><\/h3>\n<p>  <\/p>\n<p>\u041f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e, \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0431\u044b\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u0451\u0440\u0442\u043a\u0443 \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442, \u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u2014 \u044d\u0442\u043e \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0430 \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044f\u0434\u0440\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u0438 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u0412\u0430\u0436\u043d\u043e:<\/strong><\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D1%8B%D0%B9_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82\" rel=\"nofollow\">\u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432<\/a>, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043f\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438, \u043d\u043e \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0441\u043e\u043f\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443.<br \/>  \u041d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0434 \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432, \u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u2014 \u043f\u043e\u0434 \u0441\u0442\u0440\u0435\u043b\u043a\u043e\u0439.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430\u0448 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e.<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xh\/3s\/6m\/xh3s6msm4j1pzqweq6tylkje5ei.png\" alt=\"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\"><\/p>\n<p>  <\/p>\n<h4 id=\"primer-1-avtomat-dlya-otobrazheniya\">\u041f\u0440\u0438\u043c\u0435\u0440 \u21161: \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f (<code>transform<\/code>, \u0438\u043b\u0438 <code>map<\/code> \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cl\/ej\/bi\/clejbivxbbzkknxf9ag80znfsac.png\" alt=\"\u0410\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\"><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u0445\u043e\u0434. \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math> \u043e\u043d \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math>, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u0430\u0451\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h4 id=\"primer-2-avtomat-dlya-filtracii\">\u041f\u0440\u0438\u043c\u0435\u0440 \u21162: \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438<\/h4>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jh\/re\/aq\/jhreaq5j3zp3sr5jmlq2wolp828.png\" alt=\"\u0410\u0432\u0442\u043e\u043c\u0430\u0442 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438\"><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math> \u2014 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/69c\/557\/5e9\/69c5575e9b1b42051069fb6122976644.svg\" alt=\"$\\epsilon$\" data-tex=\"inline\"><\/math> \u2014 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0434\u0432\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430. \u041e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math> \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0430\u043c \u0441\u0438\u043c\u0432\u043e\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0443, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/69c\/557\/5e9\/69c5575e9b1b42051069fb6122976644.svg\" alt=\"$\\epsilon$\" data-tex=\"inline\"><\/math> (\u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0434\u0430\u0451\u0442\u0441\u044f). \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>  <a name=\"fact-4\"><\/a>  <\/p>\n<h3 id=\"fakt-4-avtomaty-kombiniruyutsyacontents\"><a href=\"#contents\">\u0424\u0430\u043a\u0442 \u21164: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f<\/a><\/h3>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0430 \u0435\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434, \u0442\u043e, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u044d\u0442\u043e\u0442 \u0432\u044b\u0445\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0443.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/m2\/wm\/hv\/m2wmhvqra33hmatiukez6nic04o.png\" alt=\"\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u043c\u0435\u044f \u043d\u0430\u0431\u043e\u0440 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0434\u0430\u0451\u0442 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <a name=\"back-to-reduce\"><\/a>  <\/p>\n<h3 id=\"snova-k-svyortkecontents\"><a href=\"#contents\">\u0421\u043d\u043e\u0432\u0430 \u043a \u0441\u0432\u0451\u0440\u0442\u043a\u0435<\/a><\/h3>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0441\u0432\u0451\u0440\u0442\u043a\u0443, \u0432 \u043a\u043e\u043d\u0435\u0446 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u044f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ty\/rv\/qa\/tyrvqalkefzg_fm82kcswmziov4.png\" alt=\"\u0426\u0435\u043f\u043e\u0447\u043a\u0430 \u0441 \u044f\u0434\u0440\u043e\u043c \u0432 \u043a\u043e\u043d\u0446\u0435\"><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u043a\u0430\u043a \u0431\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0441\u0445\u043b\u043e\u043f\u043d\u0443\u0442\u044c \u0432\u0441\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439. \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u044f\u0434\u0440\u043e \u0441\u0432\u0451\u0440\u0442\u043a\u0438. \u0410 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_k\/nm\/fy\/_knmfybbajhdy_a1m5a7wni6d-y.png\" alt=\"\u0421\u0445\u043b\u043e\u043f\u043d\u0443\u043b\u0438\"><\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043b\u0438 \u0446\u0438\u043a\u043b \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u0451\u0440\u0442\u043a\u0438. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0441\u0451 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043d\u043e \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u0434\u0435?<\/p>\n<p>  <a name=\"code\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u041a\u043e\u0434<\/a><\/h2>\n<p>  <\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0438\u0434\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/gitlab.com\/star-system\/proxima\" rel=\"nofollow\">\u041f\u0440\u043e\u043a\u0441\u0438\u043c\u0430<\/a>.<\/p>\n<p>  <a name=\"simple-example\"><\/a>  <\/p>\n<h3 id=\"prostoy-primercontents\"><a href=\"#contents\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a><\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &lt;proxima\/compose.hpp&gt; #include &lt;proxima\/kernel\/sum.hpp&gt; #include &lt;proxima\/reduce.hpp&gt; #include &lt;proxima\/transducer\/stride.hpp&gt; #include &lt;proxima\/transducer\/take_while.hpp&gt; #include &lt;proxima\/transducer\/transform.hpp&gt;  #include &lt;cassert&gt;  int main () {     const int items[] = {1, 2, 3, 4, 5};     const auto kernel =         proxima::compose         (             proxima::transform([] (auto x) {return x * x;}),   \/\/ 1. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0435\u0434\u0451\u043d \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442;             proxima::stride(2),                                \/\/ 2. \u0411\u0435\u0440\u0443\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438,                                                                \/\/    \u043a\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0434\u0432\u043e\u0439\u043a\u0435 (\u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0441 \u043d\u0443\u043b\u044f);             proxima::take_while([] (auto x) {return x &lt; 10;}), \/\/ 3. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430                                                                \/\/    \u043e\u043d\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0435\u0441\u044f\u0442\u0438;             proxima::sum                                       \/\/ 4. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f.         );     const auto x = proxima::reduce(items, kernel);     assert(x == 10); \/\/ 1 * 1 + 3 * 3 }<\/code><\/pre>\n<p>  <a name=\"constexpr\"><\/a>  <\/p>\n<h3 id=\"constexprcontents\"><a href=\"#contents\">constexpr<\/a><\/h3>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u0434 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &lt;proxima\/compose.hpp&gt; #include &lt;proxima\/kernel\/sum.hpp&gt; #include &lt;proxima\/reduce.hpp&gt; #include &lt;proxima\/transducer\/stride.hpp&gt; #include &lt;proxima\/transducer\/take_while.hpp&gt; #include &lt;proxima\/transducer\/transform.hpp&gt;  int main () {     constexpr int items[] = {1, 2, 3, 4, 5};     constexpr auto kernel =         proxima::compose         (             proxima::transform([] (auto x) {return x * x;}),   \/\/ 1. \u041a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0435\u0434\u0451\u043d \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442;             proxima::stride(2),                                \/\/ 2. \u0411\u0435\u0440\u0443\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438,                                                                \/\/    \u043a\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0434\u0432\u043e\u0439\u043a\u0435 (\u043d\u0443\u043c\u0435\u0440\u0430\u0446\u0438\u044f \u0441 \u043d\u0443\u043b\u044f);             proxima::take_while([] (auto x) {return x &lt; 10;}), \/\/ 3. \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430                                                                \/\/    \u043e\u043d\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u0435\u0441\u044f\u0442\u0438;             proxima::sum                                       \/\/ 4. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f.         );     constexpr auto x = proxima::reduce(items, kernel);     static_assert(x == 10); \/\/ 1 * 1 + 3 * 3 }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u041f\u0440\u043e\u043a\u0441\u0438\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  <a name=\"multithreading\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/a><\/h2>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u041f\u0440\u043e\u043a\u0441\u0438\u043c\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>pipe<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u043e\u043b\u044c &quot;\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432&quot;:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">proxima::reduce(values,     proxima::compose     (         proxima::for_each(hard_work), \/\/ | \u041f\u043e\u0442\u043e\u043a \u21161                                       \/\/ ----------         proxima::pipe,                \/\/            \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u0432                                       \/\/ ----------         proxima::for_each(hard_work), \/\/ | \u041f\u043e\u0442\u043e\u043a \u21162                                       \/\/ ----------         proxima::pipe,                \/\/            \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u0432                                       \/\/ ----------         proxima::for_each(hard_work), \/\/ | \u041f\u043e\u0442\u043e\u043a \u21163         proxima::sum                  \/\/ | \u041f\u043e\u0442\u043e\u043a \u21163     ));<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c \u0432\u044b\u0448\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0440\u0438 \u043f\u043e\u0442\u043e\u043a\u0430, \u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 (<a href=\"https:\/\/gitlab.com\/star-system\/proxima\/-\/blob\/v0.6.1\/benchmark\/proxima\/reduce_hard.cpp\" rel=\"nofollow\">\u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u0413\u0438\u0442\u043b\u0430\u0431\u0435<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043c\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 \u0442\u0440\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0441\u0432\u0451\u0440\u0442\u043a\u043e\u0439, \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0432\u0451\u0440\u0442\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c. \u0414\u043b\u044f \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 &quot;\u0442\u044f\u0436\u0451\u043b\u044b\u0445&quot; \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0441\u044b\u043f\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0441\u044b\u043f\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">auto hard_work (std::int32_t time_to_sleep) {     std::this_thread::sleep_for(std::chrono::microseconds(time_to_sleep)); }  const auto proxima_crunch_parallel =     [] (auto b, auto e)     {         return             proxima::reduce(b, e,                 proxima::compose                 (                     proxima::for_each(hard_work),                     proxima::pipe,                     proxima::for_each(hard_work),                     proxima::pipe,                     proxima::for_each(hard_work),                     proxima::sum                 ));     };  const auto proxima_crunch =     [] (auto b, auto e)     {         return             proxima::reduce(b, e,                 proxima::compose                 (                     proxima::for_each(hard_work),                     proxima::for_each(hard_work),                     proxima::for_each(hard_work),                     proxima::sum                 ));     };  const auto loop_crunch =     [] (auto b, auto e)     {         auto sum = typename decltype(b)::value_type{0};         while (b != e)         {             hard_work(*b);             hard_work(*b);             hard_work(*b);              sum += *b;             ++b;         }          return sum;     };<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c 1000 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u0430\u0441\u044b\u043f\u0430\u043d\u0438\u0439 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 10 \u0434\u043e 20 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u0443 (\u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u2014 \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">proxima_crunch_parallel | 0.0403945 proxima_crunch          | 0.100419 loop_crunch             | 0.103092<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0447\u0435\u043c &quot;\u0436\u0438\u0440\u043d\u0435\u0435&quot; \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u044b\u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u0430\u0441\u044b\u043f\u0430\u043d\u0438\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 100 \u0434\u043e 200 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434, \u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">proxima_crunch_parallel | 0.213352 proxima_crunch          | 0.624727 loop_crunch             | 0.625393<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432 \u0442\u0440\u0438 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u0438 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0442\u0440\u0438 \u043f\u043e\u0442\u043e\u043a\u0430.<\/p>\n<p>  <a name=\"comparison\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430<\/a><\/h2>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/th>\n<th>STL (\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b)<\/th>\n<th>Boost<\/th>\n<th>range-v3<\/th>\n<th>\u041f\u0440\u043e\u043a\u0441\u0438\u043c\u0430<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u041a\u043e\u043c\u043f\u043e\u043d\u0443\u0435\u043c\u043e\u0441\u0442\u044c<\/td>\n<td>\u041d\u0435\u0442<\/td>\n<td>\u0414\u0430<\/td>\n<td>\u0414\u0430<\/td>\n<td>\u0414\u0430<\/td>\n<\/tr>\n<tr>\n<td>\u0412\u044b\u0432\u043e\u0434 \u0442\u0438\u043f\u043e\u0432<\/td>\n<td>\u041f\u043b\u043e\u0445\u043e<\/td>\n<td>\u0421\u0440\u0435\u0434\u043d\u0435<\/td>\n<td>\u0421\u0440\u0435\u0434\u043d\u0435<\/td>\n<td>\u0425\u043e\u0440\u043e\u0448\u043e<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/td>\n<td>\u041f\u043e\u0447\u0442\u0438*<\/td>\n<td>\u041d\u0435\u0442<\/td>\n<td>\u041d\u0435\u0442<\/td>\n<td>\u0414\u0430<\/td>\n<\/tr>\n<tr>\n<td>\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c<\/td>\n<td>Boost<\/td>\n<td>STL<\/td>\n<td>STL<\/td>\n<td>\u0412\u0441\u0451<\/td>\n<\/tr>\n<tr>\n<td>\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c<\/td>\n<td>\u0421\u043b\u043e\u0436\u043d\u043e<\/td>\n<td>\u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e<\/td>\n<td>\u0421\u043b\u043e\u0436\u043d\u043e<\/td>\n<td>\u041b\u0435\u0433\u043a\u043e<\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/td>\n<td>\u0414\u0430<\/td>\n<td>\u0414\u0430<\/td>\n<td>\u0414\u0430<\/td>\n<td>\u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c<\/td>\n<\/tr>\n<tr>\n<td>constexpr<\/td>\n<td>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e<\/td>\n<td>\u041d\u0435\u0442<\/td>\n<td>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e**<\/td>\n<td>\u0414\u0430***<\/td>\n<\/tr>\n<tr>\n<td>\u041c\u043e\u0434\u0435\u043b\u044c<\/td>\n<td>\u041c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u0430\u044f<\/td>\n<td>\u041b\u0435\u043d\u0438\u0432\u0430\u044f<\/td>\n<td>\u041b\u0435\u043d\u0438\u0432\u0430\u044f<\/td>\n<td>\u041d\u0435\u043b\u0435\u043d\u0438\u0432\u0430\u044f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<blockquote><p>*) \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 STL \u0435\u0449\u0451 \u043d\u0435 \u0432\u0435\u0437\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430.<\/p>\n<p>  **) constexpr \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432, \u0432\u0438\u0434\u0438\u043c\u043e, \u0431\u0443\u0434\u0435\u0442 \u043b\u0443\u0447\u0448\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 STL.<\/p>\n<p>  ***) constexpr \u041f\u0440\u043e\u043a\u0441\u0438\u043c\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 STL. \u0412\u0441\u0451, \u0447\u0442\u043e \u0441\u0432\u043e\u0451 \u2014 \u0443\u0436\u0435 constexpr. \u0412\u0441\u0451, \u0447\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 STL, \u0431\u0443\u0434\u0435\u0442 constexpr \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432 STL \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0432\u044b\u043c.<\/p><\/blockquote>\n<p>  <a name=\"links\"><\/a>  <\/p>\n<h2><a href=\"#contents\">\u0421\u0441\u044b\u043b\u043a\u0438<\/a><\/h2>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/gitlab.com\/star-system\/proxima\" rel=\"nofollow\">\u041f\u0440\u043e\u043a\u0441\u0438\u043c\u0430<\/a><\/li>\n<li><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/algorithm\" rel=\"nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b STL<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/Ableton\/atria\/tree\/master\/src\/atria\/xform\" rel=\"nofollow\">atria::xform<\/a><\/li>\n<li><a href=\"https:\/\/www.boost.org\/doc\/libs\/1_73_0\/libs\/iterator\/doc\/index.html\" rel=\"nofollow\">Boost.Iterator<\/a><\/li>\n<li><a href=\"https:\/\/www.boost.org\/doc\/libs\/1_73_0\/libs\/range\/doc\/html\/index.html\" rel=\"nofollow\">Boost.Range<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/ericniebler\/range-v3\" rel=\"nofollow\">range-v3<\/a><\/li>\n<li><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%B1%D1%81%D1%82%D1%80%D0%B0%D0%BA%D1%82%D0%BD%D1%8B%D0%B9_%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82\" rel=\"nofollow\">\u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442<\/a><\/li>\n<\/ol>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/506652\/\"> https:\/\/habr.com\/ru\/post\/506652\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/506652\/\">\n<blockquote><p>&quot;\u041a\u0442\u043e \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043e\u0448\u0438\u0431\u0430\u043b\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u043f\u0443\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0431\u0440\u043e\u0441\u0438\u0442 \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.&quot;<\/p>\n<p>  \u2014 \u0414\u0440\u0435\u0432\u043d\u044f\u044f \u043c\u0443\u0434\u0440\u043e\u0441\u0442\u044c<\/p><\/blockquote>\n<p>\u0426\u0438\u043a\u043b\u044b \u0443\u0436\u0430\u0441\u043d\u044b. \u0426\u0438\u043a\u043b\u044b \u0441\u043b\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u0440\u0430, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, <em>\u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e<\/em> \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442. \u0412 \u0446\u0438\u043a\u043b\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0446\u0438\u043a\u043b\u0430 \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435. \u0426\u0438\u043a\u043b\u044b \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0438 \u0442.\u0434. \u0438 \u0442.\u043f.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u0434\u0440\u0435\u0432\u043b\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u043e\u0432. \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0446\u0438\u043a\u043b\u044b \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u0438\u0445 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0417\u0430\u0442\u0435\u043c \u043e\u043d\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b. \u0418 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u0434\u0435\u0439 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0440\u044b\u0432\u043e\u043c. \u041d\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0438\u0434\u0435\u0430\u043b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442, \u0438 \u043b\u044e\u0434\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u043e\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u043f\u0440\u043e\u043b\u0438\u0442\u044c \u0441\u0432\u0435\u0442 \u043d\u0430 \u043e\u0442\u043d\u044e\u0434\u044c \u043d\u0435 \u043d\u043e\u0432\u0443\u044e, \u043d\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0443\u044e \u0438\u0434\u0435\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0440\u044b\u0432 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0436\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043b\u0451\u0433\u043a\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043b\u044c\u0446\u0435\u0432 \u043f\u043e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305360","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305360"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305360\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}