{"id":266104,"date":"2015-09-22T10:25:02","date_gmt":"2015-09-22T06:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266104"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266104","title":{"rendered":"Intel Threading Building Blocks 4.4 \u2013 \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e?"},"content":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Intel Parallel Studio XE 2016, \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c Intel Threading Building Blocks 4.4. \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439:  <\/p>\n<ul>\n<li>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/li>\n<li>\u041d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0443\u0437\u043b\u043e\u0432 Flow Graph: composite_node \u0438 async_node. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u043e Flow Graph \u0431\u044b\u043b\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0431\u0440\u043e\u0441\u0430 (reset).<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u0435 \u0444\u0438\u0448\u0435\u043a \u0438\u0437 \u0421++11 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e53\/067\/2de\/e530672de1944722bcb526a19ce94c31.png\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h1>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c<\/h1>\n<p>  \u0411\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. Intel TBB \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 tbb::task_scheduler_init, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">tbb::task_scheduler_init my_scheduler(8); <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Intel TBB. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 <i>tbb::task_scheduler_init<\/i>, \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u043b\u043e \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0448\u044c. <\/p>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <i>tbb::global_control<\/i>. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <i>global_control::max_allowed_parallelism<\/i> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 Intel TBB \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 <i>the tbb::task_scheduler_init<\/i>, \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0431\u0449\u0438\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0443\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u0423\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442, \u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0436\u0434\u0430\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">#include &quot;tbb\/parallel_for.h&quot; #include &quot;tbb\/task_scheduler_init.h&quot; #define TBB_PREVIEW_GLOBAL_CONTROL 1 #include &quot;tbb\/global_control.h&quot;  using namespace tbb;  void foo() {     \/\/ The following code could use up to 16 threads.     task_scheduler_init tsi(16);     parallel_for( . . . ); }  void bar() {     \/\/ The following code could use up to 8 threads.     task_scheduler_init tsi(8);     parallel_for( . . . ); }  int main() {     {         const size_t parallelism = task_scheduler_init::default_num_threads();         \/\/ total parallelism that TBB can utilize is cut in half for the dynamic extension         \/\/ of the given scope, including calls to foo() and bar()         global_control c(global_control::max_allowed_parallelism, parallelism\/2);         foo();         bar();     } \/\/ restore previous parallelism limitation, if one existed } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>foo()<\/i> \u0438 <i>bar()<\/i> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 TBB task scheduler \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <i>global_control<\/i> \u0432 <i>main()<\/i> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043b\u0438\u043c\u0438\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u0411\u0443\u0434\u044c \u0443 \u043d\u0430\u0441 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d <i>task_scheduler_init<\/i> \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0440\u0435-\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Intel TBB \u0432 <i>foo()<\/i> \u0438 <i>bar()<\/i> \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0431\u044b, \u0442.\u043a. \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0443\u0436\u0435 \u0438\u043c\u0435\u043b \u0431\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 <i>task_scheduler_init<\/i>. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 <i>foo()<\/i> \u0438 <i>bar()<\/i> \u0431\u044b\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043e\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u044b \u0440\u043e\u0432\u043d\u043e \u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0432 <i>main()<\/i>. C <i>global_control<\/i> \u043c\u044b \u0436\u0451\u0441\u0442\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0435\u043b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 8 \u043f\u043e\u0442\u043e\u043a\u043e\u0432), \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442\u044b <i>global_control<\/i> \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c\u0438. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439, \u043e\u043d \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043b\u0438\u043c\u0438\u0442 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u0422.\u0435. \u0415\u0441\u043b\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 <i>global_control<\/i> \u0441 8 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u0442\u043e\u043c \u0441 4, \u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 4. \u0410 \u0435\u0441\u043b\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441 8, \u043f\u043e\u0442\u043e\u043c \u0441 12, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 8. \u0410 \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 <i>global_control<\/i> \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0442.\u0435. \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u0432\u0441\u0435\u0445 \u00ab\u0436\u0438\u0432\u044b\u0445\u00bb \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f. <\/p>\n<p>  <i>tbb::global_control<\/i> \u043f\u043e\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f preview feature \u0432 Intel TBB 4.4. \u041a\u0440\u043e\u043c\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u044d\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>thread_stack_size<\/i>.<\/p>\n<h1>Flow Graph composite_node<\/h1>\n<p>  \u041d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0443\u0437\u043b\u0430 <i>tbb::flow::composite_node<\/i> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u00ab\u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u00bb \u043b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0441\u043e\u0442\u043d\u044f\u043c\u0438 \u0443\u0437\u043b\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0441\u043e\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 <i>tbb::flow::composite_node<\/i>, \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0432\u044b\u0445\u043e\u0434\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8c3\/c05\/ee0\/8c3c05ee04c9423b86c74cfbf0cf1bcf.png\"\/><\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0432\u044b\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <i>composite_node<\/i> \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432, <i>join_node<\/i> \u0438 <i>function_node<\/i>. \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 n \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435\u0447\u0451\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0440\u0430\u0432\u043d\u0430 n \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441 <i>adder<\/i>. \u0412 \u043d\u0451\u043c \u0435\u0441\u0442\u044c <i>join_node<\/i> j \u0441 \u0434\u0432\u0443\u043c\u044f \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u0438 <i>function_node<\/i> f. j \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0441\u0432\u043e\u0438\u0445 \u0432\u0445\u043e\u0434\u043e\u0432, \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 tuple \u0438\u0437 \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u043d\u0430 \u0432\u0445\u043e\u0434 f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u0430. \u0414\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432 <i>adder<\/i> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u0438\u043f\u0430 <i>composite_node<\/i> \u0441 \u0434\u0432\u0443\u043c\u044f \u0432\u0445\u043e\u0434\u0430\u043c\u0438 \u0438 \u043e\u0434\u043d\u0438\u043c \u0432\u044b\u0445\u043e\u0434\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0443\u043c \u0432\u0445\u043e\u0434\u0430\u043c j \u0438 \u043e\u0434\u043d\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0443 f:<\/p>\n<pre><code class=\"cpp\">#include &quot;tbb\/flow_graph.h&quot; #include &lt;iostream&gt; #include &lt;tuple&gt; using namespace tbb::flow;  class adder : public  composite_node&lt;  tuple&lt; int, int &gt;,  tuple&lt; int &gt; &gt; {     join_node&lt;  tuple&lt; int, int &gt;,  queueing &gt; j;     function_node&lt;  tuple&lt; int, int &gt;, int &gt; f;     typedef  composite_node&lt;  tuple&lt; int, int &gt;,  tuple&lt; int &gt; &gt; base_type;      struct f_body {         int operator()( const  tuple&lt; int, int &gt; &t ) {             int n = (get&lt;1&gt;(t)+1)\/2;             int sum = get&lt;0&gt;(t) + get&lt;1&gt;(t);             std::cout &lt;&lt; &quot;Sum of the first &quot; &lt;&lt; n &lt;&lt;&quot; positive odd numbers is  &quot; &lt;&lt; n &lt;&lt;&quot; squared: &quot;  &lt;&lt; sum &lt;&lt; std::endl;              return  sum;         }     };  public:     adder( graph &g) : base_type(g), j(g), f(g,  unlimited, f_body() ) {         make_edge( j, f );         base_type::input_ports_type input_tuple(input_port&lt;0&gt;(j), input_port&lt;1&gt;(j));         base_type::output_ports_type output_tuple(f);         base_type::set_external_ports(input_tuple, output_tuple);      } }; <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c <i>split_node<\/i> s, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435\u0447\u0451\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 4 \u0442\u0430\u043a\u0438\u0445 \u0447\u0438\u0441\u043b\u0430: 1, 3, 5 \u0438 7. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0440\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <i>adder<\/i>: a0, a1 \u0438 a2. <i>Adder<\/i> a0 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 1 \u0438 3 \u043e\u0442 <i>split_node<\/i>. \u041e\u043d\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u0438 \u0441\u0443\u043c\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a a1. \u0412\u0442\u043e\u0440\u043e\u0439 <i>adder<\/i> a1 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 1 \u0438 3 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430, \u0438 5 \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0442 <i>split_node<\/i>. \u042d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u0438 \u0441\u0443\u043c\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 a2. \u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0440\u0435\u0442\u0438\u0439 adder a2 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0443\u043c\u043c\u0443 1, 3 \u0438 5 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u0438 7 \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043e\u0442 <i>split_node<\/i>. \u041a\u0430\u0436\u0434\u044b\u0439 <i>adder<\/i> \u043f\u0438\u0448\u0435\u0442 \u0441\u0443\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0432\u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0447\u0438\u0441\u0435\u043b \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <i>adder<\/i> \u0432 \u0433\u0440\u0430\u0444\u0435.<\/p>\n<pre><code class=\"cpp\">int main() {     graph g;     split_node&lt; tuple&lt;int, int, int, int&gt; &gt; s(g);     adder a0(g);     adder a1(g);     adder a2(g);        make_edge(output_port&lt;0&gt;(s), input_port&lt;0&gt;(a0));     make_edge(output_port&lt;1&gt;(s), input_port&lt;1&gt;(a0));      make_edge(output_port&lt;0&gt;(a0),input_port&lt;0&gt;(a1));     make_edge(output_port&lt;2&gt;(s), input_port&lt;1&gt;(a1));      make_edge(output_port&lt;0&gt;(a1), input_port&lt;0&gt;(a2));     make_edge(output_port&lt;3&gt;(s), input_port&lt;1&gt;(a2));      s.try_put(std::make_tuple(1,3,5,7));     g.wait_for_all();     return 0; } <\/code><\/pre>\n<h1>Flow Graph async_node<\/h1>\n<p>  \u0428\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <i>async_node<\/i> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043f\u0443\u043b\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 Intel TBB. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 Flow Graph \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c, \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u043c \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, <i>async_node<\/i> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c. \u041e\u043d \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044e\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 TBB Flow Graph \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e. <i>async_node<\/i> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f preview feature \u0432 Intel TBB 4.4.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e53\/067\/2de\/e530672de1944722bcb526a19ce94c31.png\"\/><\/p>\n<h1>\u0421\u0431\u0440\u043e\u0441 flow graph (reset)<\/h1>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Flow Graph \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u044f\u0432\u043d\u043e\u0439 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 (cancel). \u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 <i>tbb::flow::graph::reset(reset_flags f)<\/i> \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0440\u0451\u0431\u0435\u0440 \u0433\u0440\u0430\u0444\u0430 (\u0444\u043b\u0430\u0433 reset(rf_clear_edges)) \u0438\u043b\u0438 \u0441\u0431\u0440\u043e\u0441\u0430 \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0444\u043b\u0430\u0433 reset(rf_reset_bodies)).<\/p>\n<p>  \u0415\u0449\u0451 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c (\u043a\u0430\u043a preview) \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u0433\u0440\u0430\u0444\u043e\u043c:  <\/p>\n<ul>\n<li>\u0412\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0438\u0437 \u0433\u0440\u0430\u0444\u0430<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u00ab\u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432\u00bb \u0438 \u00ab\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439\u00bb \u0443\u0437\u043b\u0430<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 \u0432\u0441\u0435\u0445 \u00ab\u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u043e\u0432\u00bb \u0438 \u00ab\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439\u00bb \u0443\u0437\u043b\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<h1>C++ 11<\/h1>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f (move operations) C++11 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 Intel TBB 4.4 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c move-aware insert \u0438 emplace \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 <i>concurrent_unordered_map<\/i> \u0438 <i>concurrent_hash_map<\/i>. <i>concurrent_vector::shrink_to_fit<\/i> \u0431\u044b\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0442\u0438\u043f\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 C++11 move semantics.<\/p>\n<p>  \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <i>tbb::enumerable_thread_specific<\/i> \u043f\u043e\u043b\u0443\u0447\u0438\u043b move constructor \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0433\u043e variadic templates.<\/p>\n<p>  \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b tbb\/compat\/thread \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 C++11  \u0433\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u201cExact exception propagation\u201d \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0434\u043b\u044f Intel C++ Compiler \u043f\u043e\u0434 OS X*. <\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e Intel TBB c <a href=\"http:\/\/threadingbuildingblocks.org\/\">open source<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/software.intel.com\/en-us\/articles\/intel-tbb\">\u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0433\u043e<\/a> \u0441\u0430\u0439\u0442\u043e\u0432.               <\/p>\n<div class=\"clear\"><\/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=\"http:\/\/habrahabr.ru\/post\/266587\/\"> http:\/\/habrahabr.ru\/post\/266587\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 Intel Parallel Studio XE 2016, \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c Intel Threading Building Blocks 4.4. \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439:  <\/p>\n<ul>\n<li>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/li>\n<li>\u041d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0443\u0437\u043b\u043e\u0432 Flow Graph: composite_node \u0438 async_node. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u043e Flow Graph \u0431\u044b\u043b\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0431\u0440\u043e\u0441\u0430 (reset).<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u0435 \u0444\u0438\u0448\u0435\u043a \u0438\u0437 \u0421++11 \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e53\/067\/2de\/e530672de1944722bcb526a19ce94c31.png\"\/>  <\/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-266104","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266104","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=266104"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266104\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}