Video & On-Demand

CppCon 2019 How to Herd 1,000 Libraries--Robert Schumacher

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

How to Herd 1,000 Libraries

by Robert Schumacher

Summary of the talk:

In the current C++ world, it is a struggle to convince even a single external library to build and behave. Adding a third and fourth dependency causes quadratic grief as each library interacts with each other and One Definition Rule violations lurk around every corner.

How, then, is it possible to manage over 1,000?

In this talk, we'll talk about the techniques, shims, and hacks used in the Vcpkg package manager to persuade, connive, and coerce all these independent moving parts into a single robust ecosystem. We'll sample the myriad approaches used by real-world libraries to declare dependence and walk through how they can be guided to do the right thing at the end of the day.

Private package management systems still thrive in corporations and these approaches can provide method to the madness of consuming open source.

CopperSpice: Variable Templates

New video on the CopperSpice YouTube Channel:

Variable Templates

by Barbara Geller and Ansel Sermersheim

About the video:

We found a great place to use a variable template that is not simply the math constant PI. In this video, we showcase roughly 15 lines of code that uses method pointers, template argument deduction, overload resolution, parameter packs, function objects, and a variable template. This video answers the question "so, what are variable templates good for?"

Please take a look and remember to subscribe!

CppCon 2020 Breaking Dependencies: The SOLID Principles--Klaus Iglberger

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Breaking Dependencies: The SOLID Principles

by Klaus Iglberger

Summary of the talk:

SOLID is an abbreviation for five of the most important software design principles:
- (S)ingle Responsibility Principle
- (O)pen-Closed Principle
- (L)iskov Substitution Principle
- (I)nterface Segregation Principle
- (D)ependency Inversion Principle

For almost two decades, these principles have proven to be a valuable set of guidelines to cope with software dependencies. Although initially introduced as guidelines for object-oriented programming, they have become a universal set of guidelines that can be used equally well for procedural, functional or generic programming. In this talk I'll recap the SOLID principles and explain why they form such a valuable set of universal design guidelines. Also, I'll go into detail about several common misconceptions.

CppCon 2019 Reducing Template Compilation Overhead, Using C++11, 14, 17, and 20--Jorg Brown

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Reducing Template Compilation Overhead, Using C++11, 14, 17, and 20

by Jorg Brown

Summary of the talk:

At their best, new C++ standards offer simpler, clearer, and faster-to-compile ways to write your code. But many information sources, for example Andrei Alexandrescu’s Modern C++ Design, haven’t been updated.

More importantly, template metaprogramming is not something we generally seek to optimize because a good compiler handles it well, and problems generally only show up in the form of long compile times.

In this presentation, I'll describe techniques you can use to simplify, clarify, and improve the compile speed, of your code, including:
* Using C++17 "if constexpr"
* Using C++11 variadic function / template arguments (often without needing recursion!)
* Using decltype on auto-return functions in order to compute types in a more readable way.
* Using C++20 constraints rather than std::enable_if

CppCon 2020 2020: The Year of Sanitizers?--Victor Ciura

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

2020: The Year of Sanitizers?

by Victor Ciura

Summary of the talk:

Clang-tidy is the go-to assistant for most C++ programmers looking to improve their code, whether to modernize it or to find hidden bugs with its built-in checks. Static analysis is great, but you also get tons of false positives.

Now that you’re hooked on smart tools, you have to try dynamic/runtime analysis. After years of improvements and successes for Clang and GCC users, LLVM AddressSanitizer (ASan) is finally available on Windows, in the latest Visual Studio 2019 versions. Let's find out how this experience is for MSVC projects.

We’ll see how AddressSanitizer works behind the scenes (compiler and ASan runtime) and analyze the instrumentation impact, both in perf and memory footprint. We’ll examine a handful of examples diagnosed by ASan and see how easy it is to read memory snapshots in Visual Studio, to pinpoint the failure.

Want to unleash the memory vulnerability beast? Put your test units on steroids, by spinning fuzzing jobs with ASan in Azure, leveraging the power of the Cloud from the comfort of your Visual Studio IDE.

CppCon 2019 Abusing Your Memory Model for Fun and Profit--Samy Al Bahra, Paul Khuong

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Abusing Your Memory Model for Fun and Profit

by Samy Al Bahra, Paul Khuong

Summary of the talk:

The most efficient concurrent C++ data structures used in the wild today usually achieve break-neck performance by either constraining their workload or constraining correctness to a particular memory model. The audience will learn about the Wild West of abusing memory models for performance and simplification, through real world examples. Non-blocking data structures and their benefits often come at the cost of increased latency because they require additional complexity in the common case. There are plenty of exceptions to this if the requirements of the data structure are relaxed, such as supporting only a bounded level of write or read concurrency or if correctness is constrained to a particular memory model. For this reason, well-designed specialized non-blocking data structures guarantee improved resiliency, throughput and latency in all cases compared to alternatives relying on traditional concurrency primitives. Specialized concurrent structures are common place in the Linux kernel and other performance critical systems.

You will learn about foundational concepts to understanding your underlying hardware's memory model and abusing memory models for fun and profit:
* Cache coherency
* Store Buffers
* Pipelines and speculative execution

This talk provides real-world examples that exploit the x86-TSO model to their advantage:
* A general technique to turn literally, any, open-addressed hash table into a concurrent hash table with low to negligible (near 0) cost. The transformation makes your hash table wait-free for writers and mostly wait-free for readers (lock-free in hypothetical worse cases) and is practical for languages such as C++. The mechanism is superior to the previously popular Azure lock-free hash table and even more importantly, practical for any non-garbage-collected environment. The overhead is negligible on TSO and low on non-TSO.
* Blazingly fast event counters. An extremely efficient replacement for condition variables is introduced and faster than any other alternative. This is implemented without requiring any heavy-weight atomic operations on the fast path by exploiting properties of the x86-TSO model.
* Scalable memory management: Exploit the ordering and visibility constraints of the underlying architecture for blazingly fast implementations of RCU and other safe memory reclamation schemes.
* and more.

CppCon 2020 A Parallel and Heterogeneous Task Programming System Using Modern C++--Tsung-Wei Huang

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

A Parallel and Heterogeneous Task Programming System Using Modern C++

by Tsung-Wei Huang

Summary of the talk:

The Taskflow project addresses the long-standing question: "How can we make it easier for developers to write parallel and heterogeneous programs with high performance and simultaneous high productivity?" Modern scientific computing relies on a heterogeneous mix of computational patterns, domain algorithms, and specialized hardware to achieve key scientific milestones that go beyond traditional capabilities. However, programming these applications often requires complex expert-level tools and a deep understanding of software methodologies. Specifically, the lack of a suitable software environment that can overcome the complexity of programming large parallel and heterogeneous systems has posed a significant barrier for many organizations to facilitate transformational discoveries.

Taskflow develops a simple and powerful task programming model to enable efficient implementations of heterogeneous decomposition strategies. Our programming model empowers users with both static and dynamic task graph constructions to incorporate a broad range of computational patterns including hybrid CPU-GPU computing, dynamic control flow, and irregularity. We develop an efficient heterogeneous work-stealing strategy that adapts worker threads to available task parallelism at any time during the graph execution. We have demonstrated promising performance of Taskflow on both micro-benchmark and real-world applications. As an example, we solved a large machine learning workload by up to 1.5× faster, 1.6× less memory, and 1.7× fewer lines of code than two industrial-strength systems, oneTBB and StarPU, on a machine of 40 CPUs and 4 GPUs.

This talk will cover three aspects: (1) heterogeneous task programming model using modern C++, (2) an efficient work-stealing strategy generalizable to arbitrary heterogeneous domains, and (3) user experience we have obtained and suggested roadmap for C++ in face of future heterogeneity.

The Taskflow project is available at https://taskflow.github.io/

CppCon 2019 Small is beautiful: Techniques to minimise memory footprint--Steven Pigeon

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Small is beautiful: Techniques to minimise memory footprint

by Steven Pigeon

Summary of the talk:

When we code, we often assume that the computer has an infinite amount of memory. This is, of course, /very/ false. It is false for embedded programming, where memory is often limited to a few megabytes or even a few kilobytes, but it is also false for the most powerful workstations and servers. Using memory wisely makes your application possible on small systems as well as prevents, or at least reduces, scaling problems for larger applications. While some programming languages are designed to hide implementation details from the programmer, C++ allows the programmer to specify, with a good level of control, how memory is allocated, structured, and used. In this talk, we will explore what can be done at run-time with negligible cost, what can be done at compile-time with meta-programming, and how we can thwart default compiler behavior to achieve memory-efficient type-safe data representations. We will also extend the discussion to the higher-level reorganization of data structures in order to make a better use of memory.

CppCon 2020 Get Off My Thread: Techniques for Moving Work to Background Threads--Anthony Williams

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Get Off My Thread: Techniques for Moving Work to Background Threads

by Anthony Williams

Summary of the talk:

If you're writing a GUI application and you want the interface to feel "responsive" to the user then you need the code that response to UI events to be short and fast. Similarly, if you are handling network I/O you may not want the processing of one request to prevent the system receiving further input.

If the work to be done in response to an event is complex and time consuming then you can maintain the "responsiveness" of the system by passing the work off to a background thread.

This talk will look at the ways of doing this, including managing ongoing work, providing progress updates, and cancelling work if it is no longer needed.

CppCon 2019 Behind the Scenes of a C++ Build System--Jussi Pakkanen

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from our most recent in-person conference in 2019 and our online conference in 2020. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2021 to attend in person, online, or both!

Behind the Scenes of a C++ Build System

by Jussi Pakkanen

Summary of the talk:

Everyone has an opinion on what build systems should do but there are surprisingly few who have an understanding of how they do it. In this talk we shall look behind the curtain and examine what does it actually take to create a modern build system and how they go about their business of turning source code into either compiler errors or executables.

On this journey we shall learn about the wonders of supporting 10+ different platforms and toolchains, dependency management, the awesomeness (both ironically and not) of shared libraries, compiler bugs and the interesting requirements on tools used at the lowest layers of a modern operating system. Using the increasingly popular Meson build system we shall examine real world design choices and tradeoffs and how they affect the final end user development experience. Performance optimization is also examined by looking at how you can efficiently scale program compilation both up to a compilation cluster and down to something like a Raspberry Pi.

Armed with all this knowledge we should finally be able to answer the question of why almost all build systems have suffered from poor usability and maybe, just maybe, find a proper solution for the build and dependency problem.