C++高性能并行编程与优化 - 课件 - 06 TBB 开启的并行编程之旅的请求 就无法处理,造成“无响应”现象。 C 的请 求进来,则还得继续排队…… • 每个请求开启一个线程来处理,这样处理 A 用户的同时还可以继续监听 B 用户发 来的请求,及时响应,改善用户体验。 • 并行:某图形学爱好者购置了一台 4 核处理 器的电脑,他正在渲染 cornell box 的图像, 这个图像在单核上渲染需要 4 分钟。 • 他把图像切成 4 份,每个是原来的 1/4 TBB 改名 OneTBB ? 方便割投资人韭菜? 沙雕因特尔,开源的 TBB 大家都在 用,本来算是你一手好牌,现在被你 one 啊 one 什么 api 给打烂了!快进 到 OpenVDB 开发者自己重新发明 TBB 。 感谢观看! by 彭于斌( github@archibate ) 录播: https://space.bilibili.com/ 263032155 课件: https://github0 码力 | 116 页 | 15.85 MB | 1 年前3
Cross-Platform Floating-Point Determinism Out of the Boxfp> fp sixit::geometry::line_segment2::length() const { auto dx = p2.x-p1.x; auto dy = p2.y-p1.y; return sixit::dmath::sqrt(dx*dx+dy*dy); } We also have our own geometry lib sixit::geometry,0 码力 | 31 页 | 3.88 MB | 6 月前3
High-Performance Numerical Integration in the Age of C++26Theoretical foundations Outline of an implementation Conclusion An ambiguity Integrals � b a f (x) dx Numerical integration as in the computation of the numerical value of a definite integral Synonyms: implementation Conclusion Definite integrals and differential equations An equivalence � f (x) dx ⇔ dy dx = f (x) Finding antiderivatives ⇔ solving an ODE Algorithms for definite integrals Gaussian0 码力 | 57 页 | 4.14 MB | 6 月前3
Back to Basics Castingcompatible compatible types? Point p{1,2}; auto* p3d = reinterpret_cast(&p); printf("px: %d p3dx: %d", p.x, p3d->x); std::array ap = {Point{1,2}, Point{3,4}}; auto* ap3d = reinterpret_cast (ap compatible compatible types? Point p{1,2}; auto* p3d = reinterpret_cast (&p); printf("px: %d p3dx: %d", p.x, p3d->x); std::array ap = {Point{1,2}, Point{3,4}}; auto* ap3d = reinterpret_cast (ap compatible compatible types? Point p{1,2}; auto* p3d = reinterpret_cast (&p); printf("px: %d p3dx: %d", p.x, p3d->x); std::array ap = {Point{1,2}, Point{3,4}}; auto* ap3d = reinterpret_cast (ap 0 码力 | 117 页 | 1.57 MB | 6 月前3
Back to Basics - Function Call Resolutionclass Derived: public Base { public: void f(double d); // hides Base::f(int) }; Derived dx; dx.f(3); // calls Derived::f(double) 46Back to Basics - Function Call Resolution0 码力 | 44 页 | 1.30 MB | 6 月前3
Making Games Start Fast: A Story About Concurrencyfferences 43Consoles being ahead in tech? Madness! 44Redesigning for multithread ◉ Switching to DX11 allows for multithreaded texture and model loaded ◉ Loading algorithms needed to be rewritten0 码力 | 76 页 | 2.22 MB | 6 月前3
Symbolic Calculus for High-Performance Computing: From Scratch Using C++23Constraints Architecture Substitution Construction Conclusion Starting from equations d2x dt2 + 2ζw0 dx dt + w2 0x = 0 F = Gm1m2 r2 y(t) = a × sin (ω × t + ϕ) The topic of this talk Wouldn’t it be nice0 码力 | 70 页 | 1.80 MB | 6 月前3
C++高性能并行编程与优化 - 课件 - 17 由浅入深学习 map 容器] 取出 map 元素居然是错误的! 能不能在遍历的同时删除元素?安全吗? emplace , emplace_hint , try_emplace 的区别? 课程安排 1. vector 容器初体验 & 迭代器入门 (BV1qF411T7sd) 2. 你所不知道的 set 容器 & 迭代器分类 (BV1m34y157wb) 3. string , string_view , const char 写入要创建元素,而读取则要在元素不存在时出错,确实应该是两个不同的函数。 • 为什么 Python 不用区分读取和写入两个函数?只有统一的 [] ?因为 Python 作为老牌胶水语言,为了 用户体验做了些特殊处理。他的 ast 模块能自动识别 [] 位于等号左侧还是右侧,分成两个独立的函数 。 • 如果等号在左侧,则被他的 ast 模块视为写入上下文( store context ),翻译成0 码力 | 90 页 | 8.76 MB | 1 年前3
面向亿行 C/C++ 代码的静态分析系统设计及实践-肖枭 App市场的审核 成功静态分析应用 代码评审中的静态分析 针对该提交 代码片段自 动触发分析 发现问题,拒绝代码合并 发起代码提交,如Pull Request 没有问题,允许合入 开发者 代码仓库 静态代码评审的样子 为何代码评审阶段? 2K Bugs 12K Warnings 225K Code Smell “找到几万个问题,没法修” “这是以前的业务逻辑,不用修”0 码力 | 39 页 | 6.88 MB | 1 年前3
Hello 算法 1.2.0 简体中文 C++ 版本书中的代码附有可一键运行的源文件,托管于 github.com/krahets/hello‑algo 仓库。 动画在 PDF 内的展示效果受限,可访问 www.hello‑algo.com 网页版以获得更优的阅读体验。 推荐语 “一本通俗易懂的数据结构与算法入门书,引导读者手脑并用地学习,强烈推荐算法初学者阅读!” ——邓俊辉,清华大学计算机系教授 “如果我当年学数据结构与算法的时候有《Hello 算法》,学起来应该会简单 深度学习》的启发。在此向各位读者强烈推荐这 本优秀的著作。 衷心感谢我的父母,正是你们一直以来的支持与鼓励,让我有机会做这件富有趣味的事。 0.2 如何使用本书 Tip 为了获得最佳的阅读体验,建议你通读本节内容。 0.2.1 行文风格约定 ‧ 标题后标注 * 的是选读章节,内容相对困难。如果你的时间有限,可以先跳过。 ‧ 专业术语会使用黑体(纸质版和 PDF 版)或添加下划线(网 Python 代码的可视化运行(基于 pythontutor 实现)。如图 0‑6 所示,你 可以点击代码块下方的“可视化运行”来展开视图,观察算法代码的执行过程;也可以点击“全屏观看”,以 获得更好的阅览体验。 图 0‑6 Python 代码的可视化运行 第 0 章 前言 www.hello‑algo.com 8 0.2.4 在提问讨论中共同成长 在阅读本书时,请不要轻易跳过那些没学明白的知识点0 码力 | 379 页 | 18.48 MB | 10 月前3
共 21 条
- 1
- 2
- 3













