Category: Science & Technology

Multi Threading Model in Paradox Games: Past, Present and Future – Mathieu Ropert – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---

Paradox grand strategy games are all about simulating history through various lenses (politics, economy, warfare, diplomacy, demographics...) in real time. Over the last 20 years, our games have become more complex and more demanding on CPU computations.
In this talk we will see how the threading model of the game simulation evolved over time to try and deliver the necessary throughput and latency required to keep the games fluid with more and more complex systems.
We will focus on 3 models, the "old" which is shared by some long running production games such as Europa Universalis IV, Hearts of Iron IV and Stellaris, the "current" model brought by Crusader Kings 3 and finally discuss some thoughts and ideas of what future games may experiment with.

---

Mathieu Ropert

Tech Lead, Paradox Development Studio
French C++ expert working on (somewhat) historical video games. Decided to upgrade his compiler once and has been blogging about build systems ever since. Past speaker at CppCon, Meeting C++ and ACCU. Used to run the Paris C++ User Group. Currently lives in Sweden.

---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Breaking Dependencies: Type Erasure – A Design Analysis – Klaus Iglberger – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---

This session is part of the Software Design Track.

“If I could go back in time and had the power to change C++, rather than adding virtual function, I would add language support for type erasure …” (Eric Niebler, June 19, 2020, Twitter).

For many developers type erasure is superior to inheritance. And indeed, it has proven itself to be a powerful design pattern, helping to significantly reduce coupling between software entities.

This talk will give a short introduction to type erasure, with a particular focus on the design aspect of the technique. After attending this session, attendees will understand why type erasure provides such a strong decoupling and why this makes it superior to inheritance in terms of dependency management.

---
Klaus Iglberger

Freelancer
C++ Trainer/Consultant
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 EU and US). Additionally, he is the initiator and lead designer of the Blaze C++ math library (https://bitbucket.org/blaze-lib/blaze/src/master/) and one of the organizers of the Munich C++ user group (https://www.meetup.com/MUCplusplus/).

---

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

A Case-study in Rewriting a Legacy GUI Library for Real-time Audio Software in Modern C++ – Roth Michaels

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
A case-study in the design and development of iZotope's GUI framework, for real-time audio software, using C++17 to eliminate common sources of bugs and increase developer productivity. To illustrate this process, we will study GlassProperties, a new open-source library for property serialization and accessor method synthesis. While designed to support building GUIs for real-time audio software, GlassProperties is a general purpose framework not tied to any one GUI library and could easily be adapted into your GUI or any part in your tech stack.

We will cover the library design process, starting with analysis of legacy code and bugs to develop user problem statements. These user problems will be our guide for wrapping a legacy system with a new type-safe API using C++17 compile-time meta-programming so that run-time bugs become compile-time errors. Once we arrive at a C++17 design, we will close with a brief look to the future and how the library would look with C++20 Concepts.

In addition to learning the software design techniques to succeed in this rewrite, some lessons learned will be shared so you will be armed with both the C++ skills and business strategy to take on a project like this at your organization.

---
Roth Michaels

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Hazard Pointer Synchronous Reclamation Beyond Concurrency TS2 – Maged Michael – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
The hazard pointer deferred reclamation technique supports low-latency access to dynamic objects by deferring the reclamation of objects that may be removed while being accessed concurrently until reclamation is safe. Many uses of hazard pointers require support for synchronous reclamation, that is, guarantees for the timing of reclamation of some objects, primarily due to the dependence of the deleters of such objects on resources that may become subsequently unavailable.

The upcoming WG21 Concurrency Technical Specification (Concurrency TS2) includes support for hazard pointer synchronous reclamation. This talk describes such support and goes beyond the TS and describes a faster scalable alternative interface for synchronous reclamation and novel algorithms for implementing it that are in heavy use in the Folly open-source library.

Fast and scalable synchronous reclamation for deferred reclamation has been a long-standing open problem. This talk presents a new interface and algorithms that solve the problem. Objects protectable by hazard pointers are organized into cohorts. The completion of the destruction of a cohort object guarantees the completion of the destructors for all associated protectable objects, thus providing synchronous reclamation by controlling cohort destruction. A significant algorithmic challenge is the interaction between synchronous and asynchronous reclamation. Asynchronous reclamation serves to bound the number of reclaimable objects that are not yet reclaimed. The talk outlines how the new algorithms manage to support both types of reclamation safely while allowing synchronous reclamation to be fast and scalable.

The talk concludes with a proposed roadmap for hazard pointer synchronous reclamation standardization beyond Concurrency TS2.

---
Maged Michael

Maged Michael is a software engineer at Facebook. He is the inventor of hazard pointers, lock-free malloc and several algorithms for concurrent data structures. He received a Ph.D. in computer science from the University of Rochester. He is an ACM Distinguished Scientist. He is an elected member of the Connecticut Academy of Science and Engineering. He received the 2014 ACM SIGPLAN Most Influential PLDI Paper Award for his paper on Scalable Lock-Free Dynamic

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Deducing this Patterns – Ben Deane – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
How would our code change if a member function could deduce the type and value category of the object ("this") it worked on?

Potentially a lot, and this talk will highlight some of those changes. Because with C++23, member functions will be able to do just that using a feature described in P0847, "Deducing this". Many patterns in C++ today could change, and new patterns will arise. This talk will explore those patterns, explain how "deducing this" works, and show how it solves the problems that originally motivated the paper.

Some sample effects on our code: CRTP is simplified; decorators become much easier and terser; recursive lambda expressions become straightforward. There are also implications for safely and efficiently moving values through computations.

---
Ben Deane

Ben was a game programmer for over 20 years, working in C++ since the late 90s, for companies like EA and Blizzard. In 2018 he left the games industry to join Quantlab, an automated trading firm, where he writes modern, well-performing C++. He likes to play with algorithms, and to make the type system work for him, and he’s always looking for useful new techniques. Ben is the presenter of several previous C++Now and CppCon talks.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Back to Basics: Casting – Brian Ruth – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
“In all cases, it would be better if the cast ... could be eliminated” --Bjarne Stroustrup. As this quote attests, casting has been controversial from the beginnings of C++ and yet, when used judiciously, continues to be a very powerful tool for the language. In this back to basics talk, we will look at the history of casing in C++, why we have the casts that we do have, how casting interacts with run time type information (RTTI), and what the compiler actually does when we add casts to our code. When we’re done, you should be able to know when to use (or not use) a cast and what effect it will have on your project.

---
Brian Ruth

Brian has been programming in C++ for 20+ years; working for both small and large companies on a wide variety of projects and technologies. For over a decade he worked with neuroscience researchers and created high speed acquisition, analysis and visualization software. He is currently a senior software engineer at Garmin, developing embedded devices and migrating legacy modules to C++. When he isn’t knee deep in code, he is enjoying a home brewed beer or building some furniture. He has been a volunteer at CppCon since 2015.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

C++20 ❤ SQL – John Bandela – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
SQL is *the* language for database manipulation. However, interfacing it to C++ in a type safe manner can be awkward, requiring either preprocessors, boilerplate, or loss of type safety.

In the past, to achieve type safety, people have written domain specific languages. However, a DSL comes with its own issues, including how to specify the DSL data model, how to support the richness of SQL semantics, and how to translate SQL to the DSL.

C++20 provides us the features to be able to use SQL queries almost directly in C++ in a type safe way. With some minimal, specialized SQL comments, we can generate type safe parameter and result row bindings in C++ at compile time from an SQL query string.

No macros, no preprocessors, no boilerplate!

Just awesome standard C++20.

Join us as we explore how we can unleash the full power of two amazing languages: C++ and SQL!

---
John Bandela

I first started programming in C++ at age 14 in 1994 when I cajoled my parents into buying me Visual C++ 1.0 for my birthday. It took a while, but as I learned the language, I decided I really liked C++. I attended the University of Florida and obtained my undergraduate degree in Computer and Information Science. During my undergraduate time, I created and submitted Boost.Tokenizer. I went on to medical school and neurosurgery residency, but decided to do something with a little less scary undefined behavior and returned to programming in C++.

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Generic Graph Libraries in C++20 – Andrew Lumsdaine & Phil Ratzloff – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
The C++ Standard Library is a valuable collection of generic algorithms and data structures that improves the usability and reliability of C++ software. Graph algorithms and data structures are notably absent from the standard library, and previous attempts to fill this gap have not gained widespread adoption.

This session presents an approach for expressing graph algorithms in a modern, composable, and extensible, aka generic, fashion. Concepts provide a means for a systematic organization of the type requirements for graph algorithms to operate correctly and efficiently. Remarkably, these type requirements can be expressed not in graph-specific terms, but rather in terms of existing sets of requirements already in place for basic containers in C++, i.e., ranges. Using this conceptual framework, we develop several generic algorithms and concrete data structures as well as the emerging proposal for a standard graph library.

---
Andrew Lumsdaine

Andrew Lumsdaine is an internationally recognized expert in the area of high-performance computing who has made important contributions in many of the constitutive areas of HPC, including systems, programming languages, software libraries, and performance modeling. His work in HPC has been motivated by data-driven problems (e.g., large-scale graph analytics), as well as more traditional computational science problems. He has been an active participant in multiple standardization efforts, including the MPI Forum, the BLAS Technical Forum, the ISO C++ standardization committee, the oneAPI Technical Advisory Board, and the SYCL Advisory Panel. Open source software projects resulting from his work include the Matrix Template Library, the Boost Graph Library, and Open MPI.

Phil Ratzloff

Phil Ratzloff is a Distinguished Software Developer and C++ advocate at SAS Institute. He has used C++ for 26 years on applications using graphs for business cost analysis and fraud detection.

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

Back to Basics: Classic STL – Bob Steagall – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
The C++ world experienced a revolution when the original STL was released by HP in the early 1990s. Based on the pioneering work of Alex Stepanov, Meng Lee, and others, the C++ community now had a set of generic container types that did not depend on algorithms, and vice versa. Through its use of well-defined interface and complexity requirements, the design of the STL allows programmers to use library containers with their own algorithms, as well as to use library algorithms with their own containers.

This talk will take a very brief look at the origins of the STL and its importance to C++. We'll then describe the three main pillars of the STL -- containers, iterators, and algorithms -- as well function objects and adaptors. We'll see how they cooperate to provide a set of generic, orthogonal, composable, and extensible programming tools. We'll summarize the containers and their corresponding interface and complexity requirements. We'll look at iterators and how they connect containers with algorithms. And finally, we'll give an overview of the algorithms and how they interact with containers via iterators.

If you're new to C++ or less experienced with the language, and wonder why the STL is such a big deal, this talk is for you. If you're looking for a better understanding of the design and principles underlying the STL, this talk is for you. Attendees will leave this session with a basic understanding of the standard containers, iterators, and algorithms, and most importantly, the relationships between them.

---
Bob Steagall
KEWB Computing

---
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

The Factory Pattern – Mike Shah – CppCon 2021

  • Lobby
  • Science & Technology

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
C++ programs that are dynamic in nature have to create objects at some time during run-time. New objects can be created by explicitly calling ‘new’ and then the data type of that object. However, this requires that a programmer knows at ‘compile-time’ what object should be created. What we would like, is to have a layer of abstraction, or someway to create objects at run-time to reflect the dynamic nature of some C++ programs. Luckily, there is a common pattern that can help solve this problem--the factory design pattern.

In this talk, we are going to discuss a creational design pattern known as a factory. The pattern can be as simple as a function, or take on other forms as a distributed factory, or an abstract factory. We’ll show some basic examples of a factory in modern C++ as well as real world use cases of where factories occur for further study. Finally, we’ll discuss the tradeoffs of the factory pattern, and discuss which scenarios you may not actually want to use a factory. Attendees will leave this talk with the knowledge to go forward and implement the factory pattern, as well as how to spot the factory pattern in projects they may already be working on!

---
Mike Shah

Michael D. Shah completed his Ph.D. at Tufts University in the Redline Research Group in 2017. His Ph.D. thesis advisor was Samuel Z. Guyer. Michael finished his Masters degree in Computer Science in 2013 at Tufts University and Bachelors in Computers Science Engineering at The Ohio State University in 2011. Currently Michael is a lecturer at Northeastern University.

Michael discovered computer science at the age of 13 when googling ”how do I make games”. From that google search, Mike has worked as a freelance game developer, worked in industry for Intel, Sony Playstation, Oblong Industries, and researched at The Ohio Supercomputer Center to name a few. Mike cares about building tools to help programmers monitor and improve the performance of realtime applications– especially games.
In Michael’s spare time he is a long distance runner, weight lifter, and amateur pizza maker.

---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology