Solaris Studio 12.4 Beta update 7/2014

The Oracle Solaris Studio 12.4 Beta, Update 7/14 release is now available for download.

This update includes new features and enhancements based on current user feedback during the Beta program. We look forward to getting additional feedback!

Feature highlights in this update include:

  • Additional support for C++11, including full support for Lambda expressions and initializer lists
  • Updated Performance Analyzer with a completely redesigned UI that automatically saves your configuration settings and allows you to save custom configurations, new Heap data view, new metrics to track IPC/CPI, and call-tree enhancements
  • Updated Code Analyzer with performance and memory usage improvements
  • OpenMP 4.0 implementation tuned for the latest Oracle systems
  • And many more features, enhancements and fixes in response to user feedback

Learn More and explore resources including the What's New guide and the latest videos and articles.

CppCon Bonus Talks: C++ at Facebook -- Boris Kolpackov

cppcon-053.PNGIn the CppCon spirit of talks "by the C++ community for the C++ community" given by Those Who Know and Those Who Do in some of the leading code bases in our industry, we're very pleased to relay this just announced on CppCon.org:

Bonus Talks: C++ at Facebook

by Boris Kolpackov

From the announcement:

We left a few slots in the CppCon 2014 program for what we call “invited talks.” They are used to fill in important but otherwise under-represented topics (such as game development, mobile and embedded systems, etc) or generally interesting and unusual uses of C++. Today we are ready to announce the first two invited talks which are on Facebook’s heavy use of C++ in their server infrastructure:

Marcelo Juchem: "Meta Techniques: Heterogeneous Polymorphism and Fast Prototyping at Facebook"

As data driven systems evolve there’s an ever growing demand for bringing new functionality into existing systems in an efficient, maintainable and least intrusive manner. When implementing features with different semantics or interfaces, virtual inheritance requires a compromise between design simplicity and performance. This implies a need for new techniques to achieve heterogeneous polymorphism efficiently. With C++11 and 14, type lists, type maps and variants can now be trivially implemented by the initiated. Facebook moves fast so we quickly adopted the new standards to further explore the capabilities of the type system. This talk demonstrates some meta-programming techniques like reflection and compile-time built structures to achieve heterogeneous polymorphism and fast prototyping.

Speaker’s bio: Marcelo Juchem is a Software Engineer at Facebook, working in stream processing and spam fighting systems. Fascinated by template meta-programming, he sees the C++ compiler as a powerful type juggler and programmable code generator. Such capabilities allow the combinatoric composition of types into efficient abstractions, reducing code duplication and enabling non-library writers to design logical components interaction and semantics rather than deal with low level details.

Drew Paroski: "C++@Facebook: How HHVM Uses Modern C++ for Fun and Profit (Both Literally)"

After an overview of HHVM’s architecture and history, this talk delves into what made C++ the language of choice when writing VMs and execution engines, including performance, benefits over assembly, and enabling C++ to call into JIT’d code. We cover the importance of control over ‘unsafe’ details: for memory layout, unions, casting, and bit-stealing. HHVM found important wins from being able to ensure that certain structures (Classes) are allocated in low-memory (i.e. addresses that fit within 32-bits) which allowed use of 32-bit immediates in machine code and 32-bit fields in objects. Also, being able to have fine control over memory allocation enabled having “huge pages”, a feature exposed in Linux (and other OSes) that allowed using fewer iTLB entries which gave a significant boost for Facebook’s PHP codebase. The talk will also mention some things that got in the way and how they were dealt with. Some were language features, such as virtual functions, member pointers. Before move constructors and rvalues were introduced in C++11, there were performance issues with returning smart pointers. While these were things that got in the way, it’s a testament to C++’s flexibility that there were always ways to work around these things in a stable fashion.

Speaker’s bio: Drew Paroski is a Software Engineer at Facebook and a co-creator of the HipHop Virtual Machine (HHVM) and the Hack programming language. Among other things, Drew is the primary designer and implementor of HHVM’s virtual instruction set architecture and Hack’s Collections framework, and he was a core contributor to HHVM’s JIT compiler in the early days of the project. Before Facebook, Drew worked at Microsoft helping improve the performance of Microsoft’s virtual machine for .NET languages (C#, VB.NET, F#, and more) known as the Common Language Runtime. Drew has been coding in C++ for over 10 years, and he enjoys designing and optimizing complex low-level systems.

Exception-Safe Coding in C++ -- Jon Kalb

If you haven't sent a colleague to this site lately, why not send someone there this week?

Exception-Safe Coding in C++

by Jon Kalb

Safe usage of exceptions is a non-trivial problem that the industry has struggled with for the better part of two decades. If you have fear, uncertainty, or doubt about exception safety or just want to see the best practices for using exceptions in C++, this session is for you. We’ll start with “What is the problem we are trying to solve?” and discuss alternatives, acknowledge the challenges associated with exception usage, and cover some well-meaning but misguided attempts at safety. I will then present a set of guidelines that are the basis for safe exception usage and solid implementation techniques, including how to transition from an exception-unsafe legacy code base.

When we are finished you will know how to produce code that is easier to write, easier to understand, faster, and 100% robust in the face of exceptions.

... "To say that I learned a lot from that video would be an understatement! I LOVED the talk and I really think you need to either write a book about this or at least have an article/blog." -- Abi Ullattil

You and your colleagues can also enjoy a live and interactive updated version of this talk at CppCon this September. CppCon 2014 will feature an updated and interactive version of this talk, along with some 100 other high-quality sessions about C++ across many domains, from mobile devices and web development, to games and embedded systems (including the Mars Rover), to Parallel STL and TMP.

Inline Functions -- Andrzej KrzemieĊ„ski

Today from Andrzej:

Inline Functions

by Andrzej Krzemieński

From the article:

Inlining functions can improve or worsen your program’s performance (however you define ‘performance’). It has been described in detail in Herb Sutter’s GotW #33. Compiler can decide to inline your function, even if it was not declared inline and conversely: it can decide not to inline it even if it is declared inline. So, you might be tempted to think that declaring functions as inline has no useful portable meaning in C++. This is not so. I have found inline functions useful, and its usefulness has nothing to do with inlining...

A Cheat Sheet for HTTP Libraries in C++ -- Vladimir

cheat-sheet.PNGRecently on Kukuruku:

A Cheat Sheet for HTTP Libraries in C++

By Vladimir

From the article:

... I decided to make a cheat sheet with examples of HTTP requests in C++ using different libraries. I guess Kukuruku is the best place for keeping such cheat sheets.

We’re going to take a look at the following libraries:

  • WinInet
  • WinHttp
  • Casablanca
  • Qt
  • POCO
  • wxWidgets
  • Boost.Asio
  • libcurl
  • neon
  • .NET (С++/CLI)
  • IXMLHTTPRequest
  • HappyHttp
  • cpp-netlib

Making the Most of C++11/14 -- Sasha Goldshtein

New on Lanyrd:

Making the Most of C++11/14 (slides)

by Sasha Goldshtein

The C++11 standard is already behind us, and C++14 is just around the corner. With a huge variety of language features such as lambdas, rvalue references, auto and decltype, and variadic templates, it's easy to get lost in C++. In fact, it often seems like a completely new and foreign language. In this workshop we will look at the most important language features that improve system performance and developer productivity, with a glimpse towards what C++14 will bring. We will make the most of Visual C++ 2013 and see how to convert and refactor code to use modern C++ idioms.

Post-Rapperswil mailing available

The post-Rapperswil mailing of new standards papers is now available.

Many of the papers in the mailing have already been published individually on this blog.

NOTE: The following are only those papers in the mailing that have not already been publicized on this blog.

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup Disposition
N4054 PL22.16 2014-06 Rapperswil Minutes Ville Voutilainen 2014-07-03 2014-07      
N4057 A Proposal to Add a Const-Propagating Wrapper to the Standard Library J. Coe, R. Mill 2014-07-02 2014-07 N3973 Library  
N4060 Changes to vector_execution_policy Pablo Halpern 2014-06-11 2014-07   Concurrency  
N4061 Greatest Common Divisor and Least Common Multiple, v3 Walter E. Brown 2014-06-30 2014-07 N3913 Library  
N4064 Improving pair and tuple, revision 2 Daniel Krügler 2014-07-02 2014-07 N3739 Library  
N4065 make_array, revision 2 Zhihao Yuan 2014-06-26 2014-07 N4031 Library  
N4066 Delimited iterators (Rev. 3) M. Spertus, N. Wilson 2014-06-18 2014-07 N4007 Library  
N4068 Toward More Expressive Iterator Tags Bill Seymour 2014-06-28 2014-07   Library  
N4069 C++ Ostream Buffers L. Crowl, P. Sommerlad 2014-06-18 2014-07 N3978 Concurrency  
N4072 Fixed Size Parameter Packs Maurice Bos 2014-05-26 2014-07   Evolution  
N4075 Centralized Defensive-Programming Support for Narrow Contracts (Revision 5) J. Lakos, A. Zakharov, A. Beels 2014-06-20 2014-07 N3997 Library  
N4081 Working Draft, C++ Extensions for Library Fundamentals Jeffrey Yasskin 2014-07-07 2014-07 N4023    
N4082 Programming Languages — C++ Extensions for Library Fundamentals Jeffrey Yasskin 2014-07-07 2014-07      
N4083 Editor's Report for Version 1 of the Library Fundamentals TS Jeffrey Yasskin 2014-07-07 2014-07      
N4084 Working Draft, C++ Extensions for Library Fundamentals, Version 2 Jeffrey Yasskin 2014-07-06 2014-07      
N4085 Editor's Report for Version 2 of the Library Fundamentals TS Jeffrey Yasskin 2014-07-06 2014-07      
N4086 Removing trigraphs??! Richard Smith 2014-06-18 2014-07 N3981 Evolution  
N4088 Task Region R3 P. Halpern, A. Robison, A. Laksberg, H. Sutter, et al. 2014-06-21 2014-07 N3991 Library  
N4089 Safe conversions in unique_ptr<T[]>, revision 2 Geoffrey Romer 20140625 2014-07 N4042 Library  
N4090 The Maladies of All Member Templates: An Incomplete Biography of Specialization (DR727 + DR1755) Faisal Vali 2014-06-21 2014-07 N4042 Library  
N4091 C++ Standard Core Language Active Issues, Revision 90 William M. Miller 2014-07-07 2014-07 N4018 Core  
N4092 C++ Standard Core Language Defect Reports and Accepted Issues, Revision 90 William M. Miller 2014-07-07 2014-07 N4019 Core  
N4093 C++ Standard Core Language Closed Issues, Revision 90 William M. Miller 2014-07-07 2014-07 N4020 Core  
N4094 Response To: Let return {expr} Be Explicit H. Hinnant, V. Voutilainen 2014-07-06 2014-07   Evolution  
N4104 Working Draft, Technical Specification for C++ Extensions for Parallelism Jared Hoberock 2014-07-04 2014-07 N3960    
N4105 Information technology – Programming languages, their environments and system software interfaces – Technical Specification for C++ Extensions for Parallelism Jared Hoberock 2014-07-04 2014-07      
N4106 Parallelism TS Editor's Report, post-Rapperswil Jared Hoberock 2014-07-04 2014-07      
N4107 Working Draft, Technical Specification for C++ Extensions for Concurrency Artur Laksberg 2014-07-07 2014-07 N3970    
N4108 Concurrency TS Editor's Report, July 2014 Artur Laksberg 2014-07-02 2014-07      
N4111 Static reflection (rev. 2) Matúš Chochlík 2014-07-02 2014-07   Reflection  
N4115 Searching for Types in Parameter Packs B. Seymour, S. Lavavej 2014-07-04 2014-07   Library  
N4117 C++ Standard Library Active Issues List (Revision R89) Alisdair Meredith 2014-07-08 2014-07 N3967 Library  
N4118 C++ Standard Library Defect Report List (Revision R89) Alisdair Meredith 2014-07-08 2014-07 N3968 Library  
N4119 C++ Standard Library Closed Issues List (Revision R89) Alisdair Meredith 2014-07-08 2014-07 N3969 Library  
N4120 Null Coalescing Conditional Operator Alexander Bock 2014-07-02 2014-07   Evolution  

 

CppCon Program Highlights, 3 of N: C++ and the Modern Game

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 (or 'Con) would be complete without covering a perennial stronghold for tight C++ code: games. What can be said that hasn't been said before? Some interesting answers will be found in the following talks, which cover the gamut from casual homebrew games to the world's top "AAA" titles... and a little bird tells us there may be some additional leading-edge game-related content still to be announced for CppCon. As always, these talks are by the right people -- Those Who Know and Those Who Do in some of the leading efforts in our industry.

In this post:

  • How Ubisoft Montreal Develops Games for Multicore -- Before and After C++11
  • C++ in Huge AAA Games
  • Quick game development with C++11/C++14

 

How Ubisoft Montreal Develops Games for Multicore -- Before and After C++11

Multicore hit the video game industry in a big way. Every platform we develop for now comes in a multicore configuration, and we're always under pressure to exploit the hardware to its fullest. This talk will share our experience learning to develop C++ software for multicore processors over the last decade. It will also explore the new concurrency support in C++11, and examine the way C++11 has influenced the way we develop multicore software so far.

Speaker: Jeff Preshing, Technical Architect, Ubisoft. Jeff Preshing is a Technical Architect at Ubisoft Montreal, where he's worked on games such as Rainbow Six Vegas, Child of Light and Assassin's Creed Unity. He also maintains a blog where he writes frequently about lock-free programming and the C++11 atomic library.

 

C++ in Huge AAA Games

Video games like Assassin's Creed or Rainbow Six are among the biggest code bases with a single static linking. Iteration-time is critical to develop a great game and keeping a complete compilation-time of a few minutes is a constant challenge. This talk will explain the C++ usage reality at Ubisoft Montreal for huge projects. Ideas will be shared regarding performance, debugging and iteration time.

Speaker: Nicolas Fleury, Technical Architect, Ubisoft. Nicolas Fleury has been in video game industry for over 10 years, working as a Technical Architect on projects like Prince of Persia and currently on Rainbow Six: Siege. Before working in the game industry, he worked in computer assisted surgery, speech recognition and telecoms.

 

Finally, to underscore that C++ is not just for "big AAA" titles, CppCon is very pleased to include this fresh talk by a superb young up-and-coming open source gaming guru -- if you haven't heard his name yet, don't worry, you will:

Quick Game Development with C++11/C++14 

Modern C++ has made game development a much more pleasurable experience. Features such as smart pointers and variadic templates are invaluable in speeding up the development process and in making the code cleaner and more robust. New easy-to-use multimedia libraries such as SFML, SDL and Cinder make dealing with graphics, sounds and input very easy, and work well with modern code principles. This talk guides the audience through the creation of an Arkanoid/Breakout clone in under 200 lines of code, using C++11/C++14 features and idioms. Chronologically sequential code segments, compiled and executed one by one, will show the attendees how a game is created from scratch, slowly becoming a playable product, step by step. The end result will be a small game, completely written in modern C++ code. Topics covered will range from basic graphics programming to entity management and collision detection/response.

Speaker: Vittorio Romeo. Vittorio is an Italian 19 year old Computer Science student at the University of Messina. He started programming at a very young age and soon became an enthusiast of the C++ language. While following the evolution of the C++ standard and embracing the newest features, he worked on many open-source project, such as general-purpose libraries and free multiplatform independent games, which are still being maintained and expanded today. Vittorio also participated as a speaker at Messina's 2013 Linux Day event and he is currently creating an online game-development C++11 video tutorial series for beginners.