C++高性能并行编程与优化 - 课件 - 09 CUDA C++ 流体仿真实战CUDA 编译器,链接 OpenVDB 在 Blender 中查看导出的结果 边界条件 边界条件:初始化 边界条件:添加判断边界的版本 边界条件:仅在第一层额外判断边界条件 进一步改进 VDB 导出:支持导出多个网格,并指定名称 进一步改进 VDB 导出: P-IMPL 模式 进一步改进 VDB 导出: F-IMPL 模式 Blender 渲染结果 改进 改进边界条件:外部边界流出而不是反弹,内部边界可以流出速度 改进边界条件:外部边界流出而不是反弹,内部边界可以流出速度 Blender 中调整一下材质 Blender 中调整一下材质 改进对流:让烟雾随时间逐渐褪色 改进对流:让烟雾随时间逐渐褪色 改进褪色:不是褪色 density ,而是褪色 temperature 改进褪色:不是褪色 density ,而是褪色 temperature 改进褪色:不是单纯地乘以 decayRate ,还和周围环境温度求平均值0 码力 | 58 页 | 14.90 MB | 1 年前3
Back to Basics: The Factory Patternpattern is actually used ○ grep -irn “factory” . ● The answer is yes! ● https://github.com/blender/blender ● ● ●Factory Method/Pattern Usage (5/6) 81 ● I dug around a few open source projects to see0 码力 | 93 页 | 3.92 MB | 6 月前3
What's New in Visual Studio 2022915 505 272 878 1059 2886 0 500 1000 1500 2000 2500 3000 3500 Unreal Engine 5 TensorFlow Blender AAA Game 3 AAA Game 2 AAA Game 1 Time in Seconds (Lower is better) VS 17.5 VS 17.7In Visual0 码力 | 55 页 | 3.27 MB | 6 月前3
C++高性能并行编程与优化 - 课件 - 05 C++11 开始的多线程编程函数,从而保证 pool 解 构时会自动等待全部线程执行完毕。 小彭老师快乐吐槽时间 • 多线程、异步、无阻塞、并发,能提升程序响应速度,对现实世界中的软件工程至关重要 。 • 反面教材: blender 在运行物理解算的时候,界面会卡住,算完一帧后窗口才能刷新一遍 ,导致解算过程中基本别想做事,这一定程度上归功于 opengl 原始的单线程设计。 • 正面教材: zeno 可以在解算过程中0 码力 | 79 页 | 14.11 MB | 1 年前3
The Most Important Design Guideline is Testability77Rewrite; Power Peg Moved, Not Removed 78Did Not Retest Power Peg 79Deploy Version to Support RLP 80Manual Deployment Mistake 81No Review or Test of Deployment 82RLP Goes Live on 7 Servers 83Power Peg Peg in 2003, dead code still around •Refactored code in 2005 ; moved dead code ; test still pass •Manual deployment ; no review ; no tests •Different components had different view of same thing •email Peg in 2003, dead code still around •Refactored code in 2005 ; moved dead code ; test still pass •Manual deployment ; no review ; no tests •Different components had different view of same thing •email0 码力 | 126 页 | 9.11 MB | 6 月前3
Tracy: A Profiler You Don't Want to MissProfiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events Profiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events TracyClient.cpp TracyClient.cpp TracyClient.cpp TracyClient.cpp Behold the Tracy Multiverse! (Tracy Manual, Section 2.1.5)18 Tracy integration across shared libraries tracy (shared library) TracyClient0 码力 | 85 页 | 6.51 MB | 6 月前3
Tracy: A Profiler You Don't Want to MissProfiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events Profiling Zoo holistic (automatic) issues: information overload; profiling overhead (skew) selective (manual) Sampling callstack snapshot probing system-wide automatic (regular intervals) OS kernel events ZoneScoped; ... } ... { ZoneScoped; ... } }23 Tracy manual, Section 3.1 Tracy Zoning 101 int foo() { ZoneScoped; ... if (!spoon) { Zo0 码力 | 84 页 | 8.70 MB | 6 月前3
Applicative: The Forgotten Functional PatternPARAPHRASING P2561 "How is this problem solved today? Either: "How is this problem solved today? Either: manual error propagation macros (most libraries e.g. Boost.Outcome) The only things that have nice syntax multiple (possibly failing) values. to multiple (possibly failing) values. Goals: Goals: no macros no manual control �ow declarative expression-oriented style good-looking code e�cient Let's do it with Let's return std::format("{}{}", f, b); }); }); } 37HOW DID WE DO? HOW DID WE DO? No macros? No manual control �ow? Declarative style? Good-looking code? E�cient? 38APPLICATIVE SOLUTION APPLICATIVE0 码力 | 141 页 | 11.33 MB | 6 月前3
jsc::chunk_evenly Range Adaptor for Distributing Work Across Tasks了 了 struct chunk { std: :ptrdiff_t begin; std::ptrdiff_t end; }; auto func (chunk) -> void; auto manual_loop (std: :ptrdiff_t n,std::ptrdiff_t chunk_count) -> void [[assumeCn >= 0)]]; [[assume(chunk_count 一Range adaptorfor dlstributing work across tasks (CZ) ASM comparison > GCC RISC-V 64-bit assembly manual_loop(long,long): jsc-chunk_evenly (long,long): addiji sp,sp,-64 sp,sSp,64 j工 Ia CP and LCD comparison 1o0恒 80 60 40 20 上 manual 1oop jsc: :chunk_evenly() 大 manual loop 时 jsc: :chunk_evenly() 50 40 30 20 10 WE W 和中0 码力 | 1 页 | 1.38 MB | 6 月前3
Cooperative C++ EvolutionSource breaking change (can’t compile 2 as 3) Python 2 Python 3 x = 3/2 x == 2 x == 1.5 Manual migration + tools (2to3, Pylint, Futurize, Modernize, caniusepython3, tox, mypy) 2017: Most Python Source breaking change (can’t compile 2 as 3) Python 2 Python 3 x = 3/2 x == 2 x == 1.5 Manual migration + tools (2to3, Pylint, Futurize, Modernize, caniusepython3, tox, mypy) 2017: Most Python Source breaking change (can’t compile 2 as 3) Python 2 Python 3 x = 3/2 x == 2 x == 1.5 Manual migration + tools (2to3, Pylint, Futurize, Modernize, caniusepython3, tox, mypy) 2017: Most Python0 码力 | 85 页 | 5.73 MB | 6 月前3
共 111 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12













