January 2015

Experimenting with a Proposed Standard Drawing Library for the C++ language -- Eric Mittelette

Today on MSOT:

Experimenting with a Proposed Standard Drawing Library for the C++ language

by Eric Mittelette

From the article:

Back in July, Michael McLaughlin, Herb Sutter, and Jason Zink submitted to the ISO an updated proposal to standardize a 2D Graphics API for the C++ programming language. The ISO C++ Committee will evaluate the proposal for the possible inclusion of these new features in the next versions of the specification.

Given MS Open Tech’s historical interest in cross-platform graphics development, we took a closer look. In an attempt to familiarize with the API from the perspective of a C++ developer, we developed a sample app that we just contributed to Michael’s github repository. In the sections below, we share some salient aspects of how this new crop of Graphics experiences built with “straight” C++ could be written, only a few years from now!
 

 

The compiler can make up its own calling conventions, within limits--Raymond Chen

A new article from the Old New Thing:

The compiler can make up its own calling conventions, within limits

by Raymond Chen

From the article:

There are three parties to a calling convention. The function doing the calling. The function being called. The operating system. The operating system needs to get involved if something unusual occurs, like an exception, and it needs to go walking up the stack looking for a handler...

The lvalue/rvalue metaphor--Joseph Mansfield

Joseph Mansfield discusses about an important topic in C++:

The lvalue/rvalue metaphor

by Joseph Mansfield

From the article:

Every expression in C++ is either an lvalue or an rvalue. This distinction is what makes something like 5 = x; invalid, as the expression 5 is an rvalue expression and so cannot appear on the left of an assignment...

January 2015 C++ Compilers Status--Christophe Riccio

Christophe Riccio gives us an interesting point of view for a library author and shares the latest status of some compilers:

January 2015 C++ Compilers Status

by Christophe Riccio

From the article:

...Finally, a last issue for adopting new C++11 features is simply our own ignorance of which feature is available on all the compilers we support. To resolve that problem, I made the followiong table listing all the C++ features and their support on Clang, GCC, ICC and Visual C++...

N4283: Atomic View, revision 2 -- Carter Edwards and Hans Boehm

New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4283

Date: 2015-01-26

Atomic View, revision 2

by Carter Edwards and Hans Boehm

Excerpt:

This paper proposes an extension to the atomic operations library [atomics] for atomic operations applied to non-atomic objects. The proposal is in three parts: (1) the concept of an atomic view, (2) application of this concept for atomic operations applied to members of a very large array in a high performance computing (HPC) code, and (3) application of this concept for atomic operations applied to an object in a large legacy code which cannot replace this object with a corresponding atomic<T> object.

CppCon 2014 Data-Oriented Design and C++--Mike Acton

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Data-Oriented Design and C++

by Mike Acton

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

The transformation of data is the only purpose of any program. Common approaches in C++ which are antithetical to this goal will be presented in the context of a performance-critical domain (console game development). Additionally, limitations inherent in any C++ compiler and how that affects the practical use of the language when transforming that data will be demonstrated.

Expression Templates Revisited

A new video from Meeting C++ 2014!

Expression Templates Revisited

by Klaus Iglberger

From the talk description:

Since their invention in 1995, Expression Templates (ETs) have proven to be a valuable tool for many C++ template libraries. Especially numerics libraries quickly embraced them as salvation for the performance deficiencies of standard C++. This reputation as performance optimization...

C++ SIMD parallelism with Intel Cilk Plus and OpenMP 4.0

A new video from Meeting C++ 2014

C++ SIMD parallelism with Intel Cilk Plus and OpenMP 4.0

by Georg Zitzlsberger

From the talk description:

Performance is one of the most important aspects that comes to mind if deciding for a programming language. Utilizing performance of modern processors is not as straight forward as it has been decades ago. Modern processors only rarely improve serial execution of applications by increasing their frequency or adding more execution units.

CppCon 2014 Implementing Wire Protocols with Boost Fusion--Thomas Rodgers

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Implementing Wire Protocols with Boost Fusion

Summary of the talk:

There are a number of common serialization formats available which work well for marshaling C++ types into messaging protocols, e.g. ProtoBufs, Thrift, JSON, XML, FIX, etc. Unfortunately, not every protocol uses one of these popular encodings and instead implements a unique binary protocol. The classical "C" way of handling binary protocols is to use packed structs, unfortunately there are many binary protocols which are not particularly friendly to using this approach due to things like nested variable length data structures, etc.. The packed struct approach is also fairly limited in that it only generally supports primitive POD types.

This talk will explore an approach that uses Boost's Fusion library to implement an easily extensible serialization mechanism for on a non-trivial binary financial exchange protocol which exposes the underlying data in terms of "modern" C++ types. The talk will also cover aspects of general use of Boost Fusion and Boost MPL, type traits, enable_if, SFINAE, and other members of the C++ type system bestiary.