Category: Uncategorized

Back to Basics: C++ Testing – by Amir Kirsh – CppCon 2022

https://cppcon.org/
---

Back to Basics: Unit Testing in C++ - Amir Kirsh - CppCon 2022
https://github.com/CppCon/CppCon2022

Proper developer testing is one of the most important steps in software development, and yet sometimes tend to be neglected, especially in C++.
In this session we will talk about unit testing in C++, based on Google Test examples. We may cover also other testing frameworks, if time permits.

We would start with the first steps of creating automated unit tests and continue to complex scenarios that require using mocks. We would discuss the TDD approach as well as other unit testing best practices.

This session is part of the Back to Basics track and is aimed for C++ developers who do not use a proper testing framework today. More experienced developers are of course welcomed to join and enrich the discussion with their knowledge and experience.
---

Amir Kirsh

C++ lecturer at the Academic College of Tel-Aviv-Yaffo and Dev Advocate at Incredibuild. Previously the Chief Programmer at Comverse. Co-organizer of Core C++ conference and a member of the Israeli ISO C++ NB. Currently a visiting researcher at Stony Brook University, New-York.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #softwaredevelopment

Filed under: UncategorizedTagged with: , , , , , ,

Undefined Behavior in the STL – by Sandor Dargo – CppCon 2022

https://cppcon.org/
---

Undefined Behaviour in the STL - Sandor Dargo - CppCon 2022
https://github.com/CppCon/CppCon2022

In this talk, I will briefly remind you what undefined behavior is and what dangers it can bring to our software - to our products. Then I'll demonstrate that the undefined behaviour is there even in the standard library, in containers, in algorithms. Moreover, I will explain that such behavior was introduced with care and purpose. We will go through some more interesting cases and we will also see how we can protect ourselves.
---

Sandor Dargo

Sandor is a passionate software craftsman focusing on reducing the maintenance costs by developing, applying and enforcing clean code standards. His other core activity is knowledge sharing both oral and written, within and outside of his employer. When not reading or writing, he spends most of his free time with his two children and his wife baking at home or travelling to new places.
__

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

#cppcon #programming #stl

Filed under: UncategorizedTagged with: , , ,

Understanding C++ Coroutines by Example: Generators (Part 1 of 2) – Pavel Novikov – CppCon 2022

https://cppcon.org/
---

Understanding C++ Coroutines by Example: Generators (Part 1 of 2) - Pavel Novikov - CppCon 2022
https://github.com/CppCon/CppCon2022

Coroutines are a powerful tool added to C++20. There are no out-of-the-box facilities in the standard library that are user friendly and immediately usable, although there are plenty of libraries out there already providing such primitives.

Also there are now best practices regarding usage of coroutines in C++ that emerged while people were learning them, and that programmers should know about.

This time we will concentrate on the generators part of the coroutines.
We'll get up to speed with how coroutines work under the hood, and then learn about the co_yield keyword, and how simple generators and asynchronous generators conceptually work.

Note: this session is part 1 of a series of talks. They cover separate aspects of coroutines and are designed to be mostly independent. You can watch part 2 here: https://youtu.be/lz3F036_OvU
---

Pavel Novikov

Got an engineering degree in missilery from BMSTU (Moscow).

Loves C++ and knows how to cook it.

Likes metaprogramming, multithreading and asynchronous programming, coroutine adoption enthusiast.
__

Videos Streamed, Edited, and YouTube Channel Managed by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #coroutines

Filed under: UncategorizedTagged with: , , , , , , , ,

Taking Static Type-Safety to the Next Level – Physical Units for Matrices – Daniel Withopf – CppCon 22

https://cppcon.org/
---

Taking Static Type-Safety to the Next Level - Physical Units for Matrices - Daniel Withopf - CppCon 2022
https://github.com/CppCon/CppCon2022

If you are interested in achieving the ultimate goal in library interface design: "If it compiles, it works!", this talk is for you!

There are several existing C++ libraries to annotate scalars with their physical units.

This talk will present a full-blown solution for a related problem that has not been solved in C++ before: How can we put distinct physical unit types (e. g. meters, seconds, meter per second...) inside a single vector or matrix type from a linear algebra library?

The presented solution uses C++'s strong type system to provide these physical unit annotations for each matrix element. Furthermore, it also enables coordinate frame and quantity kind annotations (think X- and Y-position in coordinate frame A or B which have identical units but refer to different things).

We will learn what is the best way to represent these annotations, how they propagate through linear algebra operations, how they determine the subset of valid operations on each type and of course and most importantly, how this can be implemented efficiently in C++ (with a special on how C++20 is a game-changer here).

While developing the solution, we will also understand how this leads to code that is more expressive and less likely to contain errors because the majority of bugs can be caught at compile-time.

Applications that benefit from this include robotics, computer graphics, automated driving and any other domain that works with physical units, different coordinate frames and matrix operations.
---

Daniel Withopf

Daniel Withopf has been working on solving real-world problems with C++ in robotics, computer vision and related fields for over 20 years. He is a Staff Software Engineer at the German car supplier Bosch where he wrote and maintains an object tracking framework for self-driving car projects. While doing that he discovered novel ways how to leverage C++'s type system to create linear algebra and tracking code that is more expressive, easier to understand and less likely to contain errors.
__

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

#cppcon #programming #type

Filed under: UncategorizedTagged with: , , , , , , , , ,

The Hidden Performance Price of C++ Virtual Functions – by Ivica Bogosavljevic – CppCon 2022

https://cppcon.org/
---

The Hidden Performance Price of C++ Virtual Functions - Ivica Bogosavljevic - CppCon 2022
https://github.com/CppCon/CppCon2022

Virtual function mechanism is one of the core concepts of C++, however, it does come with a performance price. But how high is that price? In this talk we are going to dissect virtual functions to understand when they are slow and why they are slow. We will investigate how well virtual functions use the CPU's underlying resources and how good is the compiler at optimizing virtual functions. We will also present several techniques to help you speed up your program using virtual functions.
---

Ivica Bogosavljevic

Senior Software Engineer with 10 years of experience active in the domain of Linux and bare-metal embedded systems. His professional focus is application performance improvement - techniques used to make your C/C++ program run faster by using better algorithms, better exploiting the underlying hardware, and better usage of the standard library, programming language, and the operating system. Writer for a performance-related tech blog: https://johnysswlab.com]
---

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

#cppcon #programming #functions

Filed under: UncategorizedTagged with: , , , , , ,

High Speed Query Execution with Accelerators and C++ – Alex Dathskovsky – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

High Speed Query Execution with Accelerators and C++ - Alex Dathskovsky - CppCon 2022
https://github.com/CppCon/CppCon2022

Large-scale analytics of structures and semi-structured data has become a pivotal workload in many computing domains, from science, through finance, to social networks. Big data analytics has proven to be highly CPU-bound and requires immense compute resources. Yet unlike the deep learning domain that has gone through a couple of hardware acceleration cycles, big data analytics is still running on stock CPUs. A fundamental reason for this lack of hardware acceleration is that big data analytics is much more computational diverse than deep learning. As a result, a hardware accelerator for big data analytics requires careful balancing of dedicated hardware acceleration with a programmable and flexible fabric. Here at Speedata we are developing the first hardware accelerator for big data analytics. Our SoC relies on a novel massively parallel, non-von Neumann processor coupled with dedicated hardware accelerators. But what good is a hardware accelerator without an optimized software stack? This talk will discuss how we combine C++ and Python to dynamically generate custom query code and compile it for our massively parallel processor. We will discuss are aggressive metacppcon.digital-medium.co.uk/tag/programming/">programming framework that stretches C++ boundaries to the cutting edge. We will further discuss how our code is created, some of the tricks that we use to generate our accelerated code, and why C++17 and C++20 is one of the most important aspects for our development.
---

Alex Dathskovsky

Alex has over 16 years of software development experience, working on systems, low-level generic tools and high-level applications. Alex has worked as an integration/software developer at Elbit, senior software developer at Rafael, technical leader at Axxana, Software manager at Abbott Israel and now a group manager a technical manager at Speedata.io an Exciting startup the will change Big Data and analytics as we know it .On His current Job Alex is developing a new CPU/APU system working with C++20, Massive metacppcon.digital-medium.co.uk/tag/programming/">programming and development of LLVM to create the next Big thing for Big Data.

Alex is a C++ expert with a strong experience in template meta-cppcon.digital-medium.co.uk/tag/programming/">programming. Alex also teaches a course about the new features of modern C++, trying to motivate companies to move to the latest standards.
__

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , , ,

ISO C++ Standards Committee Panel Discussion – Hosted by Herb Sutter – CppCon 2022

https://cppcon.digital-medium.co.uk/tag/cppcon/">cppcon.org/
---

ISO C++ Standards Committee Panel Discussion - Hosted by Herb Sutter - CppCon 2022

Committee Fireside Chat

Bring your questions! This panel of representative members of the C++ standards committee is ready to discuss everything from C++20 and C++23, to how the committee has been working online for nearly all the C++23 cycle, to what to look forward to in Standard C++ in the coming years.

Besides C++’s creator Bjarne Stroustrup, the panelists include a variety of members from across the topical subgroups in the committee. You’ll have people who participate in language and library evolution, and topics like compile-time cppcon.digital-medium.co.uk/tag/programming/">programming, real-time/embedded systems, AI, and teaching as the community starts to absorb all the new features in C++20 and soon C++23.
---

Moderator: Herb Sutter
---

Panelist: Bjarne Stroustrup
---

Panelist: Daisy Hollman
---

Panelist: Daniela Engert
---

Panelist: David Sankel
---

Panelist: Inbal Levi
---

Panelist: Michael Wong
---

Panelist: Nina Ranns
---

Panelist: Pablo Halpern
---

Panelist: Timur Doumler
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon.digital-medium.co.uk/tag/cppcon/">cppcon #cppcon.digital-medium.co.uk/tag/programming/">programming #cpp

Filed under: UncategorizedTagged with: , , , , , , ,

C++ Lambda Idioms – by Timur Doumler – CppCon 2022

https://cppcon.org/
---

C++ Lambda Idioms - Timur Doumler - CppCon 2022
https://github.com/CppCon/CppCon2022

Ever since they were introduced in C++11, lambdas have been an essential language feature. Each subsequent standard added more functionality: we got generic lambdas and init captures in C++14, constexpr lambdas in C++17, default-construction and assignment, explicit template arguments and more in C++20, and even more possibilities are coming in the upcoming C++23 standard.

In this talk, we are looking at various interesting things you can do with lambdas. Some of these are well-established, useful idioms; others are lesser known, surprising tricks. Have you ever inherited from a lambda? Can you think of three different ways to call a lambda recursively? Do you know what happens if we assign an immediately-invoked lambda expression to a static variable? If not, then this talk is for you.
---

Timur Doumler

Timur Doumler is the Developer Advocate for C++ tools at JetBrains and an active member of the ISO C++ standard committee. As a developer, he worked many years in the audio and music technology industry and co-founded the music tech startup Cradle. Timur 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: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #lambda

Filed under: UncategorizedTagged with: , , , , , ,

C++ Concurrency TS 2 Use Cases and Future Direction – by Michael Wong, Maged Michael and Paul McKenney

https://cppcon.org/
---

C++ Concurrency TS 2 Use Cases and Future Direction - Michael Wong, Maged Michael, Paul McKenney - CppCon 2022
https://github.com/CppCon/CppCon2022

C++ Concurrency TS 2 has been approved, and is now accumulating content. It already contains two major sections covering hazard pointers and RCU. Because hazard pointers and RCU both have a long and rich history of implementation and use, minimal versions of both are also being proposed for inclusion in C++26. Both RCU and hazard pointers have more advanced features but they are confined to TS 2, and independent reference implementations of these advanced features are in progress. This talk will focus on additional use cases for RCU and hazard pointer and potential additions to TS 2.

Potential TS 2 additions include asymmetric fences, snapshot_ptr (also known as latest or cell), concurrent counters, concurrent queues, and synchronized <T>. TS 2 might therefore include concurrent data structures as well as the existing hazard pointers and RCU safe/deferred-reclamation techniques.

Next, we will describe hazard pointers can be used to replace slow and contended code (e.g., using shared_mutex and shared_ptr) to equivalent fast and scalable code using Concurrency TS 2 support.

Last, but hopefully not least, we will describe the phased-state-change RCU use case that can be used to create synchronization primitives that have RCU-reader-like overhead on fast paths. Of course, there is no free lunch in concurrency, so this also means that slow paths have RCU-grace-period-like latencies. This use case will be illustrated with a fast-readers reader-writer lock.
---

Michael Wong

Michael Wong is a Distinguished Engineer at Codeplay Software, a Scottish company that produces compilers, debuggers, runtimes, testing systems, and other specialized tools to aid software development for heterogeneous systems, accelerators, and special purpose processor architectures, including GPUs and DSPs. For twenty years, he was the Senior Technical Strategy Architect for IBM compilers. Michael is also Chair of the Khronos C++ Heterogeneous Programming language SYCL, Editor for the Concurrency TS and the Transactional Memory TS, Canadian Head of Delegation to the ISO C++ Standard, Founding member of the ISO C++ Directions group, Director and VP of ISOCPP.org and Chair of al Programming Languages for Canada’s Standard Councils.
---

Maged Michael

Maged Michael is a software engineer at Meta Platforms (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 Memory Allocation and the 2022 Dijkstra Prize for his 2004 paper "Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic Reads and Writes".
---

Paul McKenney

Paul E. McKenney has been coding for almost four decades, more than half of that on parallel hardware, where his work has earned him a reputation among some as a flaming heretic. Paul is at Meta Platforms (Facebook), where he maintains the RCU implementation within the Linux kernel, where the variety of workloads present highly entertaining performance, scalability, real-time response, and energy-efficiency challenges. Paul was previously an IBM Distinguished Engineer at the IBM Linux Technology Center. Prior to that, he worked on the DYNIX/ptx kernel at Sequent, and prior to that on packet-radio and Internet protocols (but long before it was polite to mention Internet at cocktail parties), system administration, business applications, and real-time systems. His hobbies include what passes for running at his age along with the usual house-wife-and-kids habit.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #programming #concurrency

Filed under: UncategorizedTagged with: , , , , ,