Loading…
C++Now 2016 has ended
Please visit the C++Now website.

Log in to bookmark your favorites and sync them to your phone or calendar.

presentation [clear filter]
Tuesday, May 10
 

11:00am

Flowz: towards an EDSL for digital signal processing
Digital signal processing is ubiquitous in modern digital technology. Ranging from classical signal transmission, neural networks, image and audio processing, to time series analysis. Flowz is a library that strives for writing digital signal processors in a declarative and composable manner that generate efficient code and integrates well with existing C++ code and frameworks. Flowz is inspired by the Faust language and algebra of flownomials and implements a similar concept within C++. This embedded domain specific language allows to describe network layouts and processing of data flowing through these networks. While the user can focus on the 'what should be processed', flowz will take care of connecting the *wires* between processing boxes and creating the state that is described implicitly by the flowz-expressions and which is needed by the signal processing algorithm.

Speakers
avatar for André Bergner

André Bergner

Principal Software Engineer, Native Instruments
André likes challenges – that's why he enjoys writing C++ and tries to do things with it that it wasn't supposed to do. He works as an principal software engineer at Native Instruments in Berlin. He holds a PhD in theoretical physics and besides C++ is toying a lot with deep learning... Read More →


Tuesday May 10, 2016 11:00am - 12:30pm
Bethe

11:00am

Typegrind - Type preserving heap profiler for C++
Memory profilers are essential tools to understand the dynamic behavior of complex modern programs. They help to reveal memory handling details: the wheres, the whens and the whats of memory allocations. Most heap profilers provide sufficient information about which part of the source code is responsible for the memory allocations by showing us the relevant call stacks. The sequence of allocations inform us about their order. Heap profilers for languages with strong reflection capabilities can also show type information on the allocated objects. However, in C++ we have no reflection, allocators used for standard containers erase type information, and complex syntax of special new and delete operators make preprocessor hacks impossible. In this lecture we will report on a type preserving heap profiler for C++ based on the LLVM/Clang tooling library. On top of the usual heap profiler features our allocation entries, including those of template constructs, contain exact type information about the allocated objects. We can extract information on individual memory operations as well as supply aggregated overview. E.g. user can tell how much memory was used of std::vector objects in every point of the run, when, where and how they were allocated and freed. Having such a type information in hand programmers can identify critical classes responsible for memory usage more easily and can perform optimizations based on evidence rather than speculations. The tool is publicly available at: https://github.com/typegrind

Speakers
avatar for Zsolt Parragi

Zsolt Parragi

I am a PhD student at Eötvös University Budapest working on C++ related static analysis tasks. I am also a developer of NNG Ltd, a leading company in car navigation solutions.
avatar for Zoltán Porkoláb

Zoltán Porkoláb

Ericsson & Eötvös Loránd University
Dr. Zoltán Porkoláb is an Associate Professor of Faculty of informatics at Eötvös Loránd University (ELTE), Budapest, Hungary. At the same time, he holds Principal C++ Developer position at Ericsson Hungary Ltd.


Tuesday May 10, 2016 11:00am - 12:30pm
Booz Allen Hamilton

2:00pm

CopperSpice: The Next Generation of Signals
CopperSpice is a collection of cross platform GUI libraries inspired by an existing open source library. Our libraries use modern C++ technology to implement run time reflection without requiring a code generator. We will explain our registration mechanism which is implemented using template trickery. How Signals and Slots work in CopperSpice will be briefly examined and then we will introduce our new stand alone Signal/Slot library which has been implemented using only C++11 and the standard library. A comparison of CsSignal with other Signal libraries will be explored. How the CsSignal library supports cross thread signal delivery will be covered in detail. Examples of the new CsSignal will be demonstrated. No prior knowledge of CopperSpice is required. A working knowledge of templates in C++ would be helpful.

Speakers
avatar for Barbara Geller

Barbara Geller

Co-Founder, CopperSpice
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... Read More →
avatar for Ansel Sermersheim

Ansel Sermersheim

Co-Founder, CopperSpice
I have been working as a programmer for over fifteen years. My degree is in Computer Science from Cal Poly San Luis Obispo. Currently I work as a software engineer designing scalable, high performance, multi-threaded network daemons in C++. The daemons I have developed are used... Read More →


Tuesday May 10, 2016 2:00pm - 3:30pm
Booz Allen Hamilton

2:00pm

Proper Inheritance (part 1 of 2)
All essential behavior of our software must be documented, and yet there are important advantages, with respect to development, verification and testing, performance, and stability, for leaving the behavior for some combinations of inputs and initial conditions undefined. What is and is not defined behavior should therefore be readily discernible from the contract, especially when creating contracts that must span classes related by inheritance. In Part I of this talk, we review components, interfaces and contracts in general, and the significance of *narrow* versus *wide* contracts in particular. In Part II, we explore _three_ kinds of inheritance: (1) *Interface* *Inheritance* resulting from pure-virtual functions, (2) *Structural* *Inheritance* resulting from non-virtual functions, and (3) *Implementation* *Inheritance* resulting from non-pure virtual functions. Proper contracts involving each of these distinct forms have different criteria that must be addressed. The three kinds of inheritance are compared, and their relative utility is explained. What's more, several common uses of inheritance that are provably improper are summarily debunked.

Speakers
avatar for John Lakos

John Lakos

Software Engineer, Bloomberg
John Lakos, author of Large-Scale C++ Software Design, serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide.  He is also an active voting member of the C++ Standards Committee’s Evolution Working Group. Previously, Dr... Read More →


Tuesday May 10, 2016 2:00pm - 3:30pm
Bethe

4:00pm

Metaprogramming for dummies
In most languages, metaprogramming is a powerful tool that allows writing more expressive and more maintainable code. It is usually relatively straightforward, and even average Joe programmers can use it to increase their productivity. In C++, metaprogramming is an obscure art that very few understand and that is never taught as part of the normal curriculum. Even worse is the fact that almost every presentation about metaprogramming is overly complicated, using tricky corners of the language and an unintuitive approach to achieve even simple goals. This presentation will try to break the mold and present metaprogramming in a way that's easy to grasp. Using the Boost.Hana library, we will show how metaprogramming can be done with a reasonably high level of expressiveness, leaving dirty template tricks far behind. We will see how metaprogramming can be used as a tool for making day-to-day programming easier and more enjoyable, even for beginners.

Speakers
avatar for Louis Dionne

Louis Dionne

C++ Standard Library Engineer, Apple
Louis is a math and computer science enthusiast who got swallowed by the C++ monster when he was a naive, unsuspecting student. He now works for Apple, where he is responsible for libc++, the Standard Library shipped with LLVM/Clang. He is a member of the C++ Standards Committee and... Read More →


Tuesday May 10, 2016 4:00pm - 5:30pm
Booz Allen Hamilton

4:00pm

Monoids, Monads, and Applicative Functors: Repeated Software Patterns
Forget factories, singletons, and proxies; What are the real patterns in software development? This talk explores abstract mathematical structures that commonly recur in software development. Once a mind is trained to recognize these patterns, it becomes easy to identify the fundamental operations for domain specific classes and how to put the pieces together. This discussion is for those who enjoy math, abstract concepts, and expanding their minds.

Speakers
avatar for David Sankel

David Sankel

Bloomberg
David Sankel is a Software Engineering Manager/TL at Bloomberg and an active member of the C++ Standardization Committee. His experience spans microservice architectures, CAD/CAM, computer graphics, visual programming languages, web applications, computer vision, and cryptography... Read More →


Tuesday May 10, 2016 4:00pm - 5:30pm
Flug Auditorium

4:00pm

Proper Inheritance (part 2 of 2)
All essential behavior of our software must be documented, and yet there are important advantages, with respect to development, verification and testing, performance, and stability, for leaving the behavior for some combinations of inputs and initial conditions undefined. What is and is not defined behavior should therefore be readily discernible from the contract, especially when creating contracts that must span classes related by inheritance. In Part I of this talk, we review components, interfaces and contracts in general, and the significance of *narrow* versus *wide* contracts in particular. In Part II, we explore _three_ kinds of inheritance: (1) *Interface* *Inheritance* resulting from pure-virtual functions, (2) *Structural* *Inheritance* resulting from non-virtual functions, and (3) *Implementation* *Inheritance* resulting from non-pure virtual functions. Proper contracts involving each of these distinct forms have different criteria that must be addressed. The three kinds of inheritance are compared, and their relative utility is explained. What's more, several common uses of inheritance that are provably improper are summarily debunked.

Speakers
avatar for John Lakos

John Lakos

Software Engineer, Bloomberg
John Lakos, author of Large-Scale C++ Software Design, serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide.  He is also an active voting member of the C++ Standards Committee’s Evolution Working Group. Previously, Dr... Read More →


Tuesday May 10, 2016 4:00pm - 5:30pm
Bethe
 
Wednesday, May 11
 

9:00am

Diet for your Templates - Reducing Code Bloat in Your Templated Library
We developed a heavily templated-driven library, IoC++, in-house at our company. Using it, we discovered that it generated huge object files and libraries, leading to very long link times, large executables, and even linker crashes. In this session I present techniques we used to reduce the bloat in the library and got our link times down to acceptable values.

Speakers
avatar for Sebastian Redl

Sebastian Redl

Senior Programmer, Teoco
Sebastian holds a BSc in Software Engineering from the Technical University of Vienna and is currently finishing an MSc. He is working at a small software company called Symena (part of Teoco), and recently spent a year's sabbatical working at Google. He has contributed heavily to... Read More →


Wednesday May 11, 2016 9:00am - 10:30am
Booz Allen Hamilton

9:00am

Variants: past, present, and future
What are variants, why are they important, and how I use them? Once available to a developer, variants become one of the most commonly used tools in everyday programming. This talk will explore the venerable Boost.Variant library, discuss the improvements made by the current 'std::variant' proposal (expected in C++17), and close with a discussion of the exciting new language-based variant and pattern matching papers (proposed for C++20). This talk aims to be of practical utility in variant library usage and informative as to where things are heading.

Speakers
avatar for David Sankel

David Sankel

Bloomberg
David Sankel is a Software Engineering Manager/TL at Bloomberg and an active member of the C++ Standardization Committee. His experience spans microservice architectures, CAD/CAM, computer graphics, visual programming languages, web applications, computer vision, and cryptography... Read More →


Wednesday May 11, 2016 9:00am - 10:30am
Flug Auditorium

11:00am

array_ref: Multidimensional Array References for the C++ Standard Library

Multidimensional arrays are a foundational data structure for science and engineering codes - a data structure which unfortunately lacks proper representation in the C++ standard library.

In this talk, we will introduce and discuss array_ref, a performance-oriented multidimensional array reference which has been proposed for inclusion in a future C++ standard or a in the C++ Library TS. An array_ref is a reference to a memory extent through a layout mapping from a multi-index space (domain) to that extent (range). array_ref is a powerful and generic abstraction which supports user-defined layouts and access semantics. This flexibility makes array_ref ideal for:

  1. interoperating with existing applications and other programming languages (such as Fortran and Matlab) and
  2. addressing "special" memory regions (e.g. GPU memory and high-throughput scratchpad memory such as HBM and HMC).
array_ref has a powerful subarray interface designed to facilitate performant iteration of multi-dimensional arrays - an area where previous C++ array libraries have struggled.

This presentation will present the proposed array_ref library that is being advanced through the C++ standards committee, and discuss the challenges we've faced in our quest for an elegant and expressive interface that does not sacrifice performance or break the zero-overhead principle. We'll demonstrate how array_ref can be used to work with multi-dimensional data structures and to manage "special" memory exposed by new architectures.

Those interested in using array_ref can get started today with a stand-alone C++-14 implementation of array_ref developed by Bryce, which is available under the Boost Software License.

Speakers
avatar for H. Carter Edwards

H. Carter Edwards

Sandia National Laboratories
H. Carter Edwards (SNL) is current the PI and architect for the Kokkos project (github.com/kokkos/kokkos). Carter has a BS and MS in Aerospace Engineering and PhD in Computational Mathematics. He has over three decades of experience in modeling & simulation software development... Read More →
avatar for Bryce Adelstein Lelbach

Bryce Adelstein Lelbach

NVIDIA
Bryce Adelstein Lelbach is a software engineer on the CUDA driver team at NVIDIA. Bryce is passionate about parallel programming. He maintains Thrust, the CUDA C++ core library. He is also one of the initial developers of the HPX C++ runtime system. He spent five years working on... Read More →


Wednesday May 11, 2016 11:00am - 12:30pm
Flug Auditorium

11:00am

Documenting C++ Using the Right Tools
We will present a short overview of the DoxyPress project covering good documentation practices. The existing approach for parsing C++ was to use lex and hand write all of the syntax rules. This approach does not scale and is difficult to maintain as C++ evolves and becomes even more complex to parse. Thankfully libClang provides a front end solution. We will present our work regarding the integration of libClang into DoxyPress. We will show how to use the libClang AST to parse the source, retrieve the comments, and generate high quality documentation. We will demonstrate our progress by showing how DoxyPress can be used to document a modern C++ application.

Speakers
avatar for Barbara Geller

Barbara Geller

Co-Founder, CopperSpice
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... Read More →
avatar for Ansel Sermersheim

Ansel Sermersheim

Co-Founder, CopperSpice
I have been working as a programmer for over fifteen years. My degree is in Computer Science from Cal Poly San Luis Obispo. Currently I work as a software engineer designing scalable, high performance, multi-threaded network daemons in C++. The daemons I have developed are used... Read More →


Wednesday May 11, 2016 11:00am - 12:30pm
Booz Allen Hamilton

2:30pm

Metaprogramming for the brave
In this session crafted exclusively for the core audience of C++Now library writers, we will explore creative techniques using modern C++ to implement metaprogramming idioms. We will see how we can work with the compiler, not against it, to produce code that compiles faster and is more easily optimized. We will see some of the trickiest uses of generalized constant expressions to optimize algorithms on heterogeneous sequences. If you feel ready to push the compiler beyond its limits and be blown away by some hardcore C++ dark magic, this is your session.

Speakers
avatar for Louis Dionne

Louis Dionne

C++ Standard Library Engineer, Apple
Louis is a math and computer science enthusiast who got swallowed by the C++ monster when he was a naive, unsuspecting student. He now works for Apple, where he is responsible for libc++, the Standard Library shipped with LLVM/Clang. He is a member of the C++ Standards Committee and... Read More →


Wednesday May 11, 2016 2:30pm - 4:00pm
Flug Auditorium

2:30pm

Pulling Visitors
In this talk we illustrate how to use the Boost.Coroutine library to invert visitor-based control flows. We show this technique by combining Boost.Coroutine with Boost.Graph to step through and resume visitor-based algorithms. In doing so we highlight a different interface to the visitor-based approach that is more readable, more maintainable and highly performant. The audience need not already be familiar with Boost.Coroutine or Boost.Graph.

Supplementary material is available at: https://github.com/daniel-j-h/cppnow2016

Speakers
NG

Nat Goodspeed

Linden Lab
Nat Goodspeed first read about C++ shortly after implementing a medium-sized language interpreter in classic C. Almost every C++ feature led to forehead smacking accompanied by muttered remarks about how the language could have solved THIS problem... He has been fascinated (sometimes... Read More →
avatar for Daniel J H

Daniel J H

Mapbox
Daniel is a Software Engineer at Mapbox working on the Directions team, where he builds and improves high quality graph partitioners and routing engines in modern and idiomatic C++.


Wednesday May 11, 2016 2:30pm - 4:00pm
Bethe

2:30pm

Thread-safe Observer Pattern - You're doing it wrong
We've all written an Observer Pattern or list of Listeners at some point or another. And then later had to make it "thread safe". So we put a lock around the list of listeners...

So which evil did you choose:

1. potential deadlocks
2. potential post-death calls

Or did you not realize those were your typical choices?

In this talk we will look at what the problems are, and use them to highlight some of the fundamental problems of threading, and the things you can't take for granted with threads. And, of course, show some solutions to the problems.

Speakers
avatar for Tony Van Eerd

Tony Van Eerd

Ninja/Jedi/Tony, Christie Digital
Tony has been coding for well over 25 years, and maybe coding well for some of that. Lots of pixel++, UX, threading, etc. Previously at Inscriber, Adobe, BlackBerry, he now enables Painting with Light at Christie. He is on the C++ Committee. He is a Ninja and a Jedi.Follow @tvaneerd... Read More →


Wednesday May 11, 2016 2:30pm - 4:00pm
Booz Allen Hamilton

4:30pm

Friendship in Service of Testing
Unit testing of object-oriented code requires two fundamental artifacts: replacing some of the original code with some kind of test doubles (aka dependency injection), and providing extra access to these private dependencies. In most cases we cannot apply link-time or preprocessor based dependency injection, therefore a typical testable unit uses additional interfaces or template type parameters for pure testing purposes. Thus a unit which we developed without testing in mind might have to be changed intrusively for testing. These changes can take us far away from the original natural design of the unit. As a result, in C++, test code is often badly interwoven with the unit we want to test. We've seen such interleaving in the software world before: exceptions and aspect oriented programming were both invented to try to eliminate this kind of interleaving of independent aspects. In this talk I'd like to demonstrate the above problems using code examples to show the decay of original intentions. I briefly discuss current possible directions to solve the dependency injection problem: e.g. using compile-time seams. Then, I will overview the current (partial) solutions for adding extra access for private data, like using friends, the Attorney-Client idiom, or exploiting privates using explicit template instantiations. Regarding to extra access of private data, I will present how a minimal language extension would help and make the testing code less intrusive. Open non-intrusive friend declarations could provide a good method to separate the test related code from the original intentions. We implemented a proof-of-concept solution, based on LLVM/Clang to show that such constructs can be established with a minimal syntactical and compilation overhead.

Speakers
avatar for Gábor Márton

Gábor Márton

Ericsson
Gábor has been working with C++ since 2000. Currently, he is the member of Ericsson's CodeChecker program analysis team. He works on Cross Translation Unit (CTU) static analysis and the related ASTImporter of the LLVM/Clang compiler infrastructure.In 2019 he defended his PhD theses... Read More →
avatar for Zoltán Porkoláb

Zoltán Porkoláb

Ericsson & Eötvös Loránd University
Dr. Zoltán Porkoláb is an Associate Professor of Faculty of informatics at Eötvös Loránd University (ELTE), Budapest, Hungary. At the same time, he holds Principal C++ Developer position at Ericsson Hungary Ltd.


Wednesday May 11, 2016 4:30pm - 5:15pm
Flug Auditorium

5:15pm

Design Patterns in the 21st Century
Design patterns started with Smalltalk and "old" C++. Since then, programming languages and paradigms have advanced quite a bit, and C++ is no exception. In this presentation, we'll take a look at how classic Gang of Four design patterns can be improved via Modern C++. We'll also take a look at functional programming patterns and how C++ functional literals and lambda expressions make monads possible.

Speakers
avatar for Dmitri Nesteruk

Dmitri Nesteruk

Technology Advocate, JetBrains


Wednesday May 11, 2016 5:15pm - 6:00pm
Flug Auditorium
 
Thursday, May 12
 

9:00am

Multithreading is the answer. What was the question? Part I
This session will cover the various kinds of problems which can be solved by using multithreaded concepts or techniques. I will discuss the challenges involved with designing and implementing a multithreaded application, how to mitigate them, and when to consciously avoid writing multithreaded code. Topics will range from high-level architecture to low-level C++ classes which improve readability and maintainability of multithreaded code. The discussion will include C++11 multithreading, C++17 concurrency TS, and new abstractions we can build on top of these features. Basic familiarity with the C++11 threading library will be helpful.

Speakers
avatar for Ansel Sermersheim

Ansel Sermersheim

Co-Founder, CopperSpice
I have been working as a programmer for over fifteen years. My degree is in Computer Science from Cal Poly San Luis Obispo. Currently I work as a software engineer designing scalable, high performance, multi-threaded network daemons in C++. The daemons I have developed are used... Read More →


Thursday May 12, 2016 9:00am - 10:30am
Booz Allen Hamilton

9:00am

Variadic expansion in examples
Templates - and variadic templates - are an important aspect of writing a successful library in C++; libraries that can deal with custom types the user creates greatly eases their use. Variadic templates specifically are still a new, relatively unknown and at the same time quite a buggy (in the sense of bugs in their implementations) tool, but nevertheless, they offer much easier ways of creating truly generic types and functions. This talk will focus slightly less on variadic templates in general; the common pitfalls will be discussed, but more attention will be given to the tool of parameter pack expansion and all the contexts where it can be used, especially as a code generation tool. The talk will start mostly from scratch, assuming the audience's general knowledge about templates. It'll introduce the idea of variadic templates and general syntax and typical techniques for their use. Next, it will head into the (mostly) unknown and buggy lands of the interesting uses of variadic packs, like unpacking a tuple into a function call using `std::integer_sequence`, the use of empty packs for a slightly easier way to work with `enable_if`. The final examples will explain the way of invoking an expression per every argument in a pack, and dispatch to appropriate version of code for each of the argument types based on runtime values, which will be used to more easily create variant visitors.

Speakers
avatar for Michał Dominiak

Michał Dominiak

System Software Engineer, Nvidia


Thursday May 12, 2016 9:00am - 10:30am
Flug Auditorium

11:00am

IoC++ - A IoC framework for C++
IoC++ is a library for doing dependency injection in C++. It is designed to allow configuration of object graphs at runtime via code or configuration files, with high flexibility in the creation and lifetime management of objects. The library was developed in-house at the Symena branch of TEOCO, but is in the process of being open-sourced and will, if sufficient interest is generated, be proposed for inclusion in Boost. The concepts and workings of the library will be explained, and the library will be compared to similar ones in the field such as the proposed Boost.DI.

Speakers
avatar for Sebastian Redl

Sebastian Redl

Senior Programmer, Teoco
Sebastian holds a BSc in Software Engineering from the Technical University of Vienna and is currently finishing an MSc. He is working at a small software company called Symena (part of Teoco), and recently spent a year's sabbatical working at Google. He has contributed heavily to... Read More →


Thursday May 12, 2016 11:00am - 12:30pm
Bethe

11:00am

Multithreading is the answer. What was the question? Part II
This session will cover the various kinds of problems which can be solved by using multithreaded concepts or techniques. I will discuss the challenges involved with designing and implementing a multithreaded application, how to mitigate them, and when to consciously avoid writing multithreaded code. Topics will range from high-level architecture to low-level C++ classes which improve readability and maintainability of multithreaded code. The discussion will include C++11 multithreading, C++17 concurrency TS, and new abstractions we can build on top of these features. Basic familiarity with the C++11 threading library will be helpful.

Speakers
avatar for Ansel Sermersheim

Ansel Sermersheim

Co-Founder, CopperSpice
I have been working as a programmer for over fifteen years. My degree is in Computer Science from Cal Poly San Luis Obispo. Currently I work as a software engineer designing scalable, high performance, multi-threaded network daemons in C++. The daemons I have developed are used... Read More →


Thursday May 12, 2016 11:00am - 12:30pm
Booz Allen Hamilton

2:30pm

Exceptional Performance
When many of us choose C++, performance is one of the most important factors. It is so ingrained in the culture of C++ that the single most important tenant of C++ is probably "You don't pay for what you don't use". This shows up in almost all components of modern C++: zero-cost abstractions backed by a powerful optimizing compiler. Yet there is one component of the language that appears to violate this rule: exceptions. The mere possibility of exceptions can force the compiler to generate different, slower, code than it otherwise would have. Throwing an exception is a slow operation, and exceptions can lead to an increase in code size. There is a lot of conflicting advice on what exactly the programmer can do to make sure that they only pay for what they use that runs the gamut from "Don't worry about it" to "Pass this special flag to your compiler to turn off exceptions". The situation is only made more complicated by the introduction of the noexcept keyword. In this presentation, we will discuss exactly what effect exceptions have on the performance of an application, backed up by numbers from both benchmarks and real world applications. We will go into the details of hardware architecture and memory hierarchy to try to understand exactly why code performs the way it does. Could it ever make sense to say that you using exceptions for performance reasons?

Speakers
avatar for David Stone

David Stone

Vice President, Markit
David Stone has spoken at C++Now and Meeting C++. He is the author of the bounded::integer library: http://doublewise.net/c++/bounded/ and has a special interest in compile-time code generation and error checking, as well as machine learning. He works at Markit integrating real-time... Read More →


Thursday May 12, 2016 2:30pm - 4:00pm
Flug Auditorium

2:30pm

Implementing A Modern C++ MQTT Client for Embedded Devices
Many IoT (Internet of Things) devices have adopted MQTT as an efficient protocol for communication. Few IoT devices have embraced modern C++ as a viable language for implementations. MQTT (Message Queueing Telemetry Transport) is a reliable publish-subscriber based messaging protocol that can be found in diverse ecosystems such as servers, cell phones, and light bulbs. Unfortunately, existing open source libraries leave much to be desired and many are a rich source of bad practices when compared to modern techniques. This session will unveil a CiereLabs open source MQTT client library written for embedded systems in modern C++ . There will be a brief demonstration of the library followed by digging into the design and implementation. As we explore the C++14 code base to illustrate useful idioms and techniques for your own code we will answer the question, what does is take to put modern C++ on a small OS-less device or a cell phone? Are there features to avoid? Join us and see how libraries can be elegantly designed and implemented for big or small targets.

Speakers
avatar for Michael Caisse

Michael Caisse

Ciere Consulting
Michael Caisse has been crafting code in C++ for 29-years. He is a regular speaker at various conferences and is passionate about teaching and training. Michael is the owner of Ciere Consulting which provides software consulting and contracting services, C++ training, and Project... Read More →


Thursday May 12, 2016 2:30pm - 4:00pm
Booz Allen Hamilton

4:30pm

C++ Tool Support: Where We Are and Where We Are Heading
As Bjarne Stroustrup stated in his opening address at CppCon 2015, "we need tools". But what can those tools actually do? What's the point of having an IDE when we have Notepad, VIM/Emacs, Sublime and others? This talk attempts to answer the question by showing how tools allow us to gain more insight into how the code is going to behave and how it can be improved. We'll take a look at a scenario which is made progressively better through the use of code generation, refactorings as well as the insights provided by fast navigation and hierarchical visualization. We'll also take a look at extraneous facilities, such as the support for CMake, built-in unit testing as well as the ways in which interoperation with other tools (e.g., Cling), as well as different programming languages (e.g., Python), makes an IDE an excellent choice for productive development.

Speakers
avatar for Dmitri Nesteruk

Dmitri Nesteruk

Technology Advocate, JetBrains


Thursday May 12, 2016 4:30pm - 5:15pm
Flug Auditorium

4:30pm

The Effective Structured Data Marshalling/Demarshalling Through Boost.Fusion Introspection In A High Performance Web Service
The Effective Structured Data Marshalling/Demarshalling Through Boost.Fusion Introspection In A High Performance Web Service The Yandex company is the one of the biggest internet companies in Russia. We provide various users' network interactive services, such as: web-search, e-mail, maps, photohosting and so on. Our team is developing e-mail backend. Message receiving, handling, sending are most typical tasks in backend service. At C++Now 2014 we talked about the optimization of a Boost.Asio-based networking server. Now we want to talk about effective data marshalling and demarshalling which is taking a significant part of our internal web services workload. In this talk we are looking for generic solution of effective marshalling and demarshalling of a structured data like instances of structures, STL containers, classes and so on. We start from the simple implementation which is based on the Boost.Fusion framework, discuss the problems and limitations of this solution. Then we propose different workarounds and optimisations of the solution to achive the performance. We propose solutions based on following key points: * minimization of data copying in order to decrease CPU and memory usage; * elimination of hidden synchronization and locks to provide maximum parallelism and independed work of the solution in different threads; * asynchronous interfaces to use callbacks and/or coroutines for the IO events handling; * stream-like raw data and structured objects processing. For each of these points we provide overview on how it affects total performance.

Speakers
avatar for Sergei Khandrikov

Sergei Khandrikov

Senior Developer, Yandex LLC
Sergei Khandrikov has over 10 years of experience in software engineering and C++ development. He has been a backend C++ developer on the Web Mail Interface team at Yandex, LLC, since 2011. Sergei graduated from Bauman Moscow State Technical University as a specialist in robotics... Read More →
avatar for Piotr Reznikov

Piotr Reznikov

Yandex.Mail developer, Yandex
Peter has been a backend developer at Yandex LLC since 2011. He is working at Web Mail Interface team for Yandex.Mail service, maintaining and developing various backend applications, using C++ (and other languages, like PL/SQL or Python, where applicable). Peter is constantly expanding... Read More →


Thursday May 12, 2016 4:30pm - 5:15pm
Bethe

5:15pm

Extending C++ with Co-Array semantics
The current trend of large scientific computing problems is to to align as much as possible to Single Programming Multiple Data (or SPMD) scheme when the application's algorithms are conducive to vectorization. This reduces the complexity of code because the processors or (computation nodes) perform the same instructions, and allows for better performance as algorithms work on local data sets instead of transferring the data from one node to another. However, certain problems such as, stencils problems, demonstrate the need to move data to or from remote localities. It involves an additional degree of complexity, if only to know with which locality to interact to send/receive a given data. To solve both these two issues, Fortran has extended its scalar element indexing approach for distributed structures of elements. In this extension, a structure of element is attributed a "co-index" and lives in a specific locality. A co-index provides the application with enough information to retrieve the corresponding data reference. In C++, containers present themselves as a "smarter" alternative of Fortran arrays but there are still no corresponding features similar to the Fortran co-indexing approach. In this paper, we present an implementation of such features in HPX, a general purpose C++ runtime system for applications of any scale. We describe how the combination of the HPX concepts and new features from C ++ language makes it easy to define a high performance API similar to coarray FORTRAN.

Speakers
avatar for Antoine TRAN TAN

Antoine TRAN TAN

Postdoctoral researcher, Center for Computation and Technology
I am a postdoctoral researcher in Computer Science at the Louisiana State University and work for the Ste||ar Group at the Center for Computation and Technology. I have obtained my doctor's degree in Computer Science at the University of Paris Saclay (France). My interests include... Read More →


Thursday May 12, 2016 5:15pm - 6:00pm
Bethe

5:15pm

Progress on Contract Support for C++17
Contract Support in a language helps library authors and library users work together to make better programs, catching usage mistakes early, preventing spurious bug reports, improving security and performance.

Every library has incidental behaviors and interpretations of arguments that are not in the specification, and could easily be different in the next release. It is very easy to come to accidentally depend on these incidental details. When details can be spelled out directly in C++, and automatically verified during testing, there is much less room for misunderstandings.

The process of getting contract support into C++ has been long and contentious, because the name actually refers to several nearly disjoint goals, with different champions, and conflicting priorities. Some are most interested in static, compile-time verification, others in runtime checking and controlled response to violations, defense against security abuses, or improved optimization opportunities. The annotations programmers would add could certainly be used for all of these things, but where to add them and what to say vary by the intended use.

The factions have come together to present a common proposal meant to address all the disparate needs, with the minimum burden on programmers. This presentation explores the unified proposal and how it meets the needs of each group, and of programmers in general. Many surprises surfaced while merging the designs and simplifying.

Speakers
avatar for Nathan Myers

Nathan Myers

staff, Bloomberg LP
Nathan joined the ISO C++ Standard effort in 1993. He is responsible for keyword "explicit" in the core language. He invented traits, empty-base optimization, and indexing type-erased containers by type, holds the record for longest sentence using only C++ keywords (once each) and... Read More →


Thursday May 12, 2016 5:15pm - 6:00pm
Booz Allen Hamilton
 
Friday, May 13
 

9:00am

C++ Performance in Practice: Align, Vectorise, Cache, Jump!
This talk is the next installment in the series "C++ In the Audio Industry”. However, the talk presented here does not contain material specific to the audio industry and is intended for a general C++ audience interested in performance and low latency.

The first part of the series, presented at CppCon 2015, covered real-time programming and lock-free thread synchronisation. In this talk, I will instead focus on raw performance and how your hardware architecture can impact it, sometimes in surprising ways. I will discuss the following topics: memory alignment, SIMD and (auto-)vectorisation, cache-friendliness, and the impact of branch prediction. I will present the concepts, C++ code examples with performance benchmarks, and relevant modern C++11/14 techniques. I will also give an insight into the challenges of designing and implementing a generic, modern C++ framework dealing with those topics.

Speakers
avatar for Timur Doumler

Timur Doumler

JUCE Senior Software Engineer, ROLI Ltd.
Timur Doumler is Senior Software Developer at London-based technology company ROLI. He is currently working on JUCE, the leading cross-platform framework for creating audio applications used by hundreds of companies in the audio industry. After five years of writing high-performance... Read More →


Friday May 13, 2016 9:00am - 10:30am
Booz Allen Hamilton

9:00am

Goodbye metaprogramming, and hello functional: Living in a post-metaprogramming era in C++.
C++ has had a long history with metaprogramming ever since it was discovered that C++ templates were Turing complete. However, many features of modern C++ now make the awkward syntax obsolete that we have grown to love. With constexpr, type deduction, and functional idioms, we can now leave behind typename disambiguations and template template parameters. In this talk, we will look out how we can utilize functional constructs from the Fit library to simplify how metaprogramming is achieved in C++ and how a functional library will be essential in a C++ programmer's toolbox.

Speakers
avatar for Paul Fultz II

Paul Fultz II

Software Engineer, AMD


Friday May 13, 2016 9:00am - 10:30am
Flug Auditorium

9:00am

The Design of a New C++ Build Toolchain
At C++Now 2015 I introduced build2, a new C++ build system. A year later, a lot has happened. Most significantly, there is now a package manager (bpkg), a repository web interface (brep), and a public repository of open source C++ packages, cppget.org. Also, the build system has seen a lot of development. But in this talk I don't want to give you a run down of the new features. Ok, maybe just a short introduction, to set the context. Instead, I would like to talk about interesting problems in the cross-platform C++ building and distribution process, how we decided to tackle them in build2 (and then, I am sure, someone from the audience will tell me why it's all wrong ;-)). What are the interesting problems? Cross-compilation (something is wrong with your build system if it's harder to cross-compile than build natively on Windows), in/out-of-source builds, interaction of generated source code with automatic dependency extraction, or high fidelity builds (what if I changed my compiler options), just to name a few. Seemingly benign decisions, such as relative vs absolute paths, can open (or close) doors to really powerful features, like updating multiple, unrelated projects or even multiple configuration of the same project with a single build tool invocation. A C++ build system also rarely handles just building. There is testing, installation (do we really have to run the whole process as sudo?), and preparation of distributions (no, shipping your .gitignore files is not cool). When it comes to packaging, how do we capture requirements (like C++11 or Linux-only) and conditional dependencies? How do we ensure package authenticity? And what should the submission policies and procedures be for a package repository like cppget.org?

Speakers
avatar for Boris Kolpackov

Boris Kolpackov

Chief Hacking Officer, Code Synthesis
Boris Kolpackov is a founder and CHO (Chief Hacking Officer) at Code Synthesis, a company focusing on the development of open-source tools and libraries for C++. For the past 10 years Boris has been working on solving interesting problems in the context of C++ using domain-specific... Read More →


Friday May 13, 2016 9:00am - 10:30am
Bethe

11:00am

An Interesting Lock-free Queue - Part 2 of N
This is a continuation of last year's talk on an "interesting" lock-free queue. ("interesting"? Well, "multi-producer, multi-consumer, growing, shrinking, mostly contiguous, lock-free circular queue" is a bit long. Maybe "complicated" is a better word.) Attendance at last year's talk is completely NOT required. This time we will not just review where we left off last year, but attempt to "prove" that what we did is actually correct, and thus discuss how to prove correctness of lock-free algorithms, and discuss provability vs testing. And then, with the first steps proven (or disproven! - and hopefully corrected!), we can continue to expand the features of the queue, and tackle the new challenges that arise.

Speakers
avatar for Tony Van Eerd

Tony Van Eerd

Ninja/Jedi/Tony, Christie Digital
Tony has been coding for well over 25 years, and maybe coding well for some of that. Lots of pixel++, UX, threading, etc. Previously at Inscriber, Adobe, BlackBerry, he now enables Painting with Light at Christie. He is on the C++ Committee. He is a Ninja and a Jedi.Follow @tvaneerd... Read More →


Friday May 13, 2016 11:00am - 12:30pm
Flug Auditorium

11:00am

Simple hand written parsers
While tools like yacc/bison or Boost.Spirit are certainly very useful when getting a parser for a simple language working quickly, the need for hand-written parsers still prevails. Getting custom behavior with parser generators can sometimes be painful, and they aren't exactly designed for the debuggability of the resulting code. Additionally, error reporting and recovery can get troublesome. This talk will focus on recursive descent parsers and some of techniques that author found useful when implementing that kind of parsers. The primary focus will stay on the simplest case - LL(1) grammars - but LL(k) and LL(*) grammars will also be discussed. Other important and related topics, including designing an AST that makes sense, parser combinators, and tokenizing the input before actual parsing takes place, will also be featured. No prior experience with parsing is necessary to understand the contents of this talk.

Speakers
avatar for Michał Dominiak

Michał Dominiak

System Software Engineer, Nvidia


Friday May 13, 2016 11:00am - 12:30pm
Booz Allen Hamilton

2:30pm

HPX and GPU parallelized STL
The concept of executors, introduced by proposal N4406, has created a possibility for a flexible and dynamic choice of execution platform for STL algorithms. HPX implements executors to support serial and parallel execution of algorithms on CPUs. However, current solutions do not utilize the power of GPUs. The support for GPGPU frameworks has become a standard in modern graphic processors, but the usage of computing power provided is still far from common. The most frequent reasons include: less intuitive programming model, more complex architecture of both memory and streaming processors, and the host-device paradigm which enforces manual data transmission and synchronization. There is a need for parallelization including not only CPUs which can be easily introduced into applications, even by programmers who are not experienced in neither architecture nor programming languages of GPUs. We have been working on bringing GPU parallelization into HPX implementation of parallel STL. For this task, we have chosen two industrial standards for automatic parallelization of C++ into the device code: C++AMP, an open standard proposed by Microsoft, and SYCL, which has been recently introduced by the Khronos Group. Our approach is based on code generated for OpenCL which makes it fully portable and platform independent. Our solution includes the extension of existing implementation with both synchronous and asynchronous GPU executors. This approach allows for minimizing developer’s work, who is not forced to write code responsible for data transfers. Templated design of algorithms encapsulates all buffering and synchronization which is necessary for execution on GPU. An additional configuration allows the optimization of performance by choosing a block size for a GPU thread. HPX has been integrated and tested with the latest and still developed Clang-based compilers, open source Kalmar, which implements AMP standard, and commercial ComputeCpp providing support for Khronos SYCL. Although both compilers are not bug-free and ready for release, the results of our project prove that these standards can be integrated with an existing, complex and mature C++ project.

Speakers
avatar for Marcin Copik

Marcin Copik

I am a final year Master student at the German Research School for Simulation Sciences/RWTH Aachen. I have obtained my Bachelor's degree in Computer Science from the Silesian University of Technology. I have worked with the STE||AR Group during Google Summer of Code 2015 and I came... Read More →


Friday May 13, 2016 2:30pm - 4:00pm
Bethe

2:30pm

Implementing tuple in C++17
C++17 adds new language features that might affect the design and implementation of 'std::tuple', such as fold expressions for templates. Several other features still pending as this proposal is written, such as concepts and implicit comparison operators. In addition, the standard library itself pushes the interface of the 'tuple' template itself, while providing additional metaprogramming utilities that might help both the implementation, and users. This session will review the tuple interface, as specified for C++17, highlighting any changes since C++11 and C++14. It will then look into the design of several implementations of tuple, explored through several testing and benchmarking scenarios, before looking to draw conclusions. Note that the code shown in this session will require a recent version of a C++ compiler that implements an experimental C++17 mode. The latest Clang and gcc compilers should be capable, although the latest development compilers may be needed for new language features added in 2016.

Speakers
avatar for Alisdair Meredith

Alisdair Meredith

Senior Developer, BloombergLP
Alisdair Meredith is a software developer at BloombergLP in New York, and the C++ Standard Committee Library Working Group chair.He has been an active member of the C++ committee for just over a decade, and by a lucky co-incidence his first meeting was the kick-off meeting for the... Read More →


Friday May 13, 2016 2:30pm - 4:00pm
Flug Auditorium

2:30pm

The Fiber Library
The Boost.Fiber library supports fine-grained concurrency within a single thread. It permits you to make efficient use of a given thread's CPU, keeping it busy with other work while a particular fiber waits for asynchronous results. Most significantly, the Fiber library permits you to write and maintain what looks and behaves like simple sequential code, building a hierarchy of abstraction layers per industry best practices, while at the same time reaping the full benefits of asynchronous I/O concurrency. This talk presents an overview of the library, discusses integration with event-driven frameworks and illustrates several useful patterns, including load-balancing work among a pool of threads. Developers who have had to maintain application logic structured as a chain of callbacks, or then() calls, may find this library particularly welcome.

Speakers
NG

Nat Goodspeed

Linden Lab
Nat Goodspeed first read about C++ shortly after implementing a medium-sized language interpreter in classic C. Almost every C++ feature led to forehead smacking accompanied by muttered remarks about how the language could have solved THIS problem... He has been fascinated (sometimes... Read More →


Friday May 13, 2016 2:30pm - 4:00pm
Booz Allen Hamilton

4:30pm

No Sane Compiler Would Optimize Atomics
False. Compilers do optimize atomics, memory accesses around atomics, and utilize architecture-specific knowledge. My hobby is to encourage compilers to do more of this, programmers to rely on it, and hardware vendors to give us new atomic toys to optimize with. Oh, and standardize yet more close-to-the-metal concurrency and parallelism tools. But, you say, surely volatile always means volatile, there’s nothing wrong with my benign races, nothing could even go wrong with non-temporal accesses, and who needs 6 memory orderings anyways‽ I’m glad you asked, let me tell you about my hobby…

Speakers
avatar for JF Bastien

JF Bastien

Compiler Engineer, Apple
JF Bastien is a compiler engineer, currently focusing on performance and security to bring portable, fast and secure code to the Web. JF is a member of the C++ standards committee, where his mechanical engineering degree serves little purpose. He's also the chair of the WebAssembly... Read More →


Friday May 13, 2016 4:30pm - 6:00pm
Flug Auditorium

4:30pm

The CPU Cache: Instruction Re-Ordering Made Obvious
The CPU cache has been described as one of the greatest inventions in the history of computer science. In the era of the modern multi-core CPU, software design increasingly relies upon the CPU cache to enable performance, and to forgive our software implementation transgressions. This performance comes at a cost: To make best use of underlying CPU resources, the CPU and compiler will conspire to re-order the instructions specified in our source code algorithms -- at compile-time, and at run-time. This re-ordering can be perplexing to new programmers, and confusing when debugging real-world scenarios. However, re-ordering is explicitly allowed by the C++ Standard under the “As-If” rule, with C++11 providing the programmer additional tools through language and library features such as the C++11 memory model, atomics, memory fences, and threading libraries.

This is a, “First Principles” (i.e., “introductory”) discussion of the CPU cache, its anatomy, and its ever-growing role in hardware and software design. Modern performant systems are implemented with explicit knowledge of the CPU cache’s structure and behavior. Discussion is made of CPU registers, CPU cache levels, the cache line, the data bus, the CPU instruction pipeline, the compiler’s duty, and the tremendous hijinks performed by execution units within the processor core at runtime which leads to instruction re-ordering -- for which the knowledgeable C++ programmer is grateful.

No programmer can be an expert on everything. However, increasingly most C and C++ programmers need to be conversant with CPU cache issues and terminology at this level, and such understanding will make compiler and runtime behavior (and especially instruction re-ordering) much more obvious. From here, one begins to think about how to leverage parallelism and be concerned with concurrency.

Speakers
avatar for Charles Bay

Charles Bay

Charley Bay
Charley Bay has over three decades of experience using C++ in multiple regulated and high-performance fields focused on large-scale and distributed systems in performance-sensitive environments including time-sensitive processing of large data sets, performance visualization, real-time... Read More →



Friday May 13, 2016 4:30pm - 6:00pm
Booz Allen Hamilton

4:30pm

What is the basic interface?

When we read a function declaration, what expectations do we have of the function? What requirements and limitations do we take for granted? Our unspoken assumptions about function interfaces present an obstacle to precise reasoning about programs. 

Here, I will delve into the nitty-gritty procedural logic of function calls in C++, with particular emphasis on the things that often go without saying. I will present some suggestions about how we can make these implicit expectations precise, and how we can express deviation from these expectations in current and future versions of C++. 

This presentation will be a companion to my C++Now 2015 session, "How we reason about procedural programs," but no knowledge of that material will be necessary.


Speakers
avatar for Lisa Lippincott

Lisa Lippincott

Software Architect, Tanium
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... Read More →


Friday May 13, 2016 4:30pm - 6:00pm
Bethe