Loading…
CppCon 2021 has ended
• Type Design [clear filter]
Monday, October 25
 

12:30pm MDT

Back to Basics: Designing Classes (part 1 of 2)
Designing good, maintainable classes is a challenge. Sometimes it even feels like there is a decision to make in every single line of code. This talk will help you master this challenge. It will explain …

* … why small classes are beautiful;
* … why it is so important to encapsulate variation points;
* … why inheritance is rarely the answer for customization;
* … how to write good and maintainable constructors;
* … how to make sure class invariants are maintained;
* … how to handle member data;
* … how to write good member functions;
* … how to write good supporting functions;
* … why your private members are not private at all.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Klaus Iglberger

Klaus Iglberger

C++ Trainer/Consultant, Freelancer
Klaus Iglberger is a freelancing C++ trainer and consultant. He has finished his PhD in computer science in 2010 and since then is focused on large-scale C++ software design. He shares his experience in popular advanced C++ courses around the world (mainly in Germany, but also the... Read More →


Monday October 25, 2021 12:30pm - 1:30pm MDT

2:00pm MDT

Back to Basics: Designing Classes (part 2 of 2)
Designing good, maintainable classes is a challenge. Sometimes it even feels like there is a decision to make in every single line of code. This talk will help you master this challenge. It will explain …

* … why small classes are beautiful;
* … why it is so important to encapsulate variation points;
* … why inheritance is rarely the answer for customization;
* … how to write good and maintainable constructors;
* … how to make sure class invariants are maintained;
* … how to handle member data;
* … how to write good member functions;
* … how to write good supporting functions;
* … why your private members are not private at all.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Klaus Iglberger

Klaus Iglberger

C++ Trainer/Consultant, Freelancer
Klaus Iglberger is a freelancing C++ trainer and consultant. He has finished his PhD in computer science in 2010 and since then is focused on large-scale C++ software design. He shares his experience in popular advanced C++ courses around the world (mainly in Germany, but also the... Read More →


Monday October 25, 2021 2:00pm - 3:00pm MDT
 
Tuesday, October 26
 

2:00pm MDT

Faster, Easier, Simpler Vectors
This session is part of the Software Design Track.

The standard library has the type `std::vector`. It is used ubiquitously as a high-performance container. However, it was standardized in the mid 90s and C++ has seen many changes since then. It has been extended with allocators, move semantics, initializer_list, and much more. Can we do better?

We can. It is possible to write a container and a set of algorithms that are more efficient at run time, have simpler implementations, and have easier, more intuitive APIs. Not only that, but we can also make it easy for users to write their own vector-like containers that make slightly different trade-offs for when you need even more performance, and this presentation includes discussion of several such vectors.

We will go through specific examples of these vector-like types and the algorithms that operate on them, and then take from that general principles of software design. We'll look into how we're limited in what we can do by C++ as it exists today and what up-and-coming proposals can make things even better.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for David Stone

David Stone

Software Engineer, Quantlab
David Stone has worked on autonomous vehicles, large-scale distributed systems, and now works developing software for high-frequency trading. He is a member of the C++ Standardization Committee, where he chairs the Modules Study Group (SG2) and is the vice chair of the Evolution Working... Read More →


Tuesday October 26, 2021 2:00pm - 3:00pm MDT

4:45pm MDT

In-memory and Persistent Representations of C++
C++ Modules are a tooling opportunity. For example, a common implementation strategy for compilers is to save on disk the abstract semantics graph (ASG) obtained from elaborating a module interface (exported), to be reused later when that module is consumed (imported). That ASG, an intermediate representation, saves the compiler from repeated work in common scenarios, therefore helps achieve substantial reduction in compilation time. In essence, ISO C++ compilers are practically compelled to acknowledge representations of C++ program fragments other than character streams stored in source files. It is all too tempting to view these ASGs as mere build artifact curiosities. If N compilers, on a given platform, decide to use N different on-disk ASG representation formats then we face a severe problem of developer tools fragmentation. I present, in this talk, how the C++ community can avoid that problem: the desiggn and implementation of formal, compiler-neutral in-memory and persistent representations of C++ programs. These alternative representations allow tools to process C++ programs without needing to master or to replicate the dark art of C++ compiler construction. These representations are available either as open specification, or as C++ libraries. The application opportunities range from automated generation of bindings ("foreign function/data interface") to Just-In-Time compilation of interpreted C++ scripts, and beyond.

Speakers
avatar for Gabriel Dos Reis

Gabriel Dos Reis

Principal Software Engineer, Microsoft
Gabriel Dos Reis is a Principal Software Engineer at Microsoft, where he works in the area of large scale software construction, tools, and techniques. He is also a researcher, and a longtime member of the C++ community, author and co-author of numerous extensions to support large... Read More →


Tuesday October 26, 2021 4:45pm - 5:45pm MDT
A) Aurora C/D
 
Wednesday, October 27
 

7:45am MDT

Back To Basics: The Special Member Functions
The six special member functions. Do you know them all? Do you know when the compiler generates them for you and what they are doing? And most importantly, do you know when they don’t give you what you expect? In this talk I will explain the six special members in detail. We will take a look at the exact circumstances when a compiler would generate these functions, what they are doing by default and when we should deal with them manually. Also, among many other guidelines I’ll explain why we should strive for the Rule of 0, why the Rule of 5 is sometimes unavoidable, and why the Rule of 3 is not obsolete.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Klaus Iglberger

Klaus Iglberger

C++ Trainer/Consultant, Freelancer
Klaus Iglberger is a freelancing C++ trainer and consultant. He has finished his PhD in computer science in 2010 and since then is focused on large-scale C++ software design. He shares his experience in popular advanced C++ courses around the world (mainly in Germany, but also the... Read More →


Wednesday October 27, 2021 7:45am - 8:45am MDT

9:00am MDT

++namedtuple - Python-style Named Tuples in C++20
In this workshop, we will take a look into how Python-style named tuples can be implemented in C++20.
The goal will be to test and implement the following snippet from scratch with modern C++ features.

01 const auto tuple = namedtuple{"price"_t = 42, "size"_t = 1'000};
02 static_assert(42 == tuple["price"_t]);
03 static_assert(1'000 == tuple["size"_t]);
04 static_assert(not [](auto tuple) { return requires { tuple["quantity"_t];}(tuple))

At the end of this session, the audience will have a better understanding of C++20 features such as:
- Concepts
- User-Defined Literals
- New additions to lambdas
- std::fixed_string

Additionally, attendees will get familiar with an expressive way of writing modern C++.

Let's get ready to named all tuples at CppCon 2021!

[1] https://docs.python.org/3/library/collections.html

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Kris Jusiak

Kris Jusiak

Software Architect, Quantlab Financial
Kris is a Software Architect passionate about programming and who has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial, LLC. He has an interest in modern C++ development with a focus on performance and... Read More →


Wednesday October 27, 2021 9:00am - 10:00am MDT

12:30pm MDT

In-memory and Persistent Representations of C++
Delayed broadcast

C++ Modules are a tooling opportunity. For example, a common implementation strategy for compilers is to save on disk the abstract semantics graph (ASG) obtained from elaborating a module interface (exported), to be reused later when that module is consumed (imported). That ASG, an intermediate representation, saves the compiler from repeated work in common scenarios, therefore helps achieve substantial reduction in compilation time. In essence, ISO C++ compilers are practically compelled to acknowledge representations of C++ program fragments other than character streams stored in source files. It is all too tempting to view these ASGs as mere build artifact curiosities. If N compilers, on a given platform, decide to use N different on-disk ASG representation formats then we face a severe problem of developer tools fragmentation. I present, in this talk, how the C++ community can avoid that problem: the desiggn and implementation of formal, compiler-neutral in-memory and persistent representations of C++ programs. These alternative representations allow tools to process C++ programs without needing to master or to replicate the dark art of C++ compiler construction. These representations are available either as open specification, or as C++ libraries. The application opportunities range from automated generation of bindings ("foreign function/data interface") to Just-In-Time compilation of interpreted C++ scripts, and beyond.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Gabriel Dos Reis

Gabriel Dos Reis

Principal Software Engineer, Microsoft
Gabriel Dos Reis is a Principal Software Engineer at Microsoft, where he works in the area of large scale software construction, tools, and techniques. He is also a researcher, and a longtime member of the C++ community, author and co-author of numerous extensions to support large... Read More →


Wednesday October 27, 2021 12:30pm - 1:30pm MDT
Online A
  • Type Design, Online

3:15pm MDT

Design and Implementation of Highly Scalable Quantifiable Data Structures in C++
Architectural imperatives due to the slowing of Moore's Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Quantifiability is proposed as a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods.

In this talk, we present the design and implementation of a lock-free quantifiable stack (QStack) and a lock-free quantifiable queue (QQueue) in the C++ programming language. Our design achieves lock-freedom using compare_exchange_strong from the C++17 Atomic Operations Library. We depict several code snippets that illustrate how quantifiable data structures are highly scalable through use of relaxed semantics, an explicit implementation trade-off permitted by quantifiability. We explain how to reason about the correctness of quantifiable data structures and present a technique and a dynamic analysis tool developed in C++ for efficiently verifying a concurrent history as quantifiably correct, referred to as Vector Space Verification (VSV). We illustrate why it is impractical to use alternative verification techniques that compare concurrent histories to sequential histories for determining correctness for real programs.

We showcase the performance of quantifiable data structures by presenting a live demonstration that runs the QStack and QQueue and plots the results in real time. The QStack is compared with the lock-free Elimination Backoff Stack and the lock-free Treiber stack. The QQueue is compared with the lock-free LCRQ, and the wait-free Fetch-And-Add queue. The live performance demonstration illustrates how the QStack and QQueue achieve substantially higher scalability than the state-of-the-art linearizable counterparts. We also present a live demonstration of our VSV tool to dynamically check a concurrent history for the QStack and QQueue as quantifiably correct in less than O(n^2) time.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Victor Cook

Victor Cook

Researcher, University of Central Florida
Victor Cook is a Ph.D. candidate in Computer Science at the University of Central Florida. He received his Bachelor of Science in Geophysics from the Massachusetts Institute of Technology in 1987, and Master of Science in Civil Engineering from the University of Florida in 1989. Mr... Read More →
avatar for Zachary Painter

Zachary Painter

Zachary Painter is a Ph.D. student at the University of Central Florida. His area of research includes concurrent programming, transactional data structures, and blockchain concurrency. His prior work includes a lock-free transactional adjacency list as well as a parallel Hash-Mark-Set... Read More →
avatar for Christina Peterson

Christina Peterson

Postdoctoral Associate, University of Central Florida
Dr. Christina Peterson is a Postdoctoral Associate at the University of Central Florida. Dr. Peterson completed her dissertation work under the supervision of Dr. Damian Dechev with a focus on correctness and progress guarantees of multiprocessor algorithms and data structures. Her... Read More →


Wednesday October 27, 2021 3:15pm - 4:15pm MDT
 
Thursday, October 28
 

7:45am MDT

What Classes We Design and How
C++ class design has been error prone since the beginning until Scott Meyers told us about the Rule-of-Three. But even that is not enforced by the language. In addition, C++11 changed the set of compiler-provided special member functions and the intrinsic rules have become more complicated. However, instead of starting from the rules for special member functions, we will look at what role a class type plays and how that maps on what special member functions to define and how, if any. Examples for class roles are Value, Relationship, Manager (scoped, unique, general), Mix-in.

We will also look at the roles of member variable types that influence or imply the role of the class type.
The role of a class will also take out many mysteries of move operations and will lead to clear guidance when and how to implement move: for suppressing copying, for managing unique ownership (Unique Manager) or for optimizing object copies (General Manager).

We will rehearse the Rule of Zero, and learn more about the Rule of Five/Six, the Rule of DesDeMovA, and the Rule of Unique Three.

This all will enable you to much more consciously and safely design your class types and combine types of member variables. You will have then the ability to select from a few reasonable combinations from the plethora of possibilities of special member function combinations: {public:,protected:,private:} x {destructor, default constructor, copy constructor, copy assignment, move constructor, assignment} x {noexcept(true),noexcept(false)} x { =default, =delete, {/*body*/}, not declared } (math as homework)

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Peter Sommerlad

Peter Sommerlad

founder, Better Software: Consulting, Training, Reviews
Peter Sommerlad was director of IFS Institute for Software at FHO/HSR Rapperswil, Switzerland. Peter is co-author of the books POSA Vol.1 and Security Patterns and contributed to "97 things every programmer should know". His goal is to make software simpler and safer by Decremental... Read More →


Thursday October 28, 2021 7:45am - 8:45am MDT

9:00am MDT

A Persistent Hash Map for Graph Processing Workloads and a Methodology for Persistent Transactional Data Structures
Emerging byte-addressable Non-Volatile Memories (NVMs) provide higher densities and data persistence where process state can be recovered after crashes. Graph analytic applications such as search and ranking, pattern matching, and clustering benefit from the large capacity available with persistent memory since the data sets are very large with up to trillions of vertices and edges. A hash map is fundamental for graph analytics because it associatively map keys to values, offering constant time lookup for graph updates. While lock-free persistent hash maps have been developed, most perform poorly due to a heavy use of pointer dereferences. Additionally, it is often desirable to perform a composition of graph updates as a transaction. Although persistent data structures enable applications to rely on persistent data with failure-atomic operations, they lack the ability to allow users to execute a sequence of operations as transactions. Meanwhile, persistent transactional memory (PTM) has been proposed by adding durability to Software Transactional Memory (STM). However, PTM suffers from high performance overheads and low scalability due to false aborts, logging, and ordering constraints on persistence.

In this talk, we present PMap, a persistent concurrent hash map with open addressing and non-blocking parallel resizing to cater to large graph processing workloads. Our PMap achieves lock-freedom using compare_exchange_strong from the C++11 Atomic Operations Library. To provide persistence, our design uses a modified version of the link-and-persist approach. While this approach is traditionally used to persist pointers, our modification enables link-and-persist to be used in-place, persisting keys and values directly. This is crucial, as logs, or separate object allocations may require pointer dereferences, which undermines the cache locality benefits of pure open addressing. The PMap uses the C++11 alignas specifier to ensure data can be aligned and flushed on a per-cacheline basis into persistent memory. To accommodate durable transactions, we present PETRA, a new approach for constructing persistent transactional non-blocking linked data structures. PETRA natively supports transactions, but unlike PTM, relies on the high-level information from the data structure semantics. This gives PETRA unique advantages in the form of high performance and high scalability. We present diagrams detailing the PMap design and PETRA methodology for the C++ programming language, and illustrate how to keep the number of cache line flushes and memory fences low through the use of descriptor objects, which are commonly used in the design of lock-free data structures.

We showcase the performance of our proposed persistent data structures by presenting a live demonstration of PMap and PETRA data structures including a linked list, skiplist, map, and multi-dimensional list. We compare PMap to clevel, OneFile, STL, and PMDK, tested on a micro-benchmark and on files from Recursive Model for graph mining (R-MAT). We compare the PETRA data structures to OneFile, Romulus, and PMDK, tested on a micro-benchmark and the Telecommunication Application Transaction Processing (TATP) benchmark. The live demonstration illustrates how PMap outperforms state-of-the-art alternatives averaging 3122x faster under Intel Optane DC, and PETRA outperforms the state-of-the-art PTMs by an order of magnitude in transactions of size greater than one, and demonstrates superior performance in transactions of size one.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Kenneth Lamar

Kenneth Lamar

Graduate Research Assistant, University of Central Florida
Kenneth Lamar received his Bachelor of Science (2017) from the University of Central Florida. He is currently pursuing his PhD in Computer Science at UCF. His research interests include concurrent data structures and distributed computing. His work is currently focused on HPC scheduling... Read More →
avatar for Christina Peterson

Christina Peterson

Postdoctoral Associate, University of Central Florida
Dr. Christina Peterson is a Postdoctoral Associate at the University of Central Florida. Dr. Peterson completed her dissertation work under the supervision of Dr. Damian Dechev with a focus on correctness and progress guarantees of multiprocessor algorithms and data structures. Her... Read More →


Thursday October 28, 2021 9:00am - 10:00am MDT

10:30am MDT

Embracing PODs Safely Until They Die
How do you change the active member of a union? Can you copy an object without
a publicly callable copy constructor? Can you pass classes having private data to
a function implemented in C? What is the use case for the library type trait
`std::is_trivially_move_assignable`? All these questions and more will be answered
in this session.

PODs --- Plain Old Data --- are neither plain nor old in C++11, and continued to
evolve in every published standard since, until they were finally banished in C++20.
In researching the deconstruction of PODs for the upcoming book, "Embracing
Modern C++ Safely" Alisdair Meredith (and the other authors including John
Lakos, Vittorio Romeo, and Rostislav Khlebnikov) discovered that many of the
intuitive properties and capabilities of trivial and standard layout types did not
behave quite as expected, and there are many subtleties waiting to catch the
unwary. Nina Ranns, as an active member of the Core working group, stepped in
to explain and resolve many concerns, while pointing out further bad assumptions.
Together they will present the use cases, pitfalls, and annoyances of these features
as now properly understood, giving a flavor of the presentation style of each of the
57 C++11/14 features presented in the book.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Alisdair Meredith

Alisdair Meredith

Alisdair Meredith is a software developer at BloombergLP in New York, and a previous chair of the C++ Standard Committee Library Working Group. He has been an active member of the C++ committee for almost two decades, and by a lucky co-incidence his first meeting was the kick-off... Read More →
avatar for Nina Ranns

Nina Ranns

The Standard C++ Foundation
Nina Ranns has been a member of the C++ standard committee since 2013, focusing mostly on the core part of the language, and committee secretary since 2018. Throughout her career she has worked for Siemens, Motorola, Datasift, and Symantec on everything from parts of the UMTS network... Read More →


Thursday October 28, 2021 10:30am - 11:30am MDT
  • Type Design, Online
 
  • Timezone
  • Filter By Date CppCon 2021 Oct 24 -29, 2021
  • Filter By Venue online
  • Filter By Type
  • • Algorithms/Functional
  • • Async/Concurrency/Parallelism
  • • C++20/Future of C++
  • • Code Design
  • • const/Units/Time
  • • Education/Coaching
  • • Embedded
  • • GPU/Graphics
  • • Modules/Libraries
  • • Real-time/Data Science
  • • Software Design
  • • Templates/Concepts
  • • Testing/Error Handling
  • • Tooling/Debugging
  • • Type Design
  • Business
  • Social
  • Access


Filter sessions
Apply filters to sessions.