Tag: programming

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

  • Lobby
  • Tag Archives: programming

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

  • Lobby
  • Tag Archives: programming

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

  • Lobby
  • Tag Archives: programming

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

  • Lobby
  • Tag Archives: programming

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++ Concurrency TS 2 Use Cases and Future Direction – by Michael Wong, Maged Michael and Paul McKenney

  • Lobby
  • Tag Archives: programming

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: , , , , ,

Understanding Allocator Impact on Runtime Performance in C++ – Parsa Amini – CppCon 2022

  • Lobby
  • Tag Archives: programming

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

Understanding Allocator Impact on Runtime Performance in C++ - Parsa Amini - CppCon 2022
https://github.com/CppCon/CppCon2022

Typical users rely on existing tools to understand the performance of their code. However, no tool is perfectly suited for all applications, hardware, or analysis. Moreover, constructing a strong case that explains the impact of a design choice on runtime performance occasionally requires abstracting the results of a performance comparison into easy-to-interpret performance metrics while eliding or minimizing unrelated factors.

This talk recounts the challenges encountered while attempting to analyze and delineate the performance impact of employing local memory allocators. Challenges included 1) choosing the correct tool, 2) working around the resolution and precision constraints of the instrumentation and profiling tools, and 3) designing effective presentation and visualization material.
---

Parsa Amini

Parsa Amini is interested in high-performance computing applications and high-productivity parallel C++ codes. He has been involved in developing the HPX runtime system and HPX applications. Parsa received his Ph.D. degree in Computer Science from Louisiana State University and has been investigating the costs of using assumptions in C++ programs since.
__

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: , , , ,

Using Incredibuild to Accelerate Static Code Analysis and Builds – Jonathan “Beau” Peck CppCon 2022

  • Lobby
  • Tag Archives: programming

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

Going Beyond Build Distribution: Using Incredibuild to Accelerate Static Code Analysis and Builds - Jonathan "Beau" Peck - CppCon 2022
https://github.com/CppCon/CppCon2022

Even though C++ compilation times seem to be trending downward, the introduction of modules in C++20 means that long compile times might remain a stress factor for developers. This is before accounting for the time it takes to complete tasks like static code analysis which adds more time to the C++ CI pipeline.

This session will demonstrate how to better manage your CI pipeline to achieve faster and more frequent iterations, improve developer velocity and software quality while adding static code analysis to your dev cycle. We will see how to connect your CI pipeline to Github Actions to achieve automatic triggered CI processes and how to distribute those to on-prem machines or to the cloud with Incredibuild.
---

Jonathan "Beau" Peck

Beau's first computer command was LOAD "*",8,1 on a blue screen which at that time was something you wanted to see. But he really discovered technology while working as a flight control officer when he realized running aircraft operations was in many ways like running ones and zeros (if you're curious feel free to ask him). Thanks to Linux, his natural curiosity about breaking things apart to understand how they worked and then learning and discovering new ways to put things together led him into a career spanning 20++ (I see what you did there) years across systems administration, systems engineering, database and architecture.

His passion is helping customers align, create, architect and operate technical solutions that solve business and technical needs. Currently he is a solutions architect with Incredibuild focused on helping developers accelerate build and test times with distributed computing processing and process virtualization.
__

Avi Lachmish

Avi is an expert in Web and networking technologies, operating systems, and software development methodologies. Avi has extensive experience in C++, object-oriented analysis, design and distributed architectures.
---

Videos Streamed & Edited by Digital Medium: http://online.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: , , , , ,

Help! My Codebase has 5 JSON Libraries – How Generic Programming Rescued Me – Christopher McArthur

  • Lobby
  • Tag Archives: programming

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

Help! My Codebase has 5 JSON Libraries - How Generic Programming Rescued Me - Christopher McArthur - CppCon 2022
https://github.com/CppCon/CppCon2022

In 2019 working on a RESTful cloud oriented C++ application, everything was JSON. Inbound communication was handled with an ASIO based web server, RESTinio, and used RapidJSON to handle the API payload. Outbound was handled by CPPRESTSDK which had its own JSON implementation. To handle authorization, we picked the best C++ JSON Web Token (JWT) library but that was written on top of PicoJSON, a small minimalistic unmainted library. We then had 3 different JSON libraries to work with and mix together.

How do we make this work together? “Why don’t you template out the logic and metaprogram a traits implementation?” Geeze, Thanks Gareth! So that’s what I did.

Generic cppcon.digital-medium.co.uk/tag/programming/">programming is writing algorithms in such a way that the type can be specified later. Using templates the algorithm can operate on different types if they satisfy certain traits (or implement a certain concept). JSON Web Tokens should follow the same algorithm regardless of the JSON implementation - this seemed like a useful case for applying generic cppcon.digital-medium.co.uk/tag/programming/">programming.

Six months and a lot of learning later, I had opened a pull request against the JWT-CPP library.
Using templates, SFINAE, and static assertions I was able to abstract the “JSON” out of the JSON Web Token (JWT) logic. I am able to answer questions like: How can the compiler know…
What is the signature of a function? Does it match a known signature? Is it close enough?
If a type has a member function? What is the return type of the method? Can it differentiate between static and member functions?
Yes. The compiler is really that well informed and the tools and techniques exist to programmatically answer them at compile time.

Templating the JSON “value and types” played in favor with the existing design of a C++ single file header only library. Being an Open-source project it was important to maintain the existing compiler requirements, this bound the implementation to C++11 however there are C++17 features (i.e. `std::void_t`) and experimental features (i.e. `std::experimental::is_detected`) which are back-ported.

A JSON Traits needs to declare a generic value type, and concert basic types which match the JWT’s family of RFC defined claims (which are JSON keys) such as object, string, or double. All the types were substituted into templates to check for concepts, for instance, `object_type` needs to be iterable, so a `constexpr` value is set if begin and end methods are present. Some traits are optional and substitution failure is not an error.

With several of the most popular JSON libraries like Niel Lohamn’s and Boost’s supported, this approach can work for any project looking to decouple the application logic from a library specific container. There are some drawbacks, such as complexity and mind melting error messages. Recent compilers with support for Concepts makes future possibilities very exciting.
---

Christopher McArthur

Chris has been giving back to the open source community with exploit database containers, C++/ CMake build system maintenance, and other OSS projects for nearly ten years. He began his career as a C++ developer and has since then added other languages including Golang and Typescript to his skill set. Prior to joining the Conan team at JFrog, Chris previously worked in the video broadcast and mobile advertising industries on a variety of projects. His diverse experiences include Blockchain, low-level hardware networking, distributed systems security, and cloud-native DevOps. As a developer advocate for JFrog, Chris deals with Conan, Chris shares his deep to the knowledge of DevOps and Package Management to the C++ Community globally.
__

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: , , , , , , , , ,

Back to Basics: C++ Value Semantics – Klaus Iglberger – CppCon 2022

  • Lobby
  • Tag Archives: programming

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

Back to Basics: C++ Value Semantics - Klaus Iglberger - CppCon 2022
https://github.com/CppCon/CppCon2022

Modern C++ is more than new standards or an assortment of new features. Modern C++ is about a philosophy on how to use the language. An integral part of this philosophy is value semantics: preferring values and value-like types instead of pointers and references.

This talk explains the rational of this philosophy. It demonstrates the benefits of several value types from the standard library, such as std::optional, std::function and std::variant, and the drawbacks of several reference types, such as std::string_view and std::span. It also goes into detail about the most common questions about value semantics, as for instance how to properly use reference types and whether we should stop using reference parameters.
---

Klaus Iglberger

Klaus Iglberger is a freelance 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 expertise in popular advanced C++ courses around the world (mainly in Germany, but also in the rest of the EU and the US). Additionally, he is the initiator and lead designer of the Blaze C++ math library (https://bitbucket.org/blaze-lib/blaze/), one of the organizers of the Munich C++ user group (https://www.meetup.com/MUCplusplus/), and the organizer of the Back-to-Basics track at CppCon.
__

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: , , , , , ,