Loading…
CppCon 2019 has ended
• Concurrency [clear filter]
Monday, September 16
 

11:00 MDT

The C++20 Synchronization Library
In the decade since C++11 shipped, the hardware landscape has changed drastically. 10 years ago, we were still in the early stages of the concurrent processing revolution; 2 to 4 hardware threads were common and more than 10 was "many". Our tolerance for synchronization latency was greater; we were willing to pay microseconds and milliseconds.

Today, dozens and hundreds of threads are common, and "many" means hundreds of thousands. Concurrent applications are plagued by contention challenges that were unimaginable a decade ago. With the traditional tools we have today, programmers often have to choose between unacceptable contention and unacceptable high latency when synchronizing between threads.

The C++20 synchronization library brings solutions - new lightweight synchronization primitives that can efficiently marshall hundreds of thousands of threads:

- `std::atomic::wait`/`std::atomic::notify_*`: Efficient atomic waiting.
- `std::atomic_ref`: Atomic operations on non-`std::atomic` objects.
- `std::counting_semaphore`: Lightweight access coordination.
- `std::latch` and `std::barrier`: Marshalling groups of threads.

In this example-oriented talk, you'll learn how and when to use these new tools to build scalable, modern C++ applications that can run in parallel on virtually any hardware, from embedded controllers to server CPUs to modern GPUs.

Speakers
avatar for Bryce Adelstein Lelbach

Bryce Adelstein Lelbach

CUDA C++ Core Libraries Lead, NVIDIA


Monday September 16, 2019 11:00 - 12:00 MDT
Aurora C
  • Concurrency

16:45 MDT

From Algorithm to Generic, Parallel Code
This presentation starts with a parallel algorithm as it is described in books and turns it into a generic implementation. Multiple options for running the algorithm concurrently based on different technologies (OpenMP, Threading Building Blocks, C++ standard-only) are explored.

Using parallel algorithms seems like an obvious way to improve the performance of operations. However, to utilize more processsing power often requires additional work to be done and depending on available resources and the size of the problem the parallel version may actually take longer than a sequential version. Looking at the actual implementation for an algorithm should clarify some of the tradeoffs.

Showing how a parallel algorithm can be implemented should also demonstrate how such an algorithm can be done when there is no suitable implementation available from the [standard C++] library. As the implementation of a parallel algorithms isn't trivial it should also become clear that using a readily available implementation is much preferable.

Speakers
DK

Dietmar Kuhl

Engineer, Bloomberg LP
Dietmar Kühl is a senior software developer at Bloomberg L.P. working on the data distribution environment used both internally and by enterprise installations at clients. Before joining Bloomberg he has done mainly consulting for software projects in the finance area. He is a regular... Read More →


Monday September 16, 2019 16:45 - 17:45 MDT
Summit 8/9
 
Tuesday, September 17
 

08:00 MDT

Threading Design Decisions in AutoCAD for Web & Mobile
Porting AutoCAD Desktop to support web & mobile platforms is a grand challenge. AutoCAD has been around for more than 35 years, and its code base is written in C/C++ in such a manner that the code itself is a history book. Suffice to say, it aged well. In the modern era it is vital make software available for use from any device. We've managed to get AutoCAD running on iOS, Android and the Web.

One of the initial challenges we've tackled is how can we create a cross platform mechanism of cross-thread communications that will be robust enough to work anywhere. In this presentation I will talk about the design decisions revolving around achieving that and how those decisions returned and still return dividends all across the board.

Speakers
avatar for Max Raskin

Max Raskin

Tech Lead, Autodesk
Max is a software engineer and has been into programming since childhood, he's been programming professionally for 13 years now. His experience spans Web, Mobile and Desktop development - php, Javascript, Python, Java, C#, ObjC and Swift, but his true calling has always been C... Read More →


Tuesday September 17, 2019 08:00 - 08:45 MDT
Summit 8/9

16:45 MDT

Concurrency in C++20 and Beyond
C++20 is set to add new facilities to make writing concurrent code easier. Some of them come from the previously published Concurrency TS, and others are new, but they all make our lives as developers easier. This talk will introduce the new features, and explain how and why we should use them.

The evolution of the C++ Concurrency support doesn't stop there though: the committee has a continuous stream of new proposals. This talk will also introduce some of the most important of these, including the new Executor model.

Speakers
avatar for Anthony Williams

Anthony Williams

Just Software Solutions Ltd
Anthony Williams is the author of C++ Concurrency in Action.


Tuesday September 17, 2019 16:45 - 17:45 MDT
Aurora D
  • Concurrency
 
Wednesday, September 18
 

14:00 MDT

A Unifying Abstraction for Async in C++
Async in C++ is in a sad state. The standard tools -- promises, futures, threads, locks, and std::async -- are either inefficient, broken, or both. Even worse, there is no standard way to say _where_ work should happen. Parallel algorithms, heterogeneous computing, networking & IO, reactive streams, and more: all critically important foundational technologies that await a standard abstraction for asynchronous computation.

In this talk, Eric Niebler and David Hollman dig into the Standard Committee's search for the basis operations that underpin all asynchronous computation: the long-sought Executor concept. The latest iteration of Executors is based on the Sender/Receiver programming model, which provides a generalization of many existing paradigms in asynchronous programming, including future/promise, message passing, continuation passing, channels, and the observer pattern from reactive programming. It also has surprising and deep connections to coroutines, which further demonstrates the model’s potential to be a truly unifying abstraction for asynchronous programming in C++20 and beyond.

Eric and David will present the short-term and long-term directions for Executors in ISO Standard C++, illustrating the design by walking through several implementation examples. They will talk about the direct connection between coroutines and the Sender/Receiver model and discuss what it means for the future of asynchronous APIs in C++. Finally, they will cover how the restrictions imposed by the Executors model should affect the way you write code today so your code is ready for the next big revolution in parallel and concurrent C++ programming.

Speakers
avatar for Eric Niebler

Eric Niebler

Distinguished Engineer, NVIDIA
Eric is a long-time member of the ISO C++ Standardization Committee, and is probably best known for his work bringing ranges support to the C++20 Standard Library. He specializes in modern C++ library design, authoring several Boost libraries and the popular range-v3 library for computing... Read More →
avatar for Daisy Hollman

Daisy Hollman

Senior Member of Technical Staff, Sandia National Labs
Dr. David S. Hollman has been involved in the ISO-C++ standard committee since 2016. He has been a part of a number of different papers in that time, including `mdspan`, `atomic_ref`, and—most prominently—executors and futures. Since finishing his Ph.D. in computational quantum... Read More →


Wednesday September 18, 2019 14:00 - 15:00 MDT
Aurora A
  • Concurrency

14:00 MDT

Abusing Your Memory Model for Fun and Profit
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.

Speakers
avatar for Samy Al Bahra

Samy Al Bahra

CTO, Backtrace
Samy Al Bahra is the cofounder of Backtrace, where he is helping build a modern debugging platform for today’s complex applications. Prior to Backtrace, Samy was a principal engineer at AppNexus, where he played a lead role in the architecture and development of many mission-critical... Read More →
PK

Paul Khuong

Vice President, Not Google
After toiling on his dissertation about mathematical optimisation methods for large-scale network design, Paul Khuong has spent the majority of his professional and hobbyist life reverse engineering and modernising C, C++, and Common Lisp legacy systems. When not engaged in code archaeology... Read More →


Wednesday September 18, 2019 14:00 - 15:00 MDT
Aurora C
  • Concurrency
 
Thursday, September 19
 

09:00 MDT

Asynchronous Programming in Modern C++
With the advent of modern computer architectures characterized by -- amongst other things -- many-core nodes, deep and complex memory hierarchies, heterogeneous subsystems, and power-aware components, it is becoming increasingly difficult to achieve best possible application scalability and satisfactory parallel efficiency. The community is experimenting with new programming models that rely on finer-grain parallelism, and flexible and lightweight synchronization, combined with work-queue-based, message-driven computation. The recently growing interest in the C++ programming language in industry and in the wider community increases the demand for libraries implementing those programming models for the language.

In this talk, we present a new asynchronous C++ parallel programming model that is built around lightweight tasks and mechanisms to orchestrate massively parallel (and -- if needed -- distributed) execution. This model uses the concept of (Standard C++) futures to make data dependencies explicit, employs explicit and implicit asynchrony to hide latencies and to improve utilization, and manages finer-grain parallelism with a work-stealing scheduling system enabling automatic load balancing of tasks.

We have implemented such a model as a C++ library exposing a higher-level parallelism API that is fully conforming to the existing C++11/14/17 standards and is aligned with the ongoing standardization work. This API and programming model has shown to enable writing highly efficient parallel applications for heterogeneous resources with excellent performance and scaling characteristics.

Speakers
HK

Hartmut Kaiser

STE||AR Group, CCT/LSU
Hartmut is a member of the faculty at the CS department at Louisiana State University (LSU) and a senior research scientist at LSU's Center for Computation and Technology (CCT). He received his doctorate from the Technical University of Chemnitz (Germany) in 1988. He is probably best... Read More →


Thursday September 19, 2019 09:00 - 10:00 MDT
Aurora A
  • Concurrency

14:00 MDT

Structured Concurrency: Writing Safer Concurrent Code with Coroutines and Algorithms
Traditional approaches to concurrency and asynchronous programming, such as futures or threads, can be difficult to use safely, particularly in the presence of exceptions. These abstractions often implicitly introduce concurrency to your program in an unstructured way making it difficult to reason about your code.

The principle of “structured concurrency” aims to do for concurrent/async programming what constructs like if/while/for did for control-flow and what destructors and RAII did for object lifetimes - provide a structured way to think about concurrency in your programs by encapsulating common concurrency patterns into reusable algorithms.

This talk covers using the principles of “structured concurrency” in conjunction with coroutines to make it easier to write concurrent programs that are safer and more efficient than traditional approaches.

Speakers
avatar for Lewis Baker

Lewis Baker

Software Engineer, Facebook


Thursday September 19, 2019 14:00 - 15:00 MDT
Aurora A
 
Friday, September 20
 

14:45 MDT

The Networking TS in Practice: Patterns for Real World Problems
Asynchronous programming is difficult. In spite of this it continues to supplant traditional synchronous programming. Operating systems provide asynchronous primitives. Boost.Asio and the Networking TS make these easily accessible. This makes asynchronous programming increasingly convenient and essential within the C++ ecosystem.

As with other difficult and complex areas of software engineering (such as parallel programming) asynchronous programming can be tamed through the application of patterns, practices, and rules. Design patterns are useful not because most programming problems are unique, but rather because they’re instantiations of archetypes addressed by a certain well known pattern. Once the pattern is known and its proper use can be identified seemingly complex problems become banal.

The talk introduces such patterns for use with the Networking TS and Boost.Asio. Several common problems encountered in real world use of Boost.Asio will be introduced and patterns to address them elegantly and within the internal structure of the Networking TS will be covered.

Speakers
avatar for Robert Leahy

Robert Leahy

Lead Software Engineer, MayStreet Inc.
Robert is a graduate of the University of Victoria where he specialized in graphics, gaming, and digital geometry processing. After 4.5 years in full stack web development he switched to financial infrastructure software development in early 2017. He’s since become involved in the... Read More →


Friday September 20, 2019 14:45 - 15:45 MDT
Crest 4/5
  • Concurrency
 


Twitter Feed

Filter sessions
Apply filters to sessions.