News

Open Multi-Methods for C++11, Part 1 -- Jean-Louis Leroy

jean-louis-leroy.pngNew on Code Project:

Open Multi-Methods for C++11, Part 1

by Jean-Louis Leroy

Note: We recommend first reading this C++ multimethods paper coauthored by Bjarne Stroustrup for more background.

From the article:

This article is the first in a series about open multi-methods for C++11. In this installment, I will explain what they are, how they fit in the object-oriented paradigm, and make controversial statements.

Subsequent articles will present a new library that implements open multi-methods, using the facilities provided by C++11 (in particular, variadic templates). The library's salient features are: fast, constant time dispatch using compact tables; arbitrary number of virtual and non virtual arguments; access to the next most specific specialization; and support for shared libraries and dynamic loading. The series will conclude with an in-depth presentation of the internals of the library. ...

Some Optimizations Are More Important Than Others -- Andrew Koenig

From the desk of ARK:

Some Optimizations Are More Important Than Others

by Andrew Koenig

From the article:

[...] In short, the key to finding effective ways to speed up a program is to look at the parts of the program that dominate its execution time and find ways of speeding up those parts that require relatively little programmer effort to implement.

With this background in mind, let's think about moving data rather than copying it. Suppose, for example, that we have two functions, each of which takes a string argument: ...

Universal References and the Copy Constructor -- Eric Niebler

The "universal references" term is getting traction:

Universal References and the Copy Constructor

by Eric Niebler

From the article:

At the most recent NWCPP meeting in Redmond, WA, the always-entertaining Scott Meyers shared his latest insights about so-called “universal references” and their pitfalls. In particular, he was warning about the hazards of overloading on universal references. His advice was good, I thought, but missed some important corner cases about the interactions between universal references and the special member functions. In this article, I show what the “special” problems are with the special member functions and universal references, and some ways to avoid the problems. ...

... 

Scott’s advice is simple and sound: avoid overloading on universal references. By which he means, don’t do this:
template<typename T>
void foo( T const & t )
  {/*...*/}

template<typename T>
void foo( T && t )
  {/*...*/}

In the code above, the author presumably wanted all lvalues to go to the first and all rvalues to go to the second. But that’s not what happens. What happens is this: ...

Bjarne Stroustrup segment from 2013 ACM-ICPC World Championships

stroustrup-icpc13.PNGicpc-2013.pngBjarne Stroustrup spoke at this summer's ACM International Collegiate Programming Contest World Finals held in St. Petersburg, Russia. While there, he also gave this 8-minute interview in the context of balancing efficient code with the out-of-the-box problem solving required by ICPC problem challenges.

2013 ICPC Bjarne Stroustrup

C++ inventor Bjarne Stroustrup discusses the relationship of programming languages and competition and the benefit of participating in events such as the ACM-ICPC.

 

New paper: N3707, 2014-02 Meeting Invitation and Information -- Herb Sutter

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3707

Date: 2013-08-06

2014-02 Meeting Invitation and Information

by Herb Sutter

Excerpt:

The winter 2014 meeting of WG21 is being hosted by Microsoft and will be held on February 10-15, 2014 at Hilton Garden Inn, 1800 NW Gilman Blvd., Issaquah, Washington, USA 98027

Why Would You Ever Pass a Container By Value? -- Andrew Koenig

From the desk of ARK:

Why Would You Ever Pass a Container By Value?

by Andrew Koenig

From the article:

Consider two fundamental features of C++: functions and references. Which shall we teach first?

If we teach references first, there is the problem of coming up with interesting example programs that use references but completely avoid user-defined functions. This is hard to do because the most common use of references is as function parameters — so it's probably easier to teach functions first.

However, if we teach functions before we teach references, then every function we write must accept its arguments by value — references not yet being available as an alternative...

HPX version 0.9.6 released -- Stellar Group, LSU

stellar-group.PNGThe Stellar Group at Louisiana State University has released version 0.9.6 of High Performance Parallex (HPX) for Linux, MacOS, Windows, and Android.

HPX V0.9.6 Released

The STE||AR Group is proud to announce the sixth formal release of HPX (V0.9.6). ...

From the announcement:

In this release we have made several significant changes:

  • Consolidated API to be aligned with the C++11 (and the future C++14) Standard
  • Implemented a distributed version of our Active Global Address Space (AGAS)
  • Ported HPX to the Xeon-Phi device
  • Added support for the SLURM scheduling system
  • Improved the performance counter framework
  • Added a distributed version of the Active Global Address Space (AGAS)
  • Added parcel (message) compression and parcel coalescing systems
  • Allow different scheduling polices for different parts of code with experimental executors API
  • Added experimental security support on the locality level
  • Created a native transport layer on top of Infiniband networks
  • Created a native transport layer on top of low level MPI functions
  • Added an experimental tuple-space object