开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 37

uxsys/cpp-taskflow

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (3)
标签 (15)
master
dev
cpp14
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.0
v2.7.0
v2.6.0
v2.5.0
2.5.0
v2.4.0
v2.3.1
v2.3.0
v2.2.0
v2.1.0
v2.0.0
master
分支 (3)
标签 (15)
master
dev
cpp14
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.0
v2.7.0
v2.6.0
v2.5.0
2.5.0
v2.4.0
v2.3.1
v2.3.0
v2.2.0
v2.1.0
v2.0.0
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (3)
标签 (15)
master
dev
cpp14
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.0
v2.7.0
v2.6.0
v2.5.0
2.5.0
v2.4.0
v2.3.1
v2.3.0
v2.2.0
v2.1.0
v2.0.0
cpp-taskflow
/
docs
/
ProjectMotivation.html
cpp-taskflow
/
docs
/
ProjectMotivation.html
ProjectMotivation.html 13.72 KB
一键复制 编辑 原始数据 按行查看 历史
twhuang 提交于 2022年08月16日 02:24 +08:00 . revised doc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Cookbook &raquo; Project Motivation | Taskflow QuickStart</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
<link rel="stylesheet" href="m-dark+documentation.compiled.css" />
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#22272e" />
</head>
<body>
<header><nav id="navigation">
<div class="m-container">
<div class="m-row">
<span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
<a href="https://taskflow.github.io"><img src="taskflow_logo.png" alt="" />Taskflow</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">QuickStart</a>
</span>
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
<a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
</svg></a>
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
</div>
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
<div class="m-row">
<ol class="m-col-t-6 m-col-m-none">
<li><a href="pages.html">Handbook</a></li>
<li><a href="namespaces.html">Namespaces</a></li>
</ol>
<ol class="m-col-t-6 m-col-m-none" start="3">
<li><a href="annotated.html">Classes</a></li>
<li><a href="files.html">Files</a></li>
<li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
<use href="#m-doc-search-icon-path" />
</svg></a></li>
</ol>
</div>
</div>
</div>
</div>
</nav></header>
<main><article>
<div class="m-container m-container-inflatable">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<h1>
<span class="m-breadcrumb"><a href="Cookbook.html">Cookbook</a> &raquo;</span>
Project Motivation
</h1>
<nav class="m-block m-default">
<h3>Contents</h3>
<ul>
<li><a href="#TheEraOfMulticore">The Era of Multicore</a></li>
<li><a href="#C0HeterogeneousComputing">Heterogeneous Computing</a></li>
<li><a href="#LoopLevelParallelism">Loop-level Parallelism</a></li>
<li><a href="#TaskBasedParallelism">Task-based Parallelism</a></li>
<li><a href="#TheProjectMantra">The Project Mantra</a></li>
</ul>
</nav>
<p>Taskflow addresses a long-standing problem, <em>how can we make it easier for C++ developers to quickly write parallel and heterogeneous programs with high performance scalability and simultaneous high productivity?</em></p><section id="TheEraOfMulticore"><h2><a href="#TheEraOfMulticore">The Era of Multicore</a></h2><p>In the past, we embrace <em>free</em> performance scaling on our software thanks to advances in manufacturing technologies and micro-architectural innovations. Approximately for every 1.5 year we can speed up our programs by simply switching to new hardware and compiler vendors that brings 2x more transistors, faster clock rates, and higher instruction-level parallelism. However, this paradigm was challenged by the power wall and increasing difficulties in exploiting instruction-level parallelism. The boost to computing performance has stemmed from changes to multicore chip designs.</p><img class="m-image" src="era_multicore.jpg" alt="Image" style="width: 60%;" /><p>The above sweeping visualization (thanks to Prof. Mark Horowitz and his group) shows the evolution of computer architectures is moving toward multicore designs. Today, multicore processors and multiprocessor systems are common in many electronic products such as mobiles, laptops, desktops, and servers. In order to keep up with the performance scaling, it is becoming necessary for software developers to write parallel programs that utilize the number of available cores.</p></section><section id="C0HeterogeneousComputing"><h2><a href="#C0HeterogeneousComputing">Heterogeneous Computing</a></h2><p>With the influence of artificial intelligence (AI) through new and merged workloads, heterogeneous computing becomes demanding and will continue to be heard for years to come. We have not just CPUs but GPUs, TPUs, FPGAs, and ASICs to accelerator a wide variety of scientific computing problems.</p><img class="m-image" src="CPU-vs-TPU-vs-GPU.png" alt="Image" style="width: 60%;" /><p>The question is: <em>How are we going to program these beasts?</em> Writing a high-performance sequential program is hard. Parallel programming is harder. Parallel programming of heterogeneous devices is extremely challenging if we care about performance and power efficiency. Programming models need to deal with productivity versus performance.</p></section><section id="LoopLevelParallelism"><h2><a href="#LoopLevelParallelism">Loop-level Parallelism</a></h2><p>The most basic and simplest concept of parallel programming is <em>loop-level parallelism</em>, exploiting parallelism that exists among the iterations of a loop. The program typically partitions a loop of iterations into a set of of blocks, either fixed or dynamic, and run each block in parallel. Below the figure illustrates this pattern.</p><img class="m-image" src="loop-level-parallelism.jpeg" alt="Image" style="width: 50%;" /><p>The main advantage of the loop-based approach is its simplicity in speeding up a regular workload in line with Amdahl&#x27;s Law. Programmers only need to discover independence of each iteration within a loop and, once possible, the parallel decomposition strategy can be easily implemented. Many existing libraries have built-in support to write a parallel-for loop.</p></section><section id="TaskBasedParallelism"><h2><a href="#TaskBasedParallelism">Task-based Parallelism</a></h2><p>The traditional loop-level parallelism is simple but hardly allows users to exploit parallelism in more irregular applications such as graph algorithms, incremental flows, recursion, and dynamically-allocated data structures. To address these challenges, parallel programming and libraries are evolving from the tradition loop-based parallelism to the <em>task-based</em> model.</p><div class="m-graph"><svg style="width: 16.625rem; height: 16.438rem;" viewBox="0.00 0.00 265.85 263.08">
<g transform="scale(1 1) rotate(0) translate(4 259.0782)">
<title>Taskflow</title>
<g class="m-node m-flat">
<title>Task1</title>
<ellipse cx="145.4264" cy="-236.6934" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="145.4264" y="-232.8934">Task1</text>
</g>
<g class="m-node m-flat">
<title>Task2</title>
<ellipse cx="42.4264" cy="-163.9239" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="42.4264" y="-160.1239">Task2</text>
</g>
<g class="m-edge">
<title>Task1&#45;&gt;Task2</title>
<path d="M123.0769,-220.9035C108.4999,-210.6048 89.2768,-197.0237 73.2544,-185.7039"/>
<polygon points="74.9192,-182.5947 64.7323,-179.683 70.88,-188.3118 74.9192,-182.5947"/>
</g>
<g class="m-node m-flat">
<title>Task3</title>
<ellipse cx="145.4264" cy="-163.9239" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="145.4264" y="-160.1239">Task3</text>
</g>
<g class="m-edge">
<title>Task1&#45;&gt;Task3</title>
<path d="M145.4264,-217.9535C145.4264,-210.1694 145.4264,-200.9637 145.4264,-192.3774"/>
<polygon points="148.9265,-192.3484 145.4264,-182.3484 141.9265,-192.3485 148.9265,-192.3484"/>
</g>
<g class="m-node m-flat">
<title>Task4</title>
<ellipse cx="215.4264" cy="-91.1543" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="215.4264" y="-87.3543">Task4</text>
</g>
<g class="m-edge">
<title>Task1&#45;&gt;Task4</title>
<path d="M165.4494,-220.2932C176.2334,-210.3929 188.8442,-196.8943 196.4264,-182.3087 206.5709,-162.794 211.2992,-138.2751 213.5029,-119.5831"/>
<polygon points="216.9885,-119.9008 214.5083,-109.6004 210.0238,-119.1993 216.9885,-119.9008"/>
</g>
<g class="m-node m-flat">
<title>Task5</title>
<ellipse cx="112.4264" cy="-91.1543" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="112.4264" y="-87.3543">Task5</text>
</g>
<g class="m-edge">
<title>Task2&#45;&gt;Task5</title>
<path d="M59.0154,-146.6785C67.9074,-137.4347 79.0158,-125.8869 88.7955,-115.7202"/>
<polygon points="91.5463,-117.9092 95.9565,-108.2759 86.5014,-113.0564 91.5463,-117.9092"/>
</g>
<g class="m-edge">
<title>Task3&#45;&gt;Task5</title>
<path d="M137.0991,-145.5611C133.3973,-137.3981 128.9613,-127.616 124.8779,-118.6115"/>
<polygon points="127.9544,-116.921 120.6367,-109.2592 121.5793,-119.812 127.9544,-116.921"/>
</g>
<g class="m-node m-flat">
<title>Task6</title>
<ellipse cx="163.4264" cy="-18.3848" rx="42.3529" ry="18.2703"/>
<text text-anchor="middle" x="163.4264" y="-14.5848">Task6</text>
</g>
<g class="m-edge">
<title>Task4&#45;&gt;Task6</title>
<path d="M202.8387,-73.5389C196.5618,-64.7549 188.8487,-53.9611 181.9152,-44.2582"/>
<polygon points="184.7402,-42.1915 176.0785,-36.0903 179.0448,-46.2614 184.7402,-42.1915"/>
</g>
<g class="m-edge">
<title>Task5&#45;&gt;Task6</title>
<path d="M124.7721,-73.5389C130.8661,-64.8436 138.3403,-54.1789 145.0869,-44.5526"/>
<polygon points="148.1445,-46.2881 151.0177,-36.0903 142.4122,-42.2706 148.1445,-46.2881"/>
</g>
</g>
</svg>
</div><p>The above figure shows an example <em>task dependency graph</em>. Each node in the graph represents a task unit at function level and each edge indicates the task dependency between a pair of tasks. Task-based model offers a powerful means to express both regular and irregular parallelism in a top-down manner, and provides transparent scaling to large number of cores. In fact, it has been proven, both by the research community and the evolution of parallel programming standards, task-based approach scales the best with future processor generations and architectures.</p></section><section id="TheProjectMantra"><h2><a href="#TheProjectMantra">The Project Mantra</a></h2><p>The goal of Taskflow is simple - <em>We help developers quickly write parallel programs with high performance scalability and simultaneous high productivity</em>. We want developers to write simple and effective parallel code, specifically with the following objectives:</p><ul><li>Expressiveness</li><li>Readability</li><li>Transparency</li></ul><p>In a nutshell, code written with Taskflow explains itself. The transparency allows developers to focus on the development of application algorithms and parallel decomposition strategies, rather than low-level, system-specific details.</p></section>
</div>
</div>
</div>
</article></main>
<div class="m-doc-search" id="search">
<a href="#!" onclick="return hideSearch()"></a>
<div class="m-container">
<div class="m-row">
<div class="m-col-m-8 m-push-m-2">
<div class="m-doc-search-header m-text m-small">
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
<div id="search-symbolcount">&hellip;</div>
</div>
<div class="m-doc-search-content">
<form>
<input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
</form>
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
<div id="search-help" class="m-text m-dim m-text-center">
<p class="m-noindent">Search for symbols, directories, files, pages or
modules. You can omit any prefix from the symbol or file path; adding a
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
directory.</p>
<p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
/ <span class="m-label m-dim">&uarr;</span> to navigate through the list,
<span class="m-label m-dim">Enter</span> to go.
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
copy a link to the result using <span class="m-label m-dim"></span>
<span class="m-label m-dim">L</span> while <span class="m-label m-dim"></span>
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
</div>
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
<ul id="search-results"></ul>
</div>
</div>
</div>
</div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
<div class="m-container">
<div class="m-row">
<div class="m-col-l-10 m-push-l-1">
<p>Taskflow handbook is part of the <a href="https://taskflow.github.io">Taskflow project</a>, copyright © <a href="https://tsung-wei-huang.github.io/">Dr. Tsung-Wei Huang</a>, 2018&ndash;2022.<br />Generated by <a href="https://doxygen.org/">Doxygen</a> 1.8.14 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
</div>
</div>
</div>
</nav></footer>
</body>
</html>
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

cpp-taskflow 是一个开源的 C++ 并行任务编程库,cpp-tastflow 非常快,只包含头文件,可以帮你快速编写包含复杂任务依赖的并行程序
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/uxsys/cpp-taskflow.git
git@gitee.com:uxsys/cpp-taskflow.git
uxsys
cpp-taskflow
cpp-taskflow
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /