 Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!Atomics and concurrency patterns • How existing atomic Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!Atomics and concurrency patterns • How existing atomic- are implemented (the split reference count technique) • Deferred reclamation, i.e., garbage collection in C++ Some assumed knowledge Atomics and concurrency patterns • How existing atomic - are implemented (the split reference count technique) • Deferred reclamation, i.e., garbage collection in C++ Some assumed knowledge control_block pointer as a lock26 Daniel Anderson -- danielanderson.net Solution #2: The split reference count • Used by Folly (Facebook open-source library, used in production), • Used by JustThreads 0 码力 | 45 页 | 5.12 MB | 6 月前3
 Making Libraries Consumable for Non-C++ Developers“width”. Explicitly state/document/reference function conventions. • Defining a macro for calling conventions is a great start. For example, MYLIB_CCONV. • Reference: llvm - CallingConv.h • Don’t throw memory management”. - Reference counted - C++ – std::shared_ptr Making Libraries Consumable for Non-C++ Developers“width”. Explicitly state/document/reference function conventions. • Defining a macro for calling conventions is a great start. For example, MYLIB_CCONV. • Reference: llvm - CallingConv.h • Don’t throw memory management”. - Reference counted - C++ – std::shared_ptr- - Python - Objective-C (manual or automatic – see ARC) - Swift - COM – AddRef()/Release() - Non-Reference counted - .NET - JVM have been deleted here, if allocator was known.Memory model – Reference Counted Memory lifetime is tracked explicitly through reference counting. This typically means allocation locations are static 0 码力 | 29 页 | 1.21 MB | 6 月前3
 C++20: An (Almost) Complete OverviewEdition (C++20) coming later this year  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP)3 C++20 C++20 is big! Lots C++11: remove "atomic_" and use special // functions every time you touch head public: class reference { shared_ptr C++20: An (Almost) Complete OverviewEdition (C++20) coming later this year  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP)3 C++20 C++20 is big! Lots C++11: remove "atomic_" and use special // functions every time you touch head public: class reference { shared_ptr- p; - }; auto find(T t) const { auto p = head.load(); atomic_load(&head) while (p && p->t != t) p = p->next; return reference(move(p)); } auto front() const { return reference(head); } void push_front(T t) { auto p = make_shared - (); 0 码力 | 85 页 | 512.18 KB | 6 月前3
 C++23: An Overview of Almost All New and Updated Features2nd, 3rd, 4th, and 5th Edition  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP) C++204 Agenda  C++23 a value, false otherwise  value(): returns reference to the contained value, or throws bad_expected_access if no value  error(): returns reference to the error91 Agenda  C++23 Core Language fails: std::cout << Process([p = std::make_unique C++23: An Overview of Almost All New and Updated Features2nd, 3rd, 4th, and 5th Edition  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP) C++204 Agenda  C++23 a value, false otherwise  value(): returns reference to the contained value, or throws bad_expected_access if no value  error(): returns reference to the error91 Agenda  C++23 Core Language fails: std::cout << Process([p = std::make_unique- (42)] { return *p; });  “Attempting to reference a deleted function”  The copy ctor of the std::function tries to copy the lambda, which is not 0 码力 | 105 页 | 759.96 KB | 6 月前3
 Visualize Time Enabled Data using ArcGIS Qt (C++) and Toolkithttps://developers.arcgis.com/qt/ • ArcGIS Runtime Toolkit for Qt API reference - https://developers.arcgis.com/qt/toolkit/api-reference/ • ArcGIS Runtime Toolkit – Qt on GitHub - https://github.com/Es0 码力 | 10 页 | 734.09 KB | 6 月前3 Visualize Time Enabled Data using ArcGIS Qt (C++) and Toolkithttps://developers.arcgis.com/qt/ • ArcGIS Runtime Toolkit for Qt API reference - https://developers.arcgis.com/qt/toolkit/api-reference/ • ArcGIS Runtime Toolkit – Qt on GitHub - https://github.com/Es0 码力 | 10 页 | 734.09 KB | 6 月前3
 A Crash Course in Calendars, Dates, Time, and Time Zones2nd, 3rd, 4th, and 5th Edition  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP) C++203 Agenda  Compile-Time0 码力 | 43 页 | 551.60 KB | 6 月前3 A Crash Course in Calendars, Dates, Time, and Time Zones2nd, 3rd, 4th, and 5th Edition  Co-author of C++ Standard Library Quick Reference& C++17 Standard Library Quick Reference  Founder of the Belgian C++ Users Group (BeCPP) C++203 Agenda  Compile-Time0 码力 | 43 页 | 551.60 KB | 6 月前3
 Working with Asynchrony Generically: A Tour of C++ Executors*/ } Because of the nested scopes, it’s safe to pass locals by reference to callees... … no dynamic allocation or reference counting needed.64 SENDER/RECEIVER IS ALSO STRUCTURED CONCURRENCY0 码力 | 121 页 | 7.73 MB | 6 月前3 Working with Asynchrony Generically: A Tour of C++ Executors*/ } Because of the nested scopes, it’s safe to pass locals by reference to callees... … no dynamic allocation or reference counting needed.64 SENDER/RECEIVER IS ALSO STRUCTURED CONCURRENCY0 码力 | 121 页 | 7.73 MB | 6 月前3
 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串强引用胖指针: string • 刚刚说的 string 容器,是掌握着字符串生命周期( lifespan )的胖指针。 • 这种掌管了所指向对象生命周期的指针称为强引用( strong reference )。 • 这个强引用的强,体现在哪里? • 当 string 容器被拷贝时,其指向的字符串也会被拷贝(深拷贝)。 • 当 string 容器被销毁时,其指向的字符串也会被销毁(内存释放)。 次拷贝,比较低效。人们常用 string const & 来避免不必要拷贝,但仍比较麻 烦。 • 因此 C++17 引入了弱引用胖指针 string_view ,这种弱引用( weak reference )不影响原对象的生命周期,原对象的销毁仍然由强引用控制。 • 这个弱引用的弱,体现在哪里? • 当 string_view 被拷贝时,其指向的字符串仍然是同一个(浅拷贝)。 • 当 string_view0 码力 | 162 页 | 40.20 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 15 C++ 系列课:字符与字符串强引用胖指针: string • 刚刚说的 string 容器,是掌握着字符串生命周期( lifespan )的胖指针。 • 这种掌管了所指向对象生命周期的指针称为强引用( strong reference )。 • 这个强引用的强,体现在哪里? • 当 string 容器被拷贝时,其指向的字符串也会被拷贝(深拷贝)。 • 当 string 容器被销毁时,其指向的字符串也会被销毁(内存释放)。 次拷贝,比较低效。人们常用 string const & 来避免不必要拷贝,但仍比较麻 烦。 • 因此 C++17 引入了弱引用胖指针 string_view ,这种弱引用( weak reference )不影响原对象的生命周期,原对象的销毁仍然由强引用控制。 • 这个弱引用的弱,体现在哪里? • 当 string_view 被拷贝时,其指向的字符串仍然是同一个(浅拷贝)。 • 当 string_view0 码力 | 162 页 | 40.20 MB | 1 年前3
 新一代分布式高性能图数据库的构建 - 沈游人(or classes) of vertices and edges Labels 查询语言:基于 Cypher 贴合 ISO GQL Standard • Incorporate by reference specifications from SQL/Framework and SQL/Foundation • Capabilities needed by both SQL/PGQ (Property0 码力 | 38 页 | 24.68 MB | 1 年前3 新一代分布式高性能图数据库的构建 - 沈游人(or classes) of vertices and edges Labels 查询语言:基于 Cypher 贴合 ISO GQL Standard • Incorporate by reference specifications from SQL/Framework and SQL/Foundation • Capabilities needed by both SQL/PGQ (Property0 码力 | 38 页 | 24.68 MB | 1 年前3
 C++20's question, please hold them until after the session is over. • When asking questions, please reference slide numbers5 About Me: • Miya Natsuhara • Software Engineer on the Visual C++ Libraries Team0 码力 | 55 页 | 8.67 MB | 6 月前3 C++20's question, please hold them until after the session is over. • When asking questions, please reference slide numbers5 About Me: • Miya Natsuhara • Software Engineer on the Visual C++ Libraries Team0 码力 | 55 页 | 8.67 MB | 6 月前3
共 14 条
- 1
- 2
相关搜索词
 LockFreeAtomicSharedPointersWithoutSplitReferenceCountItCanBeDoneMakingLibrariesConsumableforNonC++Developers20AnAlmostCompleteOverview23ofAllNewandUpdatedFeaturesVisualizeTimeEnabledDatausingArcGISQtToolkitCrashCourseinCalendarsDatesZonesWorkingwithAsynchronyGenericallyTourExecutors高性性能高性能并行编程优化课件15游人RustCCAtlasGraphChrono













