Embedded C++14 in a ”Super-loop” Firmware--Erik Rainey
A local talk
Embedded C++14 in a ”Super-loop” Firmware
by Erik Rainey
From the talk:
June 16-21, Sofia, Bulgaria
September 13-19, Aurora, CO, USA
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Adrien Hamelin | Aug 8, 2022 11:48 AM | Tags: None
A local talk
Embedded C++14 in a ”Super-loop” Firmware
by Erik Rainey
From the talk:
By Hartmut Kaiser | Aug 6, 2022 05:35 PM | Tags: None
The STE||AR Group has released V1.8.1 of HPX -- A C++ Standard library for Concurrency and Parallelism.
HPX V1.8.1 Released
We have released HPX 1.8.1 that adds a number of small new features and fixes a handful of problems discovered since the last 1.8.0 release, in particular: a lot of work has been done to improve vectorization support for our parallel algorithms. HPX now supports using EVE – the Expressive Vector Engine as a vectorization backend. More work was done towards full compatibility with the sender/receiver proposal P2300. We have fixed all collective operations to properly avoid overlapping consecutive operations on the same communicator. We also fixed a dangling reference problem while serializing non-default constructible types. We have added support for static linking on Windows (using MSVC) and have added support for M1/MacOS based architectures. A full list of changes can be found in the release notes.
If you have any questions, comments, or exploits to report you can reach us on IRC or Matrix (#ste||ar on libera.chat) or email us at hpx-users. We depend on your input!
You can download the release from our releases page or check out the 1.8.1 tag using git. A full list of changes can be found in the release notes.
HPX is a general-purpose parallel C++ runtime system for applications of any scale. It implements all of the related facilities as defined by the C++20 Standard. As of this writing, HPX provides the only widely available open-source implementation of the new C++17 and C++20 parallel algorithms, including a full set of parallel range-based algorithms. Additionally, HPX implements functionalities proposed as part of the ongoing C++ standardization process, such as large parts of the features related parallelism and concurrency as specified by the upcoming C++23 Standard, the C++ Concurrency TS, Parallelism TS V2, data-parallel algorithms, executors, and many more. It also extends the existing C++ Standard APIs to the distributed case (e.g., compute clusters) and for heterogeneous systems (e.g., GPUs).
HPX seamlessly enables a new Asynchronous C++ Standard Programming Model that tends to improve the parallel efficiency of our applications and helps reducing complexities usually associated with parallelism and concurrency.
By Adrien Hamelin | Jul 29, 2022 09:15 AM | Tags: None
Registration is now open for CppCon 2022, which starts on September 11 and will again 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 last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!
Exceptional C++
by Victor Ciura
Summary of the video:
When writing code we usually focus our attention on the happy paths - that’s where the interesting stuff happens. But there are also plenty of exciting things happening on the error handling flow, too. Although not universally loved/used, exceptions are a powerful mechanism of maneuvering execution on the unhappy path.
Even if std::exception and related machinery are not your cup of tea, you might care about hardware faults or OS signals like access violations, page errors, ALU overflows.
Let’s take a deep dive and explore what happens when an exception occurs, both at the application level and the OS level. We’ll explore the unwind process, the compiler generated code, the CRT hooks available and other exception internals. As we’re taking the scenic Windows route, we’re also going to encounter async exceptions (structured exceptions) on our quest for a better crash. We’ll poke into these mechanisms and see how we can leverage them in our application error handling. Did I mention threads? Routing exceptions between threads… oh my!
By Adrien Hamelin | Jul 29, 2022 09:14 AM | Tags: None
Time to update.
CLion 2022.2 Released
by Anastasia Kazakova
From the article:
Today we’re announcing the CLion 2022.2 release! To update to the new version, you can use the Toolbox App or a snap package (on Ubuntu), download the installer from our website, or apply the patch update to upgrade from version 2022.1.
The CLion 2022.2 release improves CMake integration. The Quick Documentation popup has become a useful source of knowledge about your C++ and CMake code. Enhanced static and dynamic code analysis, better debugger integration, and performance improvements for remote and Docker toolchains help you develop more productively. Read on for more details and give CLion 2022.2 a try...
By Adrien Hamelin | Jul 29, 2022 09:12 AM | Tags: community
Lots of things.
C++ Annotated May 2022: C++23 News, Optimizing C++ Apps, Pointers and Memset Tricks, and Tooling News
by Anastasia Kazakova
From the article:
We are back today with all of the May news for you in our latest monthly C++ Annotated digest!
By Blog Staff | Jul 28, 2022 05:09 PM | Tags: None
Flying Amazon drones on C++:
Erik Rainey live in person at CppCon 2022
From the announcement:
Using C++14 in an Embedded “SuperLoop” Firmware
This presentation covers what the execution environment of an embedded “superloop” firmware is in order to describe later why certain C++14 language and library features are used and others are not. This environment lacks many basic features and capabilities that traditional C++ programmers may think are common place but is able to be programmed in C++14 (and later) with a specific design paradigms and guidelines. Programmers with deeply embedded C experience will be familiar with some of the limitations of the environment but may find the C++ solutions quite refreshing! The talk will conclude with some comments on C++17 / C++20 features which will be quite valuable to embedded environments of all types.
CppCon 2022 registration is now open so don’t miss out this September 11-16. Register today! Tickets are now available for both online attendees and in-person attendees.
By Adrien Hamelin | Jul 25, 2022 01:44 PM | Tags: None
Registration is now open for CppCon 2022, which starts on September 11 and will again 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 last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!
Design and Implementation of Highly Scalable Quantifiable Data Structures in C++
by Victor Cook
Summary of the video:
Architectural imperatives due to the slowing of Moore's Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Quantifiability is proposed as a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods.
In this talk, we present the design and implementation of a lock-free quantifiable stack (QStack) and a lock-free quantifiable queue (QQueue) in the C++ programming language. Our design achieves lock-freedom using compare_exchange_strong from the C++17 Atomic Operations Library. We depict several code snippets that illustrate how quantifiable data structures are highly scalable through use of relaxed semantics, an explicit implementation trade-off permitted by quantifiability. We explain how to reason about the correctness of quantifiable data structures and present a technique and a dynamic analysis tool developed in C++ for efficiently verifying a concurrent history as quantifiably correct, referred to as Vector Space Verification (VSV). We illustrate why it is impractical to use alternative verification techniques that compare concurrent histories to sequential histories for determining correctness for real programs.
We showcase the performance of quantifiable data structures by presenting a live demonstration that runs the QStack and QQueue and plots the results in real time. The QStack is compared with the lock-free Elimination Backoff Stack and the lock-free Treiber stack. The QQueue is compared with the lock-free LCRQ, and the wait-free Fetch-And-Add queue. The live performance demonstration illustrates how the QStack and QQueue achieve substantially higher scalability than the state-of-the-art linearizable counterparts. We also present a live demonstration of our VSV tool to dynamically check a concurrent history for the QStack and QQueue as quantifiably correct in less than O(n^2) time.
By Adrien Hamelin | Jul 25, 2022 01:42 PM | Tags: None
Overview.
Searching and min-max: The 114 C++ algorithms series
by Šimon Tóth
From the article:
Welcome to the eighth instalment of the 114 C++ algorithms series. Today, we will discuss search algorithms that look up a specific element or count the number of matching elements and min-max algorithms...
By Adrien Hamelin | Jul 25, 2022 01:29 PM | Tags: c++23
Useful new feature!
C++23’s Deducing this: what it is, why it is, how to use it
by Sy Brand
From the article:
Deducing this (P0847) is a C++23 feature which gives a new way of specifying non-static member functions. Usually when we call an object’s member function, the object is implicitly passed to the member function, despite not being present in the parameter list. P0847 allows us to make this parameter explicit, giving it a name and const/reference qualifiers...
By Adrien Hamelin | Jul 22, 2022 01:31 PM | Tags: performance
Registration is now open for CppCon 2022, which starts on September 11 and will again 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 last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!
Data Orientation For The Win!
by Eduardo Madrid
Summary of the video:
C++ conferences have had presentations showing the important performance benefits of data-oriented design principles; however, the principles seem to require lots of "manual" effort and "code uglification"; these make the principles less practical, and there haven't been clear recommendations about how to deal with runtime-polymorphic types.
In this talk we will recapitulate on data orientation principles and their benefits showing their application through production-strength Generic Programming components made to support them.
Specific examples include:
1. Structures of arrays instead of arrays of complex structures (a.k.a. "scattering")
2. Support for data oriented designs for runtime-polymorphism without inheritance+virtual (the equivalent of using std::variant or std::function, but generalized as allowed by the Zoo type-erasure framework)
----1. Hybrid buffers: the equivalent of the virtual table pointer is scattered out of the objects solving the "Goldilocks problem" of how big the local buffer should be, objects occupy the available space optimally
----2. Easy (de)serialization through very easy relocatability
----3. Voiding the need for pointers in favor of indices into arrays