Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!Atomics and concurrency patterns • How existing atomicare 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 danielanderson.net std::shared_ptr (the basics) T* ptr; shared_ptr s1: control_block: atomic ref_count = 1; … control_block* ctrl; T12 Daniel Anderson -- danielanderson.net std::shared_ptr (the 0 码力 | 45 页 | 5.12 MB | 6 月前3
The Many Shades of reference_wrappersome_object; if (cond) dialog = some_other_object; // ?? process(dialog); 3 CppCon 2020C++ reference can only be bound once auto& dialog = [&]() -> auto& { if (cond) return some_object; else return 2020Reference “assignment” 8 CppCon 2020 Python dialog = some_object if cond: dialog = some_other_object C++ auto& dialog = some_object; if (cond) dialog = some_other_object;C++ reference • initialization initialization binds the object to the reference • assignment assigns to the bounded object (so called “assign-through”) 9 CppCon 2020What if initialization and assignment both bind objects? • initialization0 码力 | 49 页 | 575.61 KB | 6 月前3
Distributed Ranges: A Model for Building Distributed Data Structures, Algorithms, and Viewsprograms is hard - Multi-GPU, multi-CPU systems require partitioning data - Users must manually split up data amongst GPUs / nodes - High-level mechanisms for data distribution / execution necessary size_t count) { // Issue remote get operation to // copy `count` bytes from `src` to `dest` MPI_Get(dest, count, MPI_BYTE, src.rank(), src.offset(), count, MPI_BYTE p = …; int x = *p;Remote Pointers - Reference memory on another process - Can support memcpy, copy, atomics, etc. - Support dereferencing, with proxy reference type (no T&) - Limited to trivially copyable0 码力 | 127 页 | 2.06 MB | 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 = 0, count = data.size(); i < count; ++i) { /* ... */ } Doesn’t compile: i is deduced as int, but count is size_t Solution: use uz literal: for (auto i = 0uz, count = data.size(); i < count; ++i) resize_and_overwrite(count, op) Resizes a string and sets new content by invoking an operation Used if performance is critical Effect: If count <= size(), erase the last size() - count elements 0 码力 | 105 页 | 759.96 KB | 6 月前3
Conan 1.9 Documentationwith Conan and Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 14 Reference 227 14.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 2.6 Install from 9.0@pocoproject/stable zlib/1.2.11@conan/stable To inspect the different binary packages of a reference run: $ conan search Poco/1.9.0@pocoproject/stable Existing packages for recipe Poco/1.9.0@pocoproject/stable:0 码力 | 470 页 | 3.05 MB | 1 年前3
Conan 1.3 DocumentationSSL (TLS) certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 13 Reference 205 13.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 3.6 Install from 11@conan/stable --table=file.html -r=conan-center $ file.html # or open the file, double-click Check the reference for more information on how to search in remotes, how to remove or clean packages from the local0 码力 | 397 页 | 2.77 MB | 1 年前3
Conan 1.11 Documentationwith Conan and Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 14 Reference 239 14.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 2.6 Install from 9.0@pocoproject/stable zlib/1.2.11@conan/stable To inspect the different binary packages of a reference run: $ conan search Poco/1.9.0@pocoproject/stable Existing packages for recipe Poco/1.9.0@pocoproject/stable:0 码力 | 490 页 | 4.05 MB | 1 年前3
Conan 1.10 Documentationwith Conan and Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 14 Reference 231 14.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 2.6 Install from 9.0@pocoproject/stable zlib/1.2.11@conan/stable To inspect the different binary packages of a reference run: $ conan search Poco/1.9.0@pocoproject/stable Existing packages for recipe Poco/1.9.0@pocoproject/stable:0 码力 | 479 页 | 3.09 MB | 1 年前3
Conan 1.14 Documentationwith Conan and Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 14 Reference 251 14.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 2.6 Install from 9.0@pocoproject/stable zlib/1.2.11@conan/stable To inspect the different binary packages of a reference run: $ conan search Poco/1.9.0@pocoproject/stable Existing packages for recipe Poco/1.9.0@pocoproject/stable:0 码力 | 528 页 | 4.17 MB | 1 年前3
Conan 1.13 Documentationwith Conan and Artifactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 14 Reference 249 14.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edits the conan.conf or installs config files. get Gets a file or list a directory of a given reference or package. info Gets information about the dependency graph of a recipe. ... 2.6 Install from 9.0@pocoproject/stable zlib/1.2.11@conan/stable To inspect the different binary packages of a reference run: $ conan search Poco/1.9.0@pocoproject/stable Existing packages for recipe Poco/1.9.0@pocoproject/stable:0 码力 | 518 页 | 4.14 MB | 1 年前3
共 283 条
- 1
- 2
- 3
- 4
- 5
- 6
- 29













