 hazard pointer synchronous reclamation!= A HP Safe to delete A A 7 8 SAFE ACCESS If a hazard pointer points to an object before its removal, then the object will not be reclaimed as long objects that were • retired to the domain • and not protected by hazard pointers • before this call • will be reclaimed before this call returns Global cleanup Same Example Using Global Cleanup Synchronous TS2 – Maged Michael • Maintain an indicator of automatic dependent retirement. • Clear indicator before invoking global cleanup. • Repeat as needed if the indicator is set. • Problem: Where is user code0 码力 | 31 页 | 856.38 KB | 6 月前3 hazard pointer synchronous reclamation!= A HP Safe to delete A A 7 8 SAFE ACCESS If a hazard pointer points to an object before its removal, then the object will not be reclaimed as long objects that were • retired to the domain • and not protected by hazard pointers • before this call • will be reclaimed before this call returns Global cleanup Same Example Using Global Cleanup Synchronous TS2 – Maged Michael • Maintain an indicator of automatic dependent retirement. • Clear indicator before invoking global cleanup. • Repeat as needed if the indicator is set. • Problem: Where is user code0 码力 | 31 页 | 856.38 KB | 6 月前3
 Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!atomic Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!atomic- > a Thread 1 auto s = a.load(); Thread 2 a.store(make_shared - ( …)); ++ -- If this happens first…23 The fundamental problem: The race to zero Thread 1 load(): Thread 2 store(shared_ptr store(shared_ptr desired): auto cb = ctrl.load(); Need a way to ensure that cb is not deleted before we increment the ref count Daniel Anderson -- danielanderson.net24 Solutions Daniel Anderson Disclaimer: Slide code omits some nullptr checks to save space. atomic - > What happens when a concurrent operation changes the pointer to a different shared_ptr?29 Daniel Anderson 0 码力 | 45 页 | 5.12 MB | 6 月前3
 C++20's Ask any questions • Discuss the latest announcements Take our survey https://aka.ms/cppcon4 Before we begin... • Please use the Q&A tab for questions during the session (typed) • If you want Note that we don’t currently have a way to detect upcoming leap seconds on older Windows OSes (before the 2018 October update). • However, because leap seconds happen infrequently, we plan to update daylight saving time transition when an extra hour is inserted. When that happens, that one-hour block essentially happens twice. • If the local_time to be converted occurs in that period of time0 码力 | 55 页 | 8.67 MB | 6 月前3 C++20's Ask any questions • Discuss the latest announcements Take our survey https://aka.ms/cppcon4 Before we begin... • Please use the Q&A tab for questions during the session (typed) • If you want Note that we don’t currently have a way to detect upcoming leap seconds on older Windows OSes (before the 2018 October update). • However, because leap seconds happen infrequently, we plan to update daylight saving time transition when an extra hour is inserted. When that happens, that one-hour block essentially happens twice. • If the local_time to be converted occurs in that period of time0 码力 | 55 页 | 8.67 MB | 6 月前3
 Working with Asynchrony Generically: A Tour of C++ ExecutorsASYNC OPERATION SCHEDULER schedule SENDER Implementation details of algorithms. Magic happens here. then(sender, fn) -> sender21 BASIC LIFETIME OF AN ASYNC OPERATION SCHEDULER schedule “caught” by applying a sender adaptor that translates the done signal into a value or an error before awaiting the sender; e.g., with: • std::execution::done_as_optional() • std::execution::done_as_error() ... */ } What would happen if compute() could return after calling compute_helper() but before compute_helper() returned?68 CONCURRENCY MUST BE JOINED! schedul e schedul e then then then0 码力 | 121 页 | 7.73 MB | 6 月前3 Working with Asynchrony Generically: A Tour of C++ ExecutorsASYNC OPERATION SCHEDULER schedule SENDER Implementation details of algorithms. Magic happens here. then(sender, fn) -> sender21 BASIC LIFETIME OF AN ASYNC OPERATION SCHEDULER schedule “caught” by applying a sender adaptor that translates the done signal into a value or an error before awaiting the sender; e.g., with: • std::execution::done_as_optional() • std::execution::done_as_error() ... */ } What would happen if compute() could return after calling compute_helper() but before compute_helper() returned?68 CONCURRENCY MUST BE JOINED! schedul e schedul e then then then0 码力 | 121 页 | 7.73 MB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 07 深入浅出访存优化single cache line is 64 bytes, enough to hold 16 single precision floating point values. But what happens when the data is not contiguous? • The Morton order is a mapping of multidimensional data to one0 码力 | 147 页 | 18.88 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 07 深入浅出访存优化single cache line is 64 bytes, enough to hold 16 single precision floating point values. But what happens when the data is not contiguous? • The Morton order is a mapping of multidimensional data to one0 码力 | 147 页 | 18.88 MB | 1 年前3
 C++23: An Overview of Almost All New and Updated Features Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules  Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules  Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules0 码力 | 105 页 | 759.96 KB | 6 月前3 C++23: An Overview of Almost All New and Updated Features Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules  Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules  Marking Unreachable Code  Assumptions  Named Universal Character Escapes  Trim Whitespace Before Line Splicing  C++23 Standard Library  String Formatting Improvements  Standard Library Modules0 码力 | 105 页 | 759.96 KB | 6 月前3
 C++高性能并行编程与优化 - 课件 - Zeno 中的现代 C++ 最佳实践 if 去判断是否已经初始化过, 非常方便! 函数静态初始化和全局静态初始化的配合 • 如果在全局静态初始化( before_main )里 使用了函数静态初始化( Helper )会怎样? • 会让函数静态初始化( Helper )执行得比全 局静态初始化( before_main )还早! 用包装,避免因为链接的不确定性打乱了静态初始化的顺序 • 利用这个发现,我们意识到可以把0 码力 | 54 页 | 3.94 MB | 1 年前3 C++高性能并行编程与优化 - 课件 - Zeno 中的现代 C++ 最佳实践 if 去判断是否已经初始化过, 非常方便! 函数静态初始化和全局静态初始化的配合 • 如果在全局静态初始化( before_main )里 使用了函数静态初始化( Helper )会怎样? • 会让函数静态初始化( Helper )执行得比全 局静态初始化( before_main )还早! 用包装,避免因为链接的不确定性打乱了静态初始化的顺序 • 利用这个发现,我们意识到可以把0 码力 | 54 页 | 3.94 MB | 1 年前3
 C++20: An (Almost) Complete OverviewLibrary algorithms accepting ranges instead of iterator pairs  Projection: Transform elements before handing over to algorithm  Views: transform/filter range: lazily evaluated, non-owning, non- mutating Doumler Friday, September 18 • 12:00Lambda Expression Changes26 [=, this] as Lambda Capture  Before C++20, [=] captures ‘this’ implicitly  Since C++20, you need to be explicit, so: [=, this]27 Templated0 码力 | 85 页 | 512.18 KB | 6 月前3 C++20: An (Almost) Complete OverviewLibrary algorithms accepting ranges instead of iterator pairs  Projection: Transform elements before handing over to algorithm  Views: transform/filter range: lazily evaluated, non-owning, non- mutating Doumler Friday, September 18 • 12:00Lambda Expression Changes26 [=, this] as Lambda Capture  Before C++20, [=] captures ‘this’ implicitly  Since C++20, you need to be explicit, so: [=, this]27 Templated0 码力 | 85 页 | 512.18 KB | 6 月前3
 No Silver Bullet – Essence and Accident in Software Engineeringunrelated to the original problemExample of Yak Shaving • “My client needed a simple wiki, but before I can help them I need…” • to Containerize the software, but to run that I need… • a Container Management0 码力 | 35 页 | 1.43 MB | 5 月前3 No Silver Bullet – Essence and Accident in Software Engineeringunrelated to the original problemExample of Yak Shaving • “My client needed a simple wiki, but before I can help them I need…” • to Containerize the software, but to run that I need… • a Container Management0 码力 | 35 页 | 1.43 MB | 5 月前3
 应用 waPC (rust) 做软件测试工具and message modification 模拟数据规则 例子包括握手,数据解析, 更改数据 new Websocket(“ws://localhost:3335") 模拟前 - before 模拟后 - after • Wasm builds a req buffer • If wasm does not have enough bytes, send /continue0 码力 | 30 页 | 2.50 MB | 1 年前3 应用 waPC (rust) 做软件测试工具and message modification 模拟数据规则 例子包括握手,数据解析, 更改数据 new Websocket(“ws://localhost:3335") 模拟前 - before 模拟后 - after • Wasm builds a req buffer • If wasm does not have enough bytes, send /continue0 码力 | 30 页 | 2.50 MB | 1 年前3
共 11 条
- 1
- 2













