Events

CppCon Program Highlights, 15 of N: Standardization, and Domain Experiences

The CppCon 2014 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.

 

Finally, rounding out the conference program, we have five final talks to announce in this blog stream... the last, pending any late-breaking additions. The first two sessions are about C++ standardization, covering what the committee is doing now that C++14 has been approved, and what's coming next including well in advance of C++17. The final three are about using C++ in specific domains, ones that are not only interesting to hear about (from Cinder creative graphics in C++, to the very small with MIT/Harvard gene sequencing, to the very large of simulating the universe, no less) but also instructive for C++ developers in general as the sessions cover modern C++11/14 techniques and solutions that are broadly applicable across many other domains as well.

In this post:

  • The Committee Experience
  • What the committee did next!
  • Creative Coding with C++
  • Gamgee: A C++14 library for genomics data processing and analysis
  • Simulating the Universe using modern C++

 

The Committee Experience

What happens behind the closed doors of the ISO Standard Committee? And just how closed are they? The session collects some anecdotes and relates what it is like to get involved in the process of standardizing C++, from the perspective of someone attending their first meeting - me 10 years ago! - to now. We will hear some of the highs and lows along the way to C++11, some misconceptions of what might be involved, and get some idea of what happens during a typical standard meeting, and between. By the end you will have some idea of how the standard itself is actually formed, and hopefully spark the interest of folks who might be interested in getting involved themselves...

What the committee did next!

After inking 8 years to produce the C++11 standard (arguably 13) there was a feeling we should be able to produce new work faster, more incrementally. With the renewed interest in C++, we have more participation on the committee, and have looked to harness that enthusiasm in new ways. In the last 3 years we have spun up at least a dozen new study groups, and have 8 or mode Technical Specifications in various stages of development that we hope to ship over the next 12-24 months. So what are all these new groups and specifications about? Come to this session and get a vision of where C++ is headed in the immediate and short-term future.

Speaker: Alisdair Meredith, Bloomberg and Library Working Group chair. 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 project that would become C++11, and also fixed the contents of the original library TR. He is currently working on the BDE project, BloombergLP's open source libraries that offer a foundation for C++ development, including a standard library implementation supporting the polymorphic allocator model proposed for standardization.

 

Creative Coding with C++

Realtime graphics, computer vision, hardware hacking, and audio synthesis are just a few of the crafts that fall under the banner term of "creative coding". In this session we'll talk about some of the creative projects putting C++ in places you might not expect it - everywhere from the Smithsonian's permanent design collection to robotic Coca-Cola dispensers on California beaches. We'll look at a wide spectrum of projects ranging from those of the "maker" community to commercial work from full-time professionals earning their livings in advertising and design agencies. And finally we'll take a look at how you can use the C++ you already know to jumpstart your own creative coding projects using the open source toolkit Cinder.

Speaker: Andrew Bell, Technology Research Fellow, The Barbarian Group. Andrew Bell is a Technology Research Fellow working at the creative agency The Barbarian Group. He maintains Cinder, a C++ open source creative coding framework, as his full-time job. When he's not coding on Cinder he can be found doing everything from writing emails about Cinder to being asleep, and yet somehow he remains single. In his career he has also coded too much in other capacities, specifically for the visual effects companies The Mill and Method.

 

Gamgee: A C++14 library for genomics data processing and analysis

Our group has defined the standards for DNA and RNA sequencing data processing and analysis for disease research and clinical applications. In the last 5 years we have published our tools in the GATK (genome analysis toolkit) which is completely written in java. With the scaling of next generation sequencing and the immense amount of that needs to be processed we hit a performance wall and found ourselves limited by the language to make optimizations and rewrite the algorithms in a way that would conform better to modern hardware.

Enter Gamgee. A free and open source C++14 library that offers much of the functionality of the GATK framework with the performance necessary to scale to the hundreds of petabytes of todays complex diseases projects. We will show how the tools developed using the Gamgee library replaced legacy java GATK tools in the production pipeline of the Broad Institute. We will also talk about how the algorithms have changed to take advantage of the native libraries and modern hardware features such as SSE/AVX and GPUs.

Speaker: Mauricio Carneiro, Group Lead, Computational Technology Development, Broad Institute of MIT and Harvard. Dr. Carneiro leads the computational technology development team at the Broad Institute of MIT and Harvard. He has contributed to major advances in DNA sequencing analysis with compression algorithms, statistical methods, heterogeneous compute optimizations and a systematic approach to the institute's computational development, distribution and support. His team is also responsible for the evaluation of new sequencing technologies and has provided several methods and tools to handle new data types in the world of next generation sequencing through the Genome Analysis Toolkit (GATK). Dr. Carneiro joined the Broad Institute in December 2010 after completing a Ph.D. in computational biology from Harvard University. He holds two championships in the International Collegiate Programming Contest organized by the Association for Computing Machinery (ACM) in 2002 and 2003, respectively, and a Programming Excellence Award from the ACM Upsilon Pi Epsilon Society in 2003. In his previous life, he was a video game developer and has led the development of the world's first massive online location based multiplayer game: Alien Revolt.Website: http://www.broadinstitute.org/~carneiro/Twitter handle: @mauricinho

 

Simulating the Universe using modern C++

What is the link between C++11/14, parallelism and the open question of the origin of the accelerated expansion of the Universe ? Answer: numerical cosmology and all the techniques to make the best out of supercomputers to shed a new light on unsolved problem in physics. In this talk, I will present the numerical lessons coming from the Full Universe Run, a numerical experiment realized in 2012 on the entire Curie thin-nodes Supercomputer to simulate the evolution of cosmological structures during the last 13.7 billion years. I will focus on how this experiment has changed our view on software design in astrophysics and how we started to implement new approaches using C++11, template metaprogramming, constant expressions and std::thread in order to maximize both genericity and performance. I will also discuss optimization issues related to data locality, cache efficiency and spatial trees which are extensively used in our domain. I will also try to give some inputs on the cultural challenges raised by the introduction of C++11/14 in our domain. This talk will be concluded by thoughts on the needs of computational physicists and how C++17 may help us to solve some of the open problems we are currently facing.

Speaker: Vincent Reverdy, Ph.D. student, Observatory of Paris. Vincent Reverdy is a Ph.D. student in numerical cosmology at the Observatory of Paris. He studies the propagation of light according to general relativity in order to probe the unexplained accelerated expansion of the Universe. In this context, he is using supercomputing facilities on a daily basis and he develops scientific codes for these facilities, mainly in C++. He is working now on approaches based on template metaprogramming to make the best out of supercomputers and to facilitate the implementation of non-standard cosmological models. Since the Bristol committee meeting, he also follows and contributes to the online discussions on the evolution of C++.

CppCon Evening Panel Topics Confirmed—Boris Kolpackov

Announced this morning, as part of the free-and-open-to-all part of the CppCon program:

Evening Panel Topics Confirmed

by Boris Kolpackov 

From the announcement:

We have now confirmed details for the Monday [8:30pm], Wednesday [8:30pm], and Friday [2:00pm] panels:

Monday: "Meet the Authors"

Moderator: Chandler Carruth

Panelists: Ade Miller, Alex Allain, Kate Gregory, Pablo Halpern, Scott Meyers, Peter Sommerlad, Herb Sutter

Come to this panel to put your questions to many of the world’s top C++ published authors, and hear them discuss what they think is most important about C++ today. The CppCon 2014 program includes many of the world’s top C++ published authors, so we’re taking advantage of their being in town to bring them together in our opening panel for a discussion and Q&A session.

Wednesday: "Grill the Committee"

Moderator: Jon Kalb

Panelists: Chandler Carruth, Nevin Liber, Alisdair Meredith, Herb Sutter, Michael Wong

What would you like to know about how the C++ Standard happens? The panel is made up of members of the C++ Standards Committee and the audience asks what’s on their mind.

Friday: "Paying for Lunch: C++ in the ManyCore Age"

Moderator: Herb Sutter

Panelists: Jared Hoberock, Artur Laksberg, Ade Miller, Gor Nishanov, Michael Wong, Pablo Halpern

If you’re serious about efficient computation, from efficient battery-sipping apps on mobile devices to efficient use of compute cloud nodes, you need to know how to exploit the massive parallelism already available in all of today’s mainstream devices. Even small tablets and smartphones already contain multiple CPU/GPU cores and vector units. CppCon 2014 includes lots of talks about implementing such parallelism in C++ using existing products and techniques, and the standardization committee is actively working on standardizing several C++ extensions for concurrency and parallelism, including resumable functions, a Parallel STL, and transactional memory support. In this panel, we bring together several experts, including the primary authors of these products and standard specifications – in other words the who’s-who driving C++ parallelism forward – to discuss this topic across all devices and form factors, large and small.

CppCon Program Highlights, 14 of N: Parallel Computation on GPUs

The CppCon 2014 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.

 

In addition to other performance-focused CppCon talks posted yesterday, CppCon 2014 also has thorough coverage of a very specific form of high performance parallel code -- using GPUs for general-purpose computation (aka GPGPU). This is important because every desktop machine and notebook, and nearly every tablet and smartphone, contains not only multiple CPU cores and vector units, but also a "compute-class" GPU -- these three forms of hardware parallelism are part of the mainstream hardware platform for the foreseeable future in all form factors. If you have a computationally intensive app or an app that could benefit from faster local processing, and you're not exploiting the GPU, you're leaving performance (and battery life) on the table and should be sure to attend these sessions.

In this post:

  • Writing Data Parallel Algorithms on GPUs
  • Another fundamental shift in Parallelism Paradigm? OpenMP 4.0 for GPU/Accelerators and other things
  • Introduction to C++ AMP (GPGPU Computing)

 

Writing Data Parallel Algorithms on GPUs

Today most PCs, tablets and phones support multi-core processors and most programmers have some familiarity with writing (task) parallel code. Many of those same devices also have GPUs but writing code to run on a GPU is harder. Or is it?

Getting to grips with GPU programming is really about understanding things in a data parallel way. This talk will look at some of the common patterns for implementing algorithms on today's GPUs using examples from the C++ AMP Algorithms Library. Along the way it will cover some of the unique aspects of writing code for GPUs and contrast them with a more conventional code running on a CPU.

Speaker: Ade Miller. Ade Miller writes C++ for fun. He wrote his first N-body model in BASIC on an 8-bit microcomputer 30 years ago and never really looked back. Recently, he's written two books on parallel programming with C++; "C++ AMP: Accelerated Massive Parallelism with Microsoft Visual C++" and "Parallel Programming with Microsoft Visual C++". Ade spends the long winters in Washington contributing to the open source C++ AMP Algorithms Library and well as a few other projects. His summers are mostly spent crashing expensive bicycles into trees.

 

Another fundamental shift in Parallelism Paradigm? OpenMP 4.0 for GPU/Accelerators and other things

Another fundamental shift in Parallelism Paradigm? Sure. When was the last time you heard that before?

But seriously, as the number of threads/cores continue to increase, there is a growing pressure on applications to exploit more of the available parallelism in their codes, including coarse-, medium-, and fine-grain parallelism. OpenMP has been one of the dominant shared-memory programming models but is evolving beyond that with a new Mission Statement (no, really!) making it well suited for exploiting medium- and fine-grained parallelism.

OpenMP 4.0 exhibits many of these features to support the next step in both consumer, high-performance and exascale computing, with one of the world's first programming model for high-level language support for GPU/Accelerators and vector SIMD across not 1 but 3 high-level languages: C++, C, and that language whose name we dare not speak, but starts with F.

Speaker: Michael Wong, OpenMP CEO/Architect, IBM/OpenMP. Anything including C++, Transactional Memory, Parallel Programming, OpenMP, stars, tennis, travel, and the best food.

 

Introduction to C++ AMP (GPGPU Computing)

Meet C++ AMP (Accelerated Massive Parallelism), an abstraction layer on top of accelerators such as GPUs. In its current version it allows you to run code on any DX11 GPU, independent of the vendor, and it will even distribute workload across GPUs of different vendors simultaneously. C++ AMP was originally designed by Microsoft but is now an open standard. C++ AMP can deliver orders of magnitude performance increase with certain algorithms by utilizing the GPU to perform mathematical calculations. This talk will give a high level overview of what C++ AMP is and what it can do for you. It is time to start taking advantage of the computing power of GPUs!

Speaker: Marc Gregoire, Nikon Metrology. Marc Gregoire has worked as a software engineer consultant for 6 years for Siemens and Nokia Siemens Networks on critical 2G and 3G software running on Solaris for telecom operators. This required working in international teams stretching from South America and USA to EMEA and Asia. Now, Marc is working for Nikon Metrology on 3D scanning software. Marc is the author of "Professional C++, Second and Third Edition", published by Wiley/Wrox, is the founder of the Belgian C++ Users Group (www.becpp.org), and has written a number of articles which have been published on CodeGuru and/or his personal blog. He also creates freeware and shareware programs that are distributed through his website at www.nuonsoft.com, and maintains a blog on www.nuonsoft.com/blog/.

CppCon Program Highlights, 13 of N: Performance, Performance, and Parallel Performance

The CppCon 2014 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.

 

Many CppCon talks touch on efficiency and performance optimization, with good reason. Here are five specific talks that focus on this topic, from algorithmic efficiency to full-throttle performance on modern parallel hardware, and how support for the latest mainstream architectures is coming quickly to a standard near you. As always, these talks are by Those Who Know and Those Who Do -- several of these speakers are personally leading the work on high performance and parallelism at major C++ compiler companies and in the C++ standards process.

In this post:

  • Efficiency with Algorithms, Performance with Data Structures
  • It's About Time
  • Parallelism in the Standard C++: What to Expect in C++ 17
  • Overview of Parallel Programming in C++
  • Decomposing a Problem for Parallel Execution

 

Efficiency with Algorithms, Performance with Data Structures

Why do you write C++ code? There is a good chance it is in part because of concerns about the performance of your software. Whether they stem from needing to run on every smaller mobile devices, squeezing the last few effects into video game, or because every watt of power in your data center costs too much, C++ programmers throughout the industry have an insatiable desire for writing high performance code.

Unfortunately, even with C++, this can be really challenging. Over the past twenty years processors, memory, software libraries, and even compilers have radically changed what makes C++ code fast. Even measuring the performance of your code can be a daunting task. This talk will dig into how modern processors work, what makes them fast, and how to exploit them effectively with modern C++ code. It will teach you how modern C++ optimizers see your code today, and how that is likely to change in the coming years. It will teach you how to reason better about the performance of your code, and how to write your code so that it performs better. You will even learn some tricks about how to measure the performance of your code.

Speaker: Chandler Carruth, Google and Member of Board of Directors, Standard C++ Foundation. Chandler Carruth leads the Clang team at Google, building better diagnostics, tools, and more. Previously, he worked on several pieces of Google’s distributed build system. He makes guest appearances helping to maintain a few core C++ libraries across Google’s codebase, and is active in the LLVM and Clang open source communities. He received his M.S. and B.S. in Computer Science from Wake Forest University, but disavows all knowledge of the contents of his Master’s thesis. He is regularly found drinking Cherry Coke Zero in the daytime and pontificating over a single malt scotch in the evening.

 

It's About Time

This session will build up your mental model about time at the very small scale.

We'll examine progressively smaller units of time and what modern computers can accomplish in these units of time. We'll put these in perspective with human factors on these scales. For example, we'll consider how fast a computer must respond in order for a human to consider it "instantaneous."

Then we'll build up our mental model of how expensive it is for us to use specific data types, containers, and operations in our code.

We'll close by looking at why and how we should measure, always measure.

Speaker: Jon Kalb. Jon has been programming in C++ for over twenty years. During the last two decades he has written C++ for Apple, Dow Chemical, Intuit, Lotus, Microsoft, Netscape, Sun, Yahoo! and some less well­‐known companies. He taught C++ in the graduate school at Golden Gate University for three years and is a founding moderator of the Boost‐User and Boost‐Interest mailing lists. Jon is active in the Silicon Valley chapter of the ACCU and programs the C++ track at the Silicon Valley Code Camp. Jon blogs at http://slashshlash.info@_JonKalb JonKalb on G+ LinkedIn

 

Parallelism in the Standard C++: What to Expect in C++ 17

It is 2014 and parallel programming has entered the mainstream. No longer is it the domain of the few highly trained experts. The tools available in the C++ today make parallelism accessible - if not yet easy - to average developers.

However, writing efficient cross-platform parallel code in C++ is still hard. The standard constructs available in C++ 11/14 are too basic and too low-level. More advanced tools exist, but most are either vendor-specific or don't work on all platforms.

In this presentation, we'll talk about the joint effort spearheaded by several members of the ISO C++ Committee to bring parallelism into the C++ Standard Template Library. The project known as the "Parallel STL" aims to bring muliticore and SIMD parallelism into the next revision of the ISO C++ Standard.

Speaker: Artur Laksberg, Microsoft. Artur Laksberg leads the Visual C++ Libraries development team at Microsoft. His interests include concurrency, programming language and library design, and modern C++. Artur is one of the co-authors of the Parallel STL proposal; his team is now working on the prototype implementation of the proposal.

 

Overview of Parallel Programming in C++

Parallel programming was once considered to be the exclusive realm of weather forecasters and particle physicists working on multi-million dollar super computers while the rest us relied on chip manufacturers to crank out faster CPUs every year. That era has come to an end. Clock speedups have been largely replaced by having more CPUs on a chip. Your typical smart phone now has 2 to 4 cores and your typical laptop or tablet has 4 to 8 cores. Servers have dozens of cores and supercomputers have thousands of cores.

If you want to speed up a computation on modern hardware, you need to take advantage of the multiple cores available. This talk is provides an overview of the parallelism landscape. We'll explore the what, why, and how of parallel programming, discuss the distinction between parallelism and concurrency and how they overlap, and learn about the problems that one runs into. We'll conclude with an overview of existing parallelism technologies in C++ and the future directions being considered for parallel programming in standard C++.

 

Decomposing a Problem for Parallel Execution

So you want to speed up your computation using multicore parallel execution and you've picked a parallelism framework. What now? Parallelism frameworks give you the tools you need, but they don't actually parallelize the code; that's your job. To take advantage of parallel hardware, you must decompose your computation into tasks that can be computed in parallel. In this session, I'll present a real-world problem (the n-bodies problem) and guide you through several different ways in which it can be decomposed for parallel execution. We'll look at how to achieve scalability, resolve data races, and avoid negative multi-core cache effects. At the end of this session, you should have a conceptual understanding of parallel programming fundamentals that can be applied to a wide range of problems using a variety of frameworks.

Speaker: Pablo Halpern, Parallel Programming Languages Architect, Intel. Pablo Halpern has been programming in C++ since 1989 and has been a member of the C++ Standards Committee since 2007. He is currently the Parallel Programming Languages Architect at Intel Corp., where he coordinates the efforts of teams working on Cilk Plus, TBB, OpenMP, and other parallelism languages, frameworks, and tools targeted to C++, C, and Fortran users. Pablo came to Intel from Cilk Arts, Inc., which was acquired by Intel in 2009. During his time at Cilk Arts, he co-authored the paper "Reducers and other Cilk++ Hyperobjects", which won best paper at the SPAA 2009 conference. His current work is focused on creating simpler and more powerful parallel programming languages and tools for Intel's customers and promoting adoption of parallel constructs into the C++ and C standards. He lives with his family in southern New Hampshire, USA. When not working on parallel programming, he enjoys studying the viola, skiing, snowboarding, and watching opera. Twitter handle: @PabloGHalpern

CppCon Free Friday, Final Plenary Session—Boris Kolpackov

CppCon is less than three weeks away! Announced today:

Free Friday, Final Plenary Session

by Boris Kolpackov 

From the announcement:

We previously announced that CppCon 2014 evening content (Mon-Thu 8:30pm onward) and early morning breakfast sessions (Tue-Fri 8:00-8:45) do not require registration. In addition, this year, we are making the whole of Friday free as well. If you’re in the Seattle area, you’ll want to swing by and enjoy the Friday end-note plenary session and the final panel with us. And the final plenary session will be:

Herb Sutter: "Back to the Basics! Essentials of Modern C++ Style"

This talk revisits basic questions, such as how to declare and initialize a variable, how to pass a value to a function, how to write a simple loop, and how to use smart pointers, in the light of experience with C++11 and the latest C++14 refinements. This involves examining auto, rvalue references, range-for loops, uniform initialization, lambda expressions, unique_ptr and shared_ptr, and more.

CppCon 2014 Volunteers Wanted—by Boris Kolpackov

Especially if you're local to the Seattle area, this is a great way for students and others to be part of CppCon.

CppCon 2014 Volunteers Wanted

by Boris Kolpackov

Of course if you're a student you also have the option of the discounted Student registrations that let you attend the whole thing without the distraction of occasionally holding up signs and untangling A/V cords -- some Student registrations are still available. But there's also fun in being part of running things.

From the announcement:

If you would like to attend CppCon 2014, 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 local students with an interest in C++. If you are interested or would like more information, please email volunteers@cppcon.org.

CppCon Program Highlights, 12 of N: Advanced Meta Techniques

The CppCon 2014 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.

 

No C++ conference would be complete without coverage of advanced techniques that enable high performance, expressive power, or both at the same time. Here is a selection of some of the advanced topics that will be presented this year at CppCon.

In this post:

  • Practical Functional Programming in C++
  • Practical Type Erasure
  • Pragmatic Type Erasure: Solving Classic OOP Problems with an Elegant Design Pattern
  • Polymorphism with Unions
  • Modern Template Metaprogramming: A Compendium

 

Practical Functional Programming in C++

To the untrained eye, pure functional programming may appear to be out of place in our traditionally imperative C++ world. However, the functional paradigm has become increasing prominent in production C++ codes, especially when implementing asynchronous execution.

This talk is intended as a primer for attendees who are either unfamiliar with functional programming or have doubts its practical uses in modern C++. The following topics will be covered:

* Functions as First-Class Entities (function objects, lambdas, Callable, std::function) * Higher Orders (, composition/bind) * Functions with Clear Inputs/Outputs (pure functions - side effect free) * Monads and Parallelism (future/promise, async)

Examples from different sectors of industry/academia will be presented throughout.

No prior functional programming knowledge will be needed. While this talk will cover some theory, coverage of non-C++ programming languages will be minimal. The focus of this talk will be the application of theories from FP to C++, not FP itself.

Speaker: Bryce Adelstein-Lelbach. Bryce Adelstein-Lelbach is a researcher at the Center of Computation and Technology (CCT) at Louisiana State University. He works on the HPX runtime system and his research interests include parallel and distributed programming frameworks for scientific applications. He has been working on HPX for over a year now.

 

Practical Type Erasure

Type erasure looks like a neat concept, but what are its real life uses? This talk will briefly show the inner workings of type erasure, and demonstrate a real working implementation of a configuration system from public domain production code. Uses and pitfalls of type erasure will also be covered.

Speaker: Cheinan Marks, Spiral Genetics. As an engineer with a chemical engineering background, Cheinan is interested in practical code and wants to take the latest advances both in science and programming and use them in real life working code along with applying engineering principles to software development. Cheinan is a senior developer at Spiral Genetics, Inc. in Seattle.

 

Pragmatic Type Erasure: Solving Classic OOP Problems with an Elegant Design Pattern

There are numerous, serious OOP design problems that we have all encountered in production code. These include, among others: - object lifetime/ownership - how to make classes from different class hierarchies conform to a common interface - writing classes that can present multiple interfaces - separating interface and implementation - how to write virtual functions so that subclasses override them properly - the virtual inheritance "diamond of death"

Proper use of type erasure can mitigate, or outright eliminate, these and other problems, without sacrificing performance.

This talk will cover the OOP design problems above and more, and will cover hand-rolled and library-based type erasure approaches that solve those problems. Performance metrics will be provided for the different approaches, and source code will be available after the talk.

Speaker: Zach Laine, Senior Programmer, Intific. Zach Laine has been using C++ in industry for 11 years, focusing on data visualization, numeric computing, games, generic programming, and good library design. He finds the process of writing bio blurbs to be a little uncomfortable.

 

Polymorphism with Unions

Using tagged unions to create families of polymorphic types that are more flexible and more easily maintained than those formed with inheritance alone. We demonstrate the design pattern and implementation techniques of sum types with examples from a compiler development project. We also examine the technique's impact on project management and engineering and on algorithm design, including the role of type switches, value type semantics, and multiple dispatch polymorphism.

Speaker: Jason Lucas, Architect, Orly Atomics. Jason Lucas is an alum of the Microsoft Visual C++ team and has been writing extensively in C++ since the early 90s. He is the architect for Orly, an open source, large-scale, distributed, transactional, and consistent graph database (all in C++) which also includes a compiler for distributed programs.

 

Modern Template Metaprogramming: A Compendium

Template metaprogramming has become an important part of a C++ programmer's toolkit. This talk will demonstrate state-of-the-art metaprogramming techniques, applying each to obtain representative implementations of selected standard library facilities. Along the way, we will look at void_t, a recently-proposed, extremely simple new candidate whose use has been described by one expert as "highly advanced (and elegant), and surprising even to experienced template metaprogrammers."

Speaker: Walter E. Brown . With broad experience in industry, academia, consulting, and research, Dr. Walter E. Brown has been a C++ programmer for over thirty years, joining the C++ standards effort in 2000. Among numerous other contributions, he is responsible for introducing such now-standard C++ library features as cbegin/cend and common_type as well as headers and , and has significantly impacted such core language features as alias templates, contextual conversions, and variable templates. He conceived and served as project editor for the International Standard on Special Mathematical Functions in C++. When not playing with his grandchildren, Dr. Brown is an Emeritus participant in the C++ standards process, with several more core and library proposals under consideration. He was recently appointed an associate project editor for the C++ standard itself.

CppCon 2014 Call for Lightning Talks—Boris Kolpackov

cppcon-025.PNGMuch of the CppCon content is outside session hours, including lightning talks. Details announced today on cppcon.org:

CppCon 2014 Call for Lightning Talks

by Boris Kolpackov

From the announcement:

On Tuesday, the evening program will include Lightning Talks -- 4 talks of 15 minutes and 4 talks of 5 minutes. Expect fast paced fun with talks that are funny or intriguing from speakers at all experience levels.

If you’ve never seen a lighting talk before, check out this example (it’s just 4 and a half minutes long and funnier if you know Ruby or JavaScript) or search you tube for “lightning talk” to see a variety of examples. 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.

We’ll be selecting the 8 sessions on Monday, Day 1 of the conference, from submissions we receive before and during the conference. Just email open-content@cppcon.org and tell us what you want to talk about, what length you need and a little bit about yourself. Even if you don’t plan to submit, plan to attend, it’s sure to be fun!

CppCon Program Highlights, 11 of N: C++11/14 Design

The CppCon 2014 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.

 

Now that we have Modern C++ in the form of C++11 and C++14, how does this change the guidance for authoring types and techniques for using them in popular patterns? In this set of talks, world-class speakers and trainers address these issues.

In this post:

  • The Canonical Class
  • The Implementation of Value Types
  • Accept No Visitors

 

The Canonical Class

It was a simpler time. A period in which every college student and learn-C++-in-a-weekend duffer could write a class with the assuredness that it would behave as desired when assigned and copied. There was a check list. Complete the checklist, add some domain specific behaviour, bake in the regression oven, and you were done.

Enter C++11 with its fancy new use of the delete keyword, additional applications of explicit, rvalue references, and some perfect forwarding. How are you to write a "simple" class? Should you include a swap? What does movable mean and are there expected semantics? When is the noexcept specifier used?

During this session we will explore the boilerplate of a C++11 class. The session will touch on rvalue references, move semantics, perfect forwarding, explicit, noexcept, initializer lists, and more as it applies to producing the desired semantics for our classes and structs.

Speaker: Michael Caisse, Ciere Consulting. Michael Caisse has been crafting code in C++ for nearly 25-years. He is the owner of Ciere Consulting which provides software consulting and contracting services, C++ training, and Project Recovery for failing multidisciplinary engineering projects. :: ciere.com

 

The Implementation of Value Types

Predefined value types are central to C++ efficiency and robustness. More importantly, C++ provides mechanisms that enable programmers to create high-quality value types, programmers are not limited to the small predefined value types. However, implementing a high-quality type requires attention to several problems, among them portability, representation, efficient copying, efficient parameters, aliasing, constant initialization, and constant expressions. We present the issues and several approaches to implementing high-quality value types.

Speaker: Lawrence Crowl. Dr. Lawrence Crowl has expertise in programming languages, compilers, and parallel programming. He has been mixing threads with C++ for twenty-five years and is a major contributor to C++11. His goal is to achieve both high quality and high performance programs.

 

Accept No Visitors

Visitor Design Pattern was an attempt to overcome a limitation of object-oriented languages -- inability to retroactively introduce new polymorphic functions. While it was quite efficient in providing extensibility of functions, it was never truly retroactive, easy to teach, use or maintain, and it achieved this at the cost of hindering extensibility of classes, introduction of control inversion and requiring tons of boilerplate code to be written. Visitor Design Pattern is a workaround, not a solution to the problem and in this talk I would like to discuss a more elegant yet as efficient solution in the form of a Match statement. We will look at several use-cases for the Visitor Design Pattern, their encoding using both approaches and ultimately their advantages and disadvantages.

Speaker: Yuriy Solodkyy. Yuriy Solodkyy received his PhD from Texas A&M University, while working under the supervision of Dr. Bjarne Stroustrup on the ways to simplify the analysis of C++ programs. He is currently trying to materialize some of those ideas while working in the Visual C++ team at Microsoft. His research interests include C++, generic programming, and abstract interpretation. More information about Yuriy can be found at his university page at https://parasol.tamu.edu/~yuriys/. Website: https://parasol.tamu.edu/~yuriys/