Skip to content
0:00 / 0:00

#c++#real-time#standardlibrary

Real-time Programming with the C++ Standard Library - Timur Doumler - CppCon 2021

CppCon

189K subscribers • 136 videos on Hallway • Conference channel

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Timur Doumler
  • Linked in the descriptionCppCon/CppCon2021

Advanced. Deep dive for people who know the field.

67K views4 years ago2 recommendations

Programming languagesSystems programmingC++Performance and optimizationConcurrency and parallelism

Timur Doumler analyzes which parts of the C++ standard library are safe to use in deterministic, real-time contexts.

cppcon.org/ github.com/CppCon/CppCon2021 --- In applications such as video games and audio processing, a program has to not only produce the correct result, but to do so reliably in a deterministic amount of time. The code needs to satisfy real-time constraints, complicated by the fact that it will typically run on a non-real-time OS kernel. Writing code for such constraints significantly differs from writing code that maximises for bandwidth or overall performance. How well suitable is the C++ standard library for such scenarios? In this talk, we will go through many of its facilities in detail. Which are safe to use in (near-)real-time contexts? Which should be avoided, and why? We will discuss well-established utilities and useful patterns as well as some less commonly known details. This talk is a different kind of tour through the standard library – and afterwards, you will be more confident in using it! --- Timur Doumler is the Developer Advocate for C++ at JetBrains. As a developer, he specialises in audio and music software. Timur is an active member of the ISO C++ standard committee, co-founder of the music tech startup Cradle, and conference chair of the Audio Developer Conference (ADC). He is passionate about building inclusive communities, clean code, good tools, low latency, and the evolution of the C++ language. --- Videos Filmed & Edited by Bash Films: BashFilms.com YouTube Channel Managed by Digital Medium Ltd events.digital-medium.co.uk *--*

Why it's here

2 people recommend this

What people say. Recommended for understanding real-time constraints, memory allocation, and using C++ in low-level embedded systems.

Moments people linked to

u/danngreenin r/embedded • Recommends

On “Advice on using C++ in low level embedded”

You probably want to read this book: https://arobenko.github.io/bare_metal_cpp/ It gets very low-level, to the point of startup code (crt.0) and compiling with -nostdlib. It also talks about how to detect with 100% confidence if something is using dynamic allocations, answering one of your questions. Regarding what parts of the std lib are OK to use, there’s a lot of overlap between low-level embedded and real-time programming (no allocations, no rtti, no exceptions). This talk isn’t exactly what you’re looking for but has some good tips regarding what parts of the std lib are ok: link to this video

u/morabassin r/embedded • Recommends

On “C++20 for bare-metal microcontroller programming”

C++ has PMR which is a really easy way to create a pool allocator such as this. Check out monotonic_buffer_resource which can be useful for real time, but there are other options to. Here's a useful talk on custom allocators.
7View on Reddit