Author: digitalmedium1

From Problem to Coroutine: Reducing I/O Latency – Cheinan Marks – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Coroutines are now officially part of the C++20 standard and one of their advertised uses is reducing I/O latency. Almost all of the literature on coroutines that I found illustrated either synchronous generators or described the nitty gritty details of coroutines using very simple usages. The best talk I found was Gor Nishanov's excellent talk from CppCon 2018, "Nanocoroutines to the Rescue!" (go watch it!) which solves a different problem than mine, but mostly illustrates the power of coroutines.

In this talk I want to approach coroutines from another direction. I will start with the problem, which almost all engineers face in some form, that of reducing I/O latency while searching and gathering data from a sequential file. Instead of going into the details of how the coroutines work, I will start with the naive synchronous solution and build up coroutines step by step to try and reduce latency, illustrating the pieces as they are added.

Finally I will compare this solution to an old-fashioned solution using threads and we'll see how the coroutines performance measures up and whether all the additional boilerplate needed is worth the additional trouble. I hope discussing the value of coroutines and future proposals for RAII and executors will spark a good discussion with the audience.

---
Cheinan Marks

Cheinan Marks is a senior software developer, living in Berlin, where he starting a non-profit to research bioinformatics and bio-computation, specializing in genetics. He got his start in the TUTOR language on the PLATO system at the University of Illinois. Having gotten his doctorate in chemical engineering, he enjoys developing new ideas in software, particularly scientific ideas, and turning them into practical, real-world products. Past projects include Quantum Mechanics, Natural Language Programming, and Image Manipulation.

---
Videos Recorded & 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

cudaFlow: Modern C++ Programming Model for GPU Task Graph Parallelism – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

Presented by Tsung-Wei Huang & Dian-Lun Lin

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Graphics processing unit (GPU) has become central to today’s scientific computing applications, such as machine learning and simulation. As the application complexity continues to grow, the need to quickly execute thousands of dependent GPU tasks has become a major bottleneck in the development flow. To overcome this challenge, modern CUDA has introduced CUDA Graph for users to directly offload a GPU task graph on a GPU to minimize scheduling overheads. However, programming CUDA Graph is extremely tedious and involves many low-level details that are difficult to program correctly. Consequently, we introduce in this paper, cudaFlow, a modern C++ programming model to streamline the building of large GPU workloads using CUDA Graph. cudaFlow enables efficient implementations of GPU decomposition strategies supplied with incremental update methods to express complex GPU algorithms that are hard to execute efficiently by mainstream stream-based models. We have demonstrated the simplicity and efficiency of cudaFlow on large-scale GPU applications composed of thousands of tasks and dependencies.

The talk will cover five major components:
1. What is the new CUDA Graph programming model?
2. Why do we need a C++ programming model for GPU task graph parallelism?
3. Designs, implementations, and deployments of the proposed cudaFlow programming model.
4. Real use cases of cudaFlow and its performance advantages in large GPU workloads.
5. Remarks and roadmap suggestions for the GPU programming community.

By the end of the presentation, the audience will know how to leverage the new GPU task graph parallelism to boost the performance of large-scale GPU applications, such as machine learning and scientific simulations.

---
Tsung-Wei Huang
As a university faculty member, a central theme of my research is to make parallel computing easier to handle. I am passionate about using modern C++ technology to solve parallel and heterogeneous computing problems. One such effort is my Taskflow project (https://taskflow.github.io/), A General-purpose Parallel and Heterogeneous Task Programming System using Modern C++, which I developed to help developers quickly write parallel and heterogeneous programs with high performance and simultaneous high productivity.

Dian-Lun Lin
PhD student, University of Utah
---
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: Undefined Behavior – Ansel Sermersheim & Barbara Geller – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
In this talk we will build a refined and improved definition of undefined behavior, to motivate and encourage C++ developers to write correct code. We will explain the terminology associated with Undefined Behavior and explore why it exists in the C++ language. Looking at the standard is the only way to determine what constitutes undefined behavior.

During this talk we will present several new examples to illustrate how various types of undefined behavior can occur in a short span of code. We will also describe the various categories of behavior and the difference between run time errors and undefined behavior. Understanding these distinctions is critical to being an effective programmer.

This talk is part of the Back to Basics track and the material will be targeted to include all skill levels. Familiarity with C++ is recommended however no prior knowledge of compilers or undefined behavior is required.

---
Ansel Sermersheim

I have been working as a programmer for nearly twenty years. My degree is in Computer Science from Cal Poly San Luis Obispo. I have transitioned to independent consulting and I am currently working on a project for RealtyShares in San Francisco.

Co-founder of CopperSpice, a C++ GUI library.
Co-founder of DoxyPress, a C++ application for generating documentation.
Developer of the open source libraries: libGuarded, CsSignal and CsString.

I have programmed in C++, C, Lisp, Java, and Perl, with extensive knowledge in TCP/IP and mutilthreaded design. I am an avid follower of the C++ standard. Speaker at CppCon 2015, CppNow 2016, CppNow 2017, and several ACCU Bay Area meetings.

Barbara Geller

I am an independent consultant with over twenty-five years of experience as a programmer and software developer. I have worked with numerous smaller companies developing in-house applications. I have also designed and developed Windows applications for several vertical markets including medical billing, transportation, and construction.

My degree is in Electrical Engineering from Cal Poly Pomona with additional studies in Computer Science.

I am a Co-founder of CopperSpice, a C++ library derived from the existing Qt framework. I designed the Diamond Editor, a cross-platform programmers editor using the CopperSpice libraries. I have programmed in C++, Qt, Visual Objects, Clipper, PHP, and Java.

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

Typescripten: Generating Type-safe JavaScript Bindings for emscripten – Sebastian Theophil

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
WebAssembly has become a very popular target platform for C++ developers. Thanks to emscripten, porting native applications to WebAssembly is easy — as long as the application only uses the browser as a display and input device. However, emscripten does not provide type-safe wrappers to the standard JavaScript APIs such as the DOM manipulation API, let alone any other JavaScript API provided by existing web applications.

Our open source tool “typescripten” has been built on top of three powerful technologies to close this gap. It uses TypeScript interface definition files and the TypeScript compiler API to create type-safe C++ wrappers based on emscripten. TypeScript already has interface definition files for over 7000 JavaScript libraries that you can now use safely from C++.

We strive to design our C++ wrappers such that the C++ code using them looks similar to the equivalent TypeScript or JavaScript code. However, the peculiar semantics of prototype-based Javascript and Typescript are often difficult to translate into a type-based language such as C++. I will discuss the challenges we faced and choices we made when designing this framework.

---
Sebastian Theophil

Sebastian studied Computer Science in Berlin and Toulouse, France, and holds a Ph.D. in Computer Science from the Humboldt University of Berlin. He has been working at think-cell Software since its founding in 2002. Over the years, Sebastian has worked on a lot of things at think-cell. In recent years, he was the Lead Developer porting think-cell to the Mac.

He was invited as speaker at RWTH Aachen, ETH Zürich, Freie Universität Berlin, Humboldt Universität zu Berlin, and he is also speaking in various international C++ conferences and gatherings.

---
Videos Recorded & 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

SIMD in C++20: EVE of a new Era – Joel Falcou & Denis Yaroshevskiy – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
EVE is a new library that exposes SIMD in a uniform way across both ARM (neon) and x86 (from sse2 to avx-512).

It's main advantages over similar libraries include:
* STL like algorithm support, including zip to operate on multiple ranges .
* ARM support (many libraries only support x86)
* A very comprehensive math library.

It is liberally licensed and intended to be production quality. But let's just be direct: vectorized find for x86 and arm on godbolt: https://godbolt.org/z/n6Pds78s6

This talk will include a collection of demos for different library features and benchmarks, how C++20 helped us construct a proper design as well as practical advice on using EVE in your projects.

---
Joel Falcou
Joel is an associate professor at the University Paris-Saclay and Researcher at the Laboratoire de Recherche d’Informatique in Orsay, France. His research focuses on studying generative programming idioms and techniques to design tools for parallel software development.

The main parts of his work are:
• the exploration of Embedded Domain Specific Language design for parallel computing on various architectures;
• the definition of a formal framework for reasoning about meta-programs.

Joel is the co-host of the C++FRUG Meetup, president of the C++FRUG Association, co-organizes the CPPP Conference, and is part entrepreneur, being one of the co-founder of CODE RECKONS, a company focused on bringing people and company up to date to the best and newest C++.

Denis Yaroshevskiy
Denis is a semi-active member of the C++ community. He is mostly interested in algorithms and has done a few things in that area such as: research and implementation of Chromium’s flat_set, a couple of tiny contributions to libc++ algorithm library, a few algorithm related talks and one sole paper to the C++ standard that didn’t get consensus. For the last couple of years in his free time Denis is implementing STL algorithms portably using SIMD.
Denis currently works at Bloomberg.

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

The Foundation of C++ Atomics: The Knowledge You Need to Correctly Use C++ Atomics – Filipe Mulonde

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
This talk covers all the knowledge you need about atomics to give you a good understanding of how they work under the hood and make sure your code is correct.

C++11 introduced std::atomic template class which supports six memory orderings, writing correct concurrent programs which use the atomic classes can be challenging. It requires understanding the complexity of how std::atomic works under the hood. The goal of this talk is to encourage programmers to use the atomic classes when appropriate and give them the knowledge to do so correctly.

This talk will help you confidently use atomics correctly by bringing knowledge of some of the main components that make parallelism possible in modern computer systems, the relationship between these components, and the individual contribution of each of these components in making atomic difficult to use correctly.

This talk will be aimed at programmers who are new to std::atomic as well as those who have been using these classes. I will show some aspects of atomics which may not be commonly known.

Topics Covered in the first session :
• A brief overview of atomics in C++.
• Multi-core processors.
• Operating system context switching.
• Memory Consistency and Cache Coherence.
• Memory Barriers.
• The C++ memory model (part 1).
• Static & Dynamic Instruction Scheduling.

Topics Covered in the second and third session:
• The C++ memory model (part 2).
• Optimizations Allowed by the memory model.
• The Cost of Sequentially Consistent Atomics.
• Semantics of Data Races.
• Compiler and Hardware introduced Data Races.
• The compiler and hardware cooperation to respect the memory model.
• The relationships and tradeoffs among atomics and fences/barriers.
• How atomic map to their expected machine-instruction implementations on x86 architecture . My wish is to be able to do the 1st session this year and do the 2nd and 3rd session next year.

---
Filipe Mulonde

Software Engineer passionate about programming,holds a bachelor's degree in software engineering from Peter the Great St. Petersburg Polytechnic University and is now a final year Master's student in Artificial Intelligence at this same university. worked as a software engineer intern at JSC NIIAS-Research and Design Institute of Informatization, Automation , and Communication in Railway Transport of the Russian Federation. Doing code review and increase the performance of an autonomous car using parallelism with C++. I am co-founder of APA(Association of Angolan Programmers) a non-profit organization, helping to build a technological bridge between Africa (Angola) and the rest of the world. https://twitter.com/angolan_of/status/1326848737558335488 . I have interests in x86 assembly, Parallel programming, C++,Digital Design, Microarchitecture and Computer Architecture, Computer Organization, OS, memory models, Digital computer Electronics and design of computing devices, compilers, Machine learning, robotics etc. Former mobile and web developer.

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

3D Graphics for Dummies – Chris Ryan – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Three-dimensional graphics are much simpler than you would think. I will present the rudimentary techniques for the designs of a simple C++ Matrix library and operator methodologies, through an introduction to 3D Graphics: Points, Vectors, Coordinate Spaces, Matrix Math, Depth Buffer and Rasterization.

We will explore the blood and guts of a C++ Matrix library and 3D graphics. Rather than using off-the-shelf libraries like Unity and OpenGL, we will examine a simple library I wrote to teach myself about the subject. Includes demo of the graphics library/app.

---
Chris Ryan

Chris Ryan was classically trained in both software and hardware engineering. He is well experienced in Modern C++ & Classic ‘C’, on extremely large/complex problem spaces and on Embedded/Firmware devices (large & small). Chris has no interest in C#/.,Net, Java, js or any web-ish tech.

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

Value in a Procedural World – Lisa Lippincott – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
This talk is the Software Design Track Keynote.

What is a value? The most common conception is that values are inhabitants of a platonic mathematical world, too far away to be examined or subjected to experiment. As a basis for understanding computer programs, this conception is awkwardly non-local and disturbingly mystical.

In this lecture, I will present a functionalist conception of value, situated locally within the realm of procedural programming. I will show how values in this conception relate directly to program execution, and examine how events within program execution are related through the stability, substitutability, and repeatability of values.

---
Lisa Lippincott

Lisa Lippincott designed the software architectures of Tanium and BigFix, two systems for managing large fleets of computers. She's also a language nerd, and has contributed to arcane parts of the C++ standard. In her spare time, she studies mathematical logic, and wants to make computer-checked proofs of correctness a routine part of programming.

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

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

Filed under: Science & Technology

Using C Libraries in your Modern C++ Embedded Project – Michael Caisse – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
Projects have goals, timelines, and deliverables which should shape our solution space and approach. A recent project incorporating EtherCAT had other technical challenges and a fixed timeline which resulted in a basic integration approach.

After the project was complete I continued developing Ciere's capabilities to handle EtherCAT based communication. In all, three different levels of integration were developed.

This talk will briefly introduce the real-time suitable communication technology called EtherCAT and then review the progression of integration approaches. We will explore the techniques and language features employed and extract some rules of thumb about layered architectures. We will look at the technical, timeline, and risk trade-offs for each approach as we make observations about the value provided.

While this talk focuses on integrating C-libraries and facilities within a Modern C++ embedded target, the lessons learned and insights are applicable to Modern C++ projects of all sized targets. Attendees will walk away with a set of patterns for dealing with C library integration, some guidelines about value trade-offs, and one person's experience with implementations.

---
Michael Caisse

Michael Caisse started using C++ with embedded systems over 30 years ago. He continues to be passionate about combining his degree in Electrical Engineering with elegant software solutions and is always excited to share his discoveries with others.

Michael works for Ciere Consulting where he provides software consulting and contracting, C++ training and mentoring, and electronic design.

When he isn't fighting with compilers or robots, he enjoys fencing with a sabre.

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

In-memory and Persistent Representations of C++ – Gabriel Dos Reis – CppCon 2021

  • Lobby
  • Author Archives: digitalmedium1

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
C++ Modules are a tooling opportunity. For example, a common implementation strategy for compilers is to save on disk the abstract semantics graph (ASG) obtained from elaborating a module interface (exported), to be reused later when that module is consumed (imported). That ASG, an intermediate representation, saves the compiler from repeated work in common scenarios, therefore helps achieve substantial reduction in compilation time. In essence, ISO C++ compilers are practically compelled to acknowledge representations of C++ program fragments other than character streams stored in source files. It is all too tempting to view these ASGs as mere build artifact curiosities. If N compilers, on a given platform, decide to use N different on-disk ASG representation formats then we face a severe problem of developer tools fragmentation. I present, in this talk, how the C++ community can avoid that problem: the desiggn and implementation of formal, compiler-neutral in-memory and persistent representations of C++ programs. These alternative representations allow tools to process C++ programs without needing to master or to replicate the dark art of C++ compiler construction. These representations are available either as open specification, or as C++ libraries. The application opportunities range from automated generation of bindings ("foreign function/data interface") to Just-In-Time compilation of interpreted C++ scripts, and beyond.

---
Gabriel Dos Reis

Gabriel Dos Reis is a Principal Software Engineer at Microsoft, where he works in the area of large scale software construction, tools, and techniques. He is also a researcher, and a longtime member of the C++ community, author and co-author of numerous extensions to support large scale programming, compile-time and generic programming. His research interests include programming tools for dependable software. Prior to joining Microsoft, he was Assistant Professor at Texas A&M University. Dr. Dos Reis was a recipient of the 2012 National Science Foundation CAREER award for his research in compilers for dependable computational mathematics and educational activities.

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