https://github.com/taskflow/taskflow

简要介绍: https://taskflow.github.io/showcase/index.html

  1. Taskflow is FREE:
    1. from explicit thread management
    2. from difficult lock mechanism
    3. from daunting class declaration
  2. Drop-in Integration:
    1. 只有头文件,方便集成。

motivation

Cookbook » Project Motivation | Taskflow QuickStart

Taskflow addresses a long-standing problem, how can we make it easier for C++ developers to quickly write parallel and heterogeneous programs with high performance scalability and simultaneous high productivity?
https://taskflow.github.io/taskflow/ProjectMotivation.html

  1. 使用任务并行的编程模型来编写代码
  2. 代码可解释性、可读性高,不需要关注低级的系统级的并行原语

profile工具: https://taskflow.github.io/tfprof/

TF_ENABLE_PROFILER=xxx.json executable_file args

学习记录

Taskflow-Key-Concepts-and-Usage-Methods-Detailed-Analysis

Taskflow-Conditional-Tasks-Usage-Guide-and-Configuration-Methods.md

并行相关概念

分支预测相关_为了克服上述问题,pipeline中引入了branch prediction机制。branch pr-CSDN博客

文章浏览阅读1k次。本文探讨了CPU流水线中的分支预测机制,旨在提高指令执行效率。通过静态和动态预测技术,处理器可以预先判断并执行可能的指令路径。然而,分支预测失败,如在处理无序数组时,会导致性能下降。此外,虚函数调用由于动态联编和查找虚函数表,可能导致分支预测失败,增加性能开销。理解和优化这些机制对于提升程序性能至关重要。
https://blog.csdn.net/qq_43579103/article/details/121509990

遇到的问题

Taskflow-Graph-Normal-but-Immediate-Exit-Problem-Diagnosis-and-Solution