Events

CppCon 2015 Program Highlights, 11 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Concurrency TS: The Editor's Report
  • `for_each_argument` explained and expanded
  • std::allocator Is to Allocation what std::vector Is to Vexation
  • <functional>: What's New, And Proper Usage
  • Type Traits - what are they and why should I use them?

 

Concurrency TS: The Editor's Report by Artur Laksberg, Software Engineer, Microsoft

In this presentation we will talk about the new C++ concurrency features that have been included in the Concurrency Technical Specification.

The TS should be of interest to anyone writing concurrent code in C++. The proposal includes improved futures for wait-free composition of asynchronous operations (including their relationship with C++ 'await'), new synchronization constructs as well as atomic smart pointers.


`for_each_argument` explained and expanded by Vittorio Romeo

During January 2015, Sean Parent posted a very interesting short piece of code on Twitter. The code iteratively iterates at compile-time over any number of function arguments, forwarding them one by one to a callable object.

How does this code work? What are the possible use cases? Can we make it even more generic and useful?

My talk answers all of the questions above, using independently compiled chronologically sequential code segments that show the audience the analysis and improvement process of `for_each_argument`.


std::allocator Is to Allocation what std::vector Is to Vexation by Andrei Alexandrescu, Founder, D Language Foundation

std::allocator has an inglorious past, murky present, and cheerless future. STL introduced allocators as a stop gap for the now antiquated segmented memory models of the 1990s. Their design was limited and in many ways wasn't even aiming at helping allocation that much. Because allocators were there, they simply continued being there, up to the point they became impossible to either uproot or make work, in spite of valiant effort spent by the community.

But this talk aims at spending less time on poking criticism at std::allocator and more on actually defining allocator APIs that work.

Scalable, high-performance memory allocation is a topic of increasing importance in today's demanding applications. For such, std::allocator simply doesn't work. This talk discusses the full design of a memory allocator created from first principles. It is generic, componentized, and composable for supporting application-specific allocation patterns.


<functional>: What's New, And Proper Usage by Stephan T. Lavavej, Senior Software Engineer, Microsoft

<functional> gained lots of machinery in C++11, with further changes in C++14 and C++17. This talk will cover what's new in 11/14/17, focusing on how to use it properly. For example, you've probably used std::function, but do you know the criteria for activating the Small Functor Optimization? (It's not just being small!) We'll also look at bind(), mem_fn(), C++17's invoke(), and more.


Type Traits - what are they and why should I use them? by Marshall Clow, Qualcomm

In this talk, I will answer the questions, "What are type traits?" and "Why are type traits useful?", along with some examples of why when when they should be used.

CppCon 2015 Program Highlights, 10 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++, it is also a language that we like to discover and master always more.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Tuning C++: Benchmarks, and Compilers, and CPUs! Oh My!
  • Value Semantics: It ain't about the syntax!, Part I and Part II
  • Five amazing things you couldn't imagine C++ can do
  • C++ Atomics: The Sad Story of memory_order_consume: A Happy Ending at Last?
  • A C++14 approach to dates and times

 

Tuning C++: Benchmarks, and Compilers, and CPUs! Oh My! by Chandler Carruth, C++ Language and Compiler Lead, Google

A primary use case for C++ is low latency, low overhead, high performance code. But C++ does not give you these things for free, it gives you the tools to control these things and achieve them where needed. How do you realize this potential of the language? How do you tune your C++ code and achieve the necessary performance metrics?

This talk will walk through the process of tuning C++ code from benchmarking to performance analysis. It will focus on small scale performance problems ranging from loop kernels to data structures and algorithms. It will show you how to write benchmarks that effectively measure different aspects of performance even in the face of advanced compiler optimizations and bedeviling modern CPUs. It will also show how to analyze the performance of your benchmark, understand its behavior as well as the CPUs behavior, and use a wide array of tools available to isolate and pinpoint performance problems. The tools and some processor details will be Linux and x86 specific, but the techniques and concepts should be broadly applicable.


Value Semantics: It ain't about the syntax!, Part I and Part II by John Lakos, Software Infrastructure Manager, Bloomberg LP

When people talk about a type as having *value* *semantics*, they are often thinking about its ability to be passed to (or returned from) a function by value. In order to do that, the C++ language requires that the type implement a copy constructor, and so people routinely implement copy constructors on their classes, which begs the question, "Should an object of that type be copyable at all?" If so, what should be true about the copy? Should it have the same state as the original object? Same behavior? What does copying an object mean?! By *value* *type*, most people assume that the type is specifically intended to represent a member of some set (of values). A *value-semantic* *type*, however, is one that strives to approximate an abstract *mathematical* type (e.g., integer, character set, complex-number sequence), which comprises operations as well as values. When we copy an object of a value-semantic type, the new object might not have the same state, or even the same behavior as the original object; for proper value-semantic types, however, the new object will have the same *value*. In this talk, we begin by gaining an intuitive feel for what we mean by *value* by identifying *salient* *attributes*, i.e., those that contribute to value, and by contrasting types whose objects naturally represent values with those that don't. After quickly reviewing the syntactic properties common to typical value types, we dive into the much deeper issues that *value* *semantics* entail. In particular, we explore the subtle *Essential* *Property* *of* *Value*, which applies to every *salient* mutating operation on a value-semantic object, and then profitably apply this property to realize a correct design for each of a variety of increasingly interesting (value-semantic) classes.


Five amazing things you couldn't imagine C++ can do by Sasha Goldshtein

Modern C++ is incredibly flexible. It's truly the multi-paradigm language Bjarne Stroustrup envisioned. In this talk, we will explore five functions or small libraries that make use of modern C++'s amazing features. Among them: compile-time- and runtime-safe printf, automatic recursive serialization of containers, a simple but complete parallelism framework using only portable C++, and two others to keep you motivated.


C++ Atomics: The Sad Story of memory_order_consume: A Happy Ending at Last? by Paul McKenney, Distinguished Engineer, IBM Linux Technology Center

One of the big advantages of C++ atomics is that developers can now let the compiler know about the intent behind their multi-threaded synchronization mechanisms. At least they can tell the compiler as long as the synchronization mechanism in question is not RCU. You see, all production compilers promote RCU's memory_order_consume to memory_order_acquire. Although this promotion does ensure correctness, it also ensures the additional overhead of memory-barrier instructions on weakly ordered systems and of needlessly suppressed compiler optimizations on all systems.

All previous attempts to resolve this issue have foundered on either standard-committee reluctance to eviscerate the standard for a special case, compiler-writer reluctance to eviscerate their compilers for a special case, and kernel-developers reluctance to eviscerate their source base for late-to-the-party compiler support.

But now there is a glimmer of hope in the guise of a small set of small patches to the Linux kernel that eliminate the most challenging use cases. Will this hope be realized? Come to this talk to here the story, which by September will hopefully have a happy ending!


A C++14 approach to dates and times by Howard Hinnant, Senior Software Engineer, Ripple Labs

A new date and date/time library designed for C++14 is presented. This library stresses ease of use, easy-to-read code, catching common errors at compile time, and uncompromising run-time performance.

The design starts with the C++11 std::chrono library, and extends it into the realm of calendars, giving a seamless experience built upon chrono::system_clock::time_point, the durations you already know such as chrono::hours and nanoseconds. Functionality that allows easy and efficient conversions between the std::chrono types and year/month/day - hh::mm::ss data structures is presented.

When dates (and times) are known at compile-time (e.g. leap second transitions), all computations are available at compile time (constexpr). When only parts of a date are known at compile time, run-time efficiencies are still gained by compile-time computing parts of the date.

The syntax of the library is built around a few easy-to-learn rules, and strictly checked at compile time. This makes it easy to learn, and very forgiving for the novice.

C++ User Group Meetings in September

The monthly listing of C++ User Group Meetings:

C++ User Group Meetings in September

by Jens Weller

The list of Meetings:

9.9 C++ UG Utah - Regular Monthly Meeting
9.9 C++ UG San Francisco/ Bay area - Presentation and Q&A
9.9 C++ UG Washington, DC - Q & A / Info Sharing 10.9 C++ UG Dresden - Scripting in C++
14.9 C++ UG Denver - Denver Tech Center C++ Developers
14.9 C++ UG Bristol - Tim Perry
14.9 C++ UG Zentralschweiz - Coding Dojo
16.9 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
16.9 C++ UG North West/Seattle - The BBC micro: bit and C++
17.9 C++ UG Chicago - "Cross-compiling to C++" and "Can you make me more productive
21.9 C++ UG Austin - North Austin Monthly C/C++ Pub Social
23.9 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
23.9 C++ UG Washington, DC - Q & A / Info Sharing
24.9 C++ UG Rhein-Neckar - C++ Usergroup Meeting
24.9 C++ UG Bremen - C++ - Vorstellung eines Frameworks für den Integrationtest
24.9 C++ UG Arhus - Libreoffice Hackfest
30.9 C++ UG San Francisco/ Bay area - CppCon Trip Report

CppCon 2015 Program Highlights, 9 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 2).

In this post:

  • Rcpp: Seamless R and C++ Integration
  • Mantid, A C++ framework for the reduction and analysis of neutron scattering data
  • Integrating generators EDSL's for Boost.Spirit X3
  • 3D Face Tracking and Reconstruction using Modern C++
  • Using Spirit X3 to Write Parsers
  • Boost Units Library for Correct Code

 

Rcpp: Seamless R and C++ Integration by Matt P. Dziubinski, Assistant Professor, Aalborg University

R is an open-source statistical language designed with a focus on data analysis. While its historical roots are in statistical applications, it is currently experiencing a rapid growth in popularity in all fields where data matters: from data science, through bioinformatics and finance, to machine learning. Key strengths contributing to this growth include its rich libraries ecosystem (over 6 thousands packages at the moment of writing) – often authored by the leading researchers in the field, providing early access to the latest techniques; beautiful, high-quality visualizations – supporting seamless exploratory data analysis and producing stunning presentations; all of this available in an interactive environment resulting in high productivity through fast iteration times.

At the same time, there are no free lunches in programming: the dynamic, interactive nature of R does have its costs, including a significant impact on run-time performance. In an era of growing data sizes and increasingly realistic models this concern is only becoming more important.

In this talk we provide an introduction to Rcpp – a library allowing smooth integration of R with C++, combining the productivity benefits of R for data science together with the performance of C++. First released in 2005, today it’s the most popular language extension for R -- used by over 400 packages. We'll also discuss challenges (as well as possible solutions) involved in integrating modern C++ code, and demonstrate the usage of popular C++ libraries in practice. We’ll conclude the talk with the RInside package allowing to embed R in C++.


Mantid, A C++ framework for the reduction and analysis of neutron scattering data by Steven Hahn, Data Analysis Software Engineer, Oak Ridge National Laboratory

Today one of the most important barriers between performing an experiment and publishing the results is the complex and time-consuming effort that individual researchers apply to data reduction and analysis. In a neutron experiment one must relate measured counts to a physically meaningful four-dimensional scattering function. While the first neutron scatters had to manually setup their instrument and record neutron counts – in handwriting – one single point at a time, users at a modern time of flight spectrometer rapidly collect hundreds of gigabytes of data in less than one day. High performance software is now a necessity. Rapid reduction, analysis and visualization provide feedback for users, helping them make optimal use of limited beam time. Software must also be accessible to and customized by users with a wide range of abilities and interests in programming. In this talk, I will discuss Mantid-(the Manipulation and Analysis Toolkit for Instrument Data), which is the framework designed for the reduction and analysis of data acquired at muon and neutron sources. It is a partnership between multiple user facilities including Rutherford Appleton Laboratory, Oxfordshire, UK, Oak Ridge National Laboratory, Tennessee, USA and the European Spallation Source, Scandinavia. The core of the Mantid Framework is written in C++ with the user interacting via a GUI or python bindings. I will describe real-world cross-platform situations we have encountered while supporting Mantid on Linux, OS X and Windows. This plus a climate that values stability over the latest operating systems and compilers creates challenges to utilizing new language and library features available in C++11/14. To better exploit parallelism on all of the supported platforms, we are wrapping parallel loops so that different implementations can be chosen at compile time. Considerable portions of Mantid provide domain-specific user interfaces to cross-platform libraries. One example is 3D visualization of the large multidimensional datasets generated in Mantid. Our approach utilizes the application widgets and rendering libraries from ParaView. Mantid provides plugins specifically designed for the Mantid data structures. A custom interface for visualization can be started within Mantid, creating a seamless environment for novice users not comfortable with the ParaView workflow.

This research at ORNL’s High Flux Isotope Reactor and Spallation Neutron Source was sponsored by the Scientific User Facilities Division, Office of Basic Energy Sciences, US Department of Energy.


Integrating generators EDSL's for Boost.Spirit X3 by Felipe Magno de Almeida, Owner, Expertise Solutions

Based on the presentation I made on C++Now 2015 for Developing EDSL's for Boost.Spirit V2, present the development of generators for Boost.Spirit X3 (next version of boost spirit) and how that can be used for higher abstraction EDSL's while, through template metaprogramming, create parsers and generators automatically from the same grammar, using CORBA format as an example, while dealing with endianness, alignment and asymmetric grammars. This work is based on the library mORBid (https://github.com/expertisesolutions/mORBid) and (https://github.com/expertisesolutions/giop).


3D Face Tracking and Reconstruction using Modern C++ by Patrik Huber, PhD student in computer vision, University of Surrey

In this talk, I will present my work in computer vision, namely landmark detection and 3D face tracking, and the two C++ libraries that were developed in the process. The first part of the talk will give an introduction to detecting facial landmark points and work through a hello-world code example that presents and uses the superviseddescent library, a cross-platform library for cascaded regression that can be used to solve problems like landmark detection or pose estimation. The second part of the talk will present an approach that uses the found landmarks from the first part to use a 3D face model to track a person's face. With the library presented in the process, we hope to make 3D models easier to use and more widespread in the community. Both libraries are designed to be lightweight and simple to use, and try to follow modern C++11/14 programming paradigms. The talk concludes with my views on code sustainability in academia and a wish list of standard library features for computer vision.


Using Spirit X3 to Write Parsers by Michael Caisse, Ciere Consulting

Parsing is a common problem in many domains. The complexity of using a library often pushes developers to ad-hoc solutions utilizing std::string manipulations, regular expressions, or nested if/switch statements. Most “quick hack” implementations are unmaintainable.

Spirit provides a Domain Specific Embedded Language (DSEL) that allows grammars to be described in a natural and declarative manner just like writing PEG or EBNF directly in your C++ code. X3 is the third major release of the Spirit library and improves both compile and run times while simplifying the much of the library.

In this tutorial session you will be introduced to Spirit X3, attribute parsing, and variety of tips to writing efficient and maintainable parsers. We will build a JSON parser during the session to illustrate techniques and usage of the library. This session is applicable toward anyone needing to parse data.


Boost Units Library for Correct Code by Robert Ramey, Proprietor, Robert Ramey Software Development

I will give a presentation on the Boost Units library.

This library implements a zero runtime facility for performing dimensional analysis checking and automatic units conversion on C++ expressions. I have found this indispensable for coding scientific programs involving a variety of complex physical units. The documentation of the Boost Units library is totally complete and accurate, but totally inpenetrable. I had to spend way too much time figuring out how to use this. By attending this meeting, you're going to avoid this pain and just get the benefit of simpler programs that contain fewer bugs.

CppCon 2015 Program Highlights, 8 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

C++ is not composed of only a language. It is also powerful librairies, helping us to get the best fonctionnalities.

The following interrelated CppCon 2015 talks tackle these issues and more (part 1).

In this post:

  • Case study: Evolving legacy code
  • Lessons in Sustainability: How to Maintain a C++ Codebase for Decades
  • CopperSpice: A Pure C++ GUI Library
  • Writing Great Libraries in 89 Easy Steps
  • Qt: modern user interfaces for C++

 

Case study: Evolving legacy code by Rachel Cheng (Software Engineer, F5 Networks) and Michael VanLoon (Principal Software Engineer, F5 Networks)

We will be presenting on the evolution of a legacy monitoring subsystem modernized to C++11 with enhanced interfaces and better programming techniques. The presentation will cover some abstracted example problem areas, the solutions, and talk about the strategy employed to modernize the code.


Lessons in Sustainability: How to Maintain a C++ Codebase for Decades by Titus Winters, Software Engineer, Google

Google maintains (we believe) the largest monolithic C++ codebase in the world with over 100M lines of C++ code. Early commits to this repository date back to the late 1990s. About 4000 engineers submit at least one change in C++ every week. We’ve learned a few things about what it takes to maintain a codebase at this scale.

In this talk I’ll present some of the lessons we’ve learned over the years with respect to policies, technology, education, design, and maintenance of a long-lived monolithic codebase.


CopperSpice: A Pure C++ GUI Library by Barbara Geller and Ansel Sermersheim, Co-Founders, CopperSpice

CopperSpice is a collection of cross platform GUI libraries derived from Qt 4.8. Our libraries use current C++11 technology to implement Reflection, without requiring moc (a code generator) or any preprocessing. We will discuss what Reflection is, how this technology can be used, and why it can be difficult to implement.

The focus of this presentation is to show the core implementation of CopperSpice. Source code from CopperSpice will be shown to explain how we implemented Reflection using pure C++11. We will also demonstrate small samples of code which use the CopperSpice libraries.

Technologies covered in this presentation will include templates, variadic templates, and template specialization.

No prior knowledge of CopperSpice or Qt is required. A working knowledge of templates in C++11 would be helpful.


Writing Great Libraries in 89 Easy Steps by Zach Laine, Sr. Programmer, Nvidia

Writing code that does what you want it to do, correctly and efficiently, is hard. Doing so when you don't even know yet what you want the code to do yet is quite a bit harder. Yet this is the job of a library writer -- the users of a library may have a very different use case from that of the original author.

How do library writers develop correct and efficient APIs that are also:

- easy to use correctly - hard to use incorrectly - highly reusable - gracefully interoperable with other code

This talk gives lots of practical advice and techniques for accomplishing those goals and more.


Qt: modern user interfaces for C++ by Milian Wolff, Software Engineer, KDAB (Deutschland) GmbH&Co KG

The C++ language evolved significantly in the recent past, and so did many frameworks and libraries in the big ecosystem surrounding it.

For twenty years now, Qt is being used on a multitude of platforms to create native looking, compelling graphical user interfaces.

It offers C++ libraries and tools for building desktop, mobile and embedded applications. Qt gives engineers APIs for developing using two dimensional controls, integrating 3D using OpenGL, embedding web content, as well as a new declarative domain-specific language called QML, which is extensible using C++. Qt is also much more than a UI toolkit and provides a multitude of helper libraries for various use-cases, such as localization, database access, XML and JSON parsing and much more.

During this talk, I will give an introduction to Qt and present its capabilities in how it can be utilized to write modern UIs using C++, both in 2D as well as 3D. Additionally, I will show how some of its features, like the integrated web engine or QML, can be leveraged to go beyond C++. While at it, I hope to clear up some outdated misconceptions about Qt and its relationship to standard C++ and the STL as well as Boost and other libraries.

Finally, I will present the KDE Frameworks, an open source collection of high quality, cross platform Qt libraries that are being used by the KDE Software Collection. KDE frameworks are to Qt as Boost is to the STL. Recent development makes it simpler than ever to use these libraries in external applications.

CppCon 2015 Call for Volunteers

cppcon-019.PNGCppCon is just 19 days away! The event has nearly 50 volunteers so far but there are still spots open. It's a great (and free) way to be part of the festival and take in the sessions.

Call for Volunteers

From the announcement:

If you would like to attend CppCon 2015, see great C++ content, and meet our speakers and attendees, but a week’s registration doesn’t fit your time or money budget, consider volunteering.

We are looking for volunteers to help run the conference. We need people to help assemble registration packets and badges, register attendees, assist speakers with Audio/Video, and in general be on hand to make things run smoothly. In exchange, we’ll see to it that you’ll spend at least half of your time in sessions. It would be great if you could join us for the whole week, but if you can only make it for one or two days, we can work with that. This is a particularly great opportunity for locals with an interest in C++. If you are interested or would like more information, please email volunteers@cppcon.org.

Announcing the Meeting C++ Workshop Day!

I finally can announce the Meeting C++ Workshop day on Dec. 3rd in front of the Meeting C++ Conference:

Announcing the Meeting C++ Workshop Day!

by Jens Weller

From the article:

For the first time ever, I do organize a Workshop Day in front of Meeting C++! This is going to be a fun day giving you the knowledge of either C++ in embedded or parallelism.

While some details are still in the making, I already can announce that the speakers of the parallelism workshop are Thomas Heller, Boris Schäling and Michael Wong! The embedded workshop will feature a hands on session from KDAB "Creating HMI for embedded devices with C++ and Qt/QML" by Tobias Koenig.

...

CppCon 2015 Call for Lightning Talks

cppcon-024.PNGCppCon 2015 is the largest community gathering for the breadth and depth of modern C++. If you haven't registered yet, now's a great time.

It's not just about listening to the over 100 talks by speakers who are world experts in their fields -- it's also about the interaction between attendees. Here's another part of that, in today's news:

CppCon 2015 Call for Lightning Talks

From the announcement:

The response to last year’s Call for Lightning Talks was so strong that this year we are adding a second evening session, so plan on joining us for the fun on Tuesday and Wednesday evenings.

Lightning talks are 5 or 15 minutes talks on any topic that will be interesting to C++ programmers. Expect fast paced fun with talks that are funny or intriguing from speakers at all experience levels.

If you’ve never seen a lightning talk before checkout some of last year’s on our YouTube channel. They cover a single topic and they start with the good stuff and make a point. Anyone can do one, but be sure to practice because 5 minutes goes by incredibly fast and 15 minutes isn’t much easier. If there’s one technique you wish everyone knew, one little known fact that should be well known, one tool that makes your life easier every day, or a collection of little things that you can fit into 5 or 15 minutes, you can propose a lighting talk, and you should.

Anyone can submit a talk, you don’t need to be a conference speaker (or even a registered attendee). We are looking for talks from experienced speakers, but also new speakers and students. To submit a talk, just email open-content@cppcon.org and tell us what you want to talk about, what length you need (5 or 15 minutes), and a little bit about yourself (one sentence is fine). Even if you don’t plan to submit, plan to attend, it’s sure to be fun!

CppCon 2015 Program Highlights, 7 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

One of C++ selling point is the performance it allows, while still offering a good hardware abstraction. It enables not only fast programs, it enables efficient ones.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Faster Complex Numbers
  • C++ Coroutines - a negative overhead abstractions
  • High-performance, async-only and monadic future<T>
  • constexpr: Introduction and Applications
  • The Birth of SG14: better C++ support for Games Developers with Low latency needs

 

Faster Complex Numbers by André Bergner, Lead Developer Traktor, Native Instruments

Complex numbers are an important tool from mathematics enabling many problems to be written in a more generic form. The C++ standard library comes with an implementation to work with complex numbers in a natural way.

Motivated by useful real world examples from theoretical physics and audio dsp I will discuss benchmarks of std::complex and demonstrate how alternative implementations, naïve or advanced ones based on expression templates, outperform std::complex and can compete with hand-crafted C code (depending on compiler and std lib). A quick introduction to expression templates will be provided.


C++ Coroutines - a negative overhead abstractions by Gor Nishanov, Principal Software Design Engineer, Microsoft

C++ coroutines are one of the few major features that may land in C++17. We will look at the current standardization status, available experimental implementations and develop a small coroutine adapter over raw C networking APIs that will beat hand-crafted state machine in performance.


High-performance, async-only and monadic future<T> by Travis Gockel, Senior C++ Pirate, SolidFire

std::future provides us a mechanism for asynchronous communication between a provider and receiver. However, the C++14 standard does not allow for actual asynchronous programming, as the only ways to interact with an std::future are blocking calls. The proposed then helps, but the interface is awkward and can be extremely slow when handling exceptions. Here, I will talk about completion a high-performance, async-only and monadic alternative to std::future and how it is used at SolidFire.


constexpr: Introduction and Applications by Scott Schurr, C++ Developer, Ripple Labs

I'm excited about constexpr. It's probably my favorite C++11 feature and it's gotten even better with C++14. This talk will introduce constexpr to the uninitiated. We'll start with C++11 and continue into the improvements introduced with C++14. We'll look into useful ways to think about constexpr code. We'll also cover some tips and tricks with writing constexpr code.

But when I talk to other developers about constexpr they seem puzzled. What sorts of useful computations can the compiler possibly do before runtime?

I'd like to take this session to explore some of the capabilities that constexpr brings to the table. We'll look at compile-time parsing, floating-point computations, and containers. We'll also talk about motivations for computing these at compile time.


The Birth of SG14: better C++ support for Games Developers with Low latency needs by Nicolas Guillemot (Graphics Software Engineer, Intel), Sean Middleditch (Lead Server Engineer, Wargaming Seattle, Inc.) and Michael Wong

C++ is paramount for games development, and low-latency real-time applications everywhere. But has it recall improved since C++98/03? What features in C++ 11/14 has helped, and what else do we still need from C++ 17/22? In last year's CPPCon, there was clearly demand for even better support for this community as evidenced by the large number of games submission and an impromptu BoF.

But this industry has a demanding schedule and cannot freely attend ISO C++ standard meetings. So when the prophet cannot go to the mountain, the mountain has decided to come to the prophet!

This year, we like to announce the formation of an official SG14 that will go where the community is, at CppCon 2015 will be an official SG14 meeting followed by an SG14 meeting at GDC 2015 hosted by Sony.

This talk will describe the initial findings of the unofficial real time google group https://groups.google.com/forum/#!forum/unofficial-real-time-cxx as described in: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4526.pdf where we considered improvements such as flat map, intrusive container, and other suggestions for better support for games development and low latency in ISO C++.

CppCon 2015 Program Highlights, 6 of N

The CppCon 2015 conference program has been posted for the upcoming September conference. We’ve received requests that the program continue to be posted in “bite-sized” posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

 

Programming is not all about creating softwares. It is also important to verify that the program works as expected. Tests are used for that.

The following interrelated CppCon 2015 talks tackle these issues and more.

In this post:

  • Test Driven C++ With Catch
  • Your Tests Are Terrible: Tales from the Trenches
  • Testing Battle.net (before deploying to millions of players)
  • Advanced Unit Testing in C++
  • The current memory and C++ debugging tools used at Electronic Arts

 

Test Driven C++ With Catch by Phil Nash

C++ has been notorious for being a second class citizen when it comes to test frameworks. There are plenty of them but they tend to be fiddly to set-up and ceremonious to use. Many of them attempt to follow the xUnit template without respect for the language environment they are written for. Catch is an attempt to cut through all of that. It is simple to get and simple to use - being distributed in a single header file - yet is powerful and flexible. Catch includes a number of innovations that make testing in C++ more natural - and fun - than ever before. This presentation introduces you to the unique approach that Catch brings to unit and integration testing - and how to use Catch to drive your design with TDD or BDD.


Your Tests Are Terrible: Tales from the Trenches by Titus Winters, Software Engineer, Google

Thousands of Google engineers have collectively written about 100,000 separate C++ test binaries in the last 15 years. Not all of those was a perfect test. In this talk we’ll focus on how to write good tests and adopt a good testing philosophy, with lots of examples of what not to do (and why).


Testing Battle.net (before deploying to millions of players) by Ben Deane, Principal Software Engineer, Blizzard Entertainment

Battle.net is the online service that runs Blizzard's games. As such, it is a large scale distributed system with many interacting parts and dependencies on various services and data. While developing Battle.net servers, I needed a way to isolate and test functionality that I was working on.

In this talk I will cover my experience designing for testability of components in a distributed system, and practical ways to structure classes and data to facilitate testing. I will also present my solution to the problem of testing my code for correctness, performance and scalability without having to deploy a full-scale environment and spin up a million clients.

 

Advanced Unit Testing in C++ by Matt Hargett 

This session goes in-depth into advanced techniques to isolate and unit test C++ classes, especially those in legacy code that isn't easy to change. This builds on the Pragmatic Unit Testing in C++ talk from last year, with live code examples of safe refactorings, injecting mock objects, and potential pitfalls across different platforms and toolchains.

 

The current memory and C++ debugging tools used at Electronic Arts by Scott Wardle, Senior Software Engineer, EA

Scott Wardle a senior software engineer Electronic Arts will talk about the current memory and C++ debugging setup and tools used in games.

PS4 and Xbox One have virtual memory and 64 bit address spaces, GPU and CPU are getting closer in the ability to work virtual memory. So our tools are getting better and better and closer to PCs. Most of a games memory goes towards art and level data like bitmap textures and polygon meshes. So artist and designer need to understand how much their data takes up. Giving them call stacks of memory allocations does not help. They want to know how big is a group of building is. Why is this group of building bigger than this one? Maybe this one has some animation data or one of the textures is too big. But there are 10,000s of objects built by 100s of people all around the world.