N4001: SG5: Transactional Memory (TM) Meeting Minutes 2014/02/03-2014/05/19 -- Michael Wong

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: N4001

Date: 2014-05-23

SG5: Transactional Memory (TM) Meeting Minutes 2014/02/03-2014/05/19

by Michael Wong

Excerpt:

Minutes for 2014/02/03 SG5 Conference Call ............................................................................... 2

Minutes for 2014/02/17 SG5 Conference Call ............................................................................... 6

Minutes for 2014/03/10 SG5 Conference Call ............................................................................... 9

Minutes for 2014/03/31 SG5 Conference Call ............................................................................. 13

Minutes for 2014/04/28 SG5 Conference Call ............................................................................. 18

Minutes for 2014/05/12 SG5 Conference Call ............................................................................. 21

Minutes for 2014/05/19 SG5 Conference Call ............................................................................. 27

N3999: Standard Wording for Transactional Memory Support for C++ -- Luchangco, Maurer, Wong, et al.

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: N3999

Date: 2014-05-23

Standard Wording for Transactional Memory Support for C++

by Victor Luchangco, Jens Maurer, Michael Wong, et al.

Excerpt:

1 Introduction

Transactional memory supports a programming style that is intended to facilitate parallel execution with a comparatively gentle learning curve. This document describes a proposal developed by SG5 to introduce transactional constructs into C++ as a Technical Specification.

This proposal is based in part on the Draft Specification for Transactional Constructs in C++ (Version 1.1) published by the Transactional Memory Specification Drafting Group in February 2012. It represents a pragmatic basic set of features, and omits or simplifies a number of controversial or complicated features from the Draft Specification. Our goal has been to focus SG5’s efforts towards a basic set of features that is useful and can support progress towards possible inclusion in the C++ standard.

In addition to a description of the proposal, this document contains a summary of the issues discussed Section 1.1 as well as Standard Wording for Core Section 8. Library wording is handled in a separate document.

1.1 Changes in previous revisions

N3999 (this paper): From N3919, we updated with discussion results from EWG, and the TM Evening Session of Issaquah. We considered the memory model effect from Chandler on whether a transaction that does not access any shared data induces any happens-before arcs – and in particular whether transactions that are provably thread-local must incur synchronization costs. We describe the result of that discussion in Section 7.1.

We also added Core StandardWording to support TM TS in preparation for the Draft Document. Core Standard Wording will be reviewed in a separate telecon call on June 2, and likely again at Rapperswil. Library wording is posted in N4000 and will be reviewed in Rapperswil.

 

N3988: Towards restrict-like aliasing semantics -- Finkel, Tong, Carruth, Nelson, Vandevoorde, Wong

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: N3988

Date: 2014-05-23

Towards restrict-like aliasing semantics for C++

by Hal Finkel, Hubert Tong, Chandler Carruth, Clark Nelson, Daveed Vandevoode, Michael Wong

Excerpt:

This paper is a follow-on to N3635 after a design discussion with many compiler implementers at Issaquah, and afterwards by telecon, and specifically proposes a new alias_set attribute as a way to partition type-based aliasing to enable more fine grain control, effectively giving C++ a more complete restrict-like aliasing syntax and semantics.

How Dropbox Uses C++ for Cross-Platform iOS and Android Development -- Ole Begemann

dropbox.pngDid you know that C++ is a hot language for mobile development? This seems to be widely known among C++ developers, but surprisingly widely unknown in the non-C++ programming community at large. Two of the major reasons why C++ is currently experiencing this surge in mobile interest are:

  • C++'s efficiency and determinism help create power-sipping apps -- ones that not only use fewer CPU cycles, but use them in battery-friendly "bursty" ways that let the CPU sleep frequently, and deterministically let go of expensive resources like sensors immediately when they're not needed.
  • C++'s portability makes it the only cross-platform language that can target every major and minor mobile phone and tablet platform -- including iOS, Android, Windows and Windows Phone, and Blackberry -- never mind of course as usual also targeting every other platform and environment too, from desktops to servers to datacenters where it's already the language of choice in companies from Google to Facebook.

In that vein, here's a post from just before the U.S. long weekend about using C++ for cross-platform mobile development.

Expect to see more news like this. Also, expect to see talks on using C++ for modern cross-platform mobile development as one of the hot topics at CppCon this September.

How Dropbox Uses C++ for Cross-Platform iOS and Android Development

by Ole Begemann

From the article:

When work started on the Mailbox app for Android, the team made the choice to write a large portion of the non-UI code in C++ — rather than rewriting the entire app in Java — with the goal of sharing that common C++ layer between iOS and Android. The iOS app used Core Data at the time, so migrating it off of Core Data to the shared C++ library was also part of the process. C++ seemed like an obvious choice because it is available on every platform and team members preferred the language over Java.

The Carousel team made the same choice since launching simultaneously on iOS and Android was an important goal from the start.

N4047: A Module System for C++ -- Gabriel Dos Reis, Mark Hall, Gor Nishanov

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: N4047

Date: 2014-05-27

A Module System for C++

by Gabriel Dos Reis, Mark Hall, Gor Nishanov

Excerpt:

This paper presents a design of a module system for C++. The proposal focuses on programmer’s view of modules (both production and consumption) and how to better support modular programming in the large, componentization, scalable compilation, and semantics-aware developer tools.

N4040: Working Draft, C++ Extensions for Concepts -- Andrew Sutton

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: N4040

Date: 2014-05-26

Working Draft, C++ Extensions for Concepts

by Andrew Sutton

Excerpt:

This technical specification describes extensions to the C++ Programming language (1.2) that enable the specification and checking of constraints on template arguments, and the ability to overload functions and specialize templates based on those constraints. These extensions include new syntactic forms and modifications to existing language semantics.

N4037: Non-Transactional Implementation of Atomic Tree Move -- Paul E. McKenney

n4037.PNGA 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: N4037

Date: 2014-02-14

Non-Transactional Implementation of Atomic Tree Move

by Paul E. McKenney

Excerpt:

1 Introduction

Concurrent search trees are well understood [9, 2], as are concurrent search trees that use lightweight read-side synchronizations mechanisms [10, 11, 17, 16, 7, 1, 8] such as read-copy update (RCU) [14, 12].

However, non-transactional-memory-based algorithms that atomically move an element from one search tree to another, while avoiding delaying lockless readers, are lacking. Such algorithms are known for hash tables [18, 19]. A challenge to find such an algorithm for trees was put forward at the 2014 C++ Standards Committee meeting at Issaquah, WA USA, and this document describes one solution. As such, it is a work in progress: Future work will implement multiple solutions and compare their performance and scalability. ...

6 Summary

This paper has demonstrated a prototype solution to the Issaquah challenge of atomically moving data between two search trees without unnecessary contention.

Future work includes efficiently balancing the trees, evaluating other non-TM implementations, and comparing against TM implementations.

N4021: A Proposal to Add 2D Graphics Rendering and Display to C++, R1 -- McLaughlin, Sutter, Zink

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: N4021

Date: 2014-05-21

A Proposal to Add 2D Graphics Rendering and Display to C++, Revision 1

by Michael B. McLaughlin, Herb Sutter and Jason Zink

Excerpt:

The goal of this proposal is to define a 2D drawing API for the C++ programming language. This proposal is a revision of N3888, which was presented at the meeting of SG13 at the Issaquah meeting in February 2014. This proposal aims to provide a clean, modern C++ API that builds on the N3888 API and incorporates the feedback on it. [Note: The N3888 API was a mechanical transformation of the cairo graphics library. Cairo is a comprehensive, cross-platform, widely-used, mature 2D graphics library written in C with an object-oriented style. -- end note]

N4013: Atomic operations on non-atomic data -- Hans-J. Boehm

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: N4013

Date: 2014-05-26

Atomic operations on non-atomic data

by Hans-J. Boehm

Excerpt:

Here we address the question of whether there should be some mechanism for applying atomic operations to non-atomic data. As pointed out in the next section, we address a somewhat different set of problems from prior discussion of non-atomic operations on atomic data (c.f. the last part of  N3710 or the Issaquah discussion.

N3993: On Parallel Invocations of Functions in Parallelism TS -- Artur Laksberg

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: N3993

Date: 2014-05-23

On Parallel Invocations of Functions in Parallelism TS

by Artur Laksberg

Excerpt:

Abstract

This document proposes a change to N3989 (Technical Specification for C++ Extensions for Parallelism).

Introduction

At the Issaquah meeting in February 2014, Hans Boehm raised the following issue regarding N3850 (Working Draft, Technical Specification for C++ Extensions for Parallelism):

It seems to me that the execution policies need to be a bit more precise about which calls to parameter functions they can make. Something needs to specify that sort may make parallel invocations to swap, but only if the arguments for concurrent calls don’t overlap. I didn’t quickly find such text. In general, “non-racing” calls can be made concurrently, but “racing” ones cannot.

Upon further discussion, it was decided that the resolution of this issue warrants a separate paper that can be presented for discussion in SG1 during the Rapperswil meeting.

Proposed Resolution

First, we introduce changes to 17.6.5.9 [res.on.data.races]/8 that state that an implementation cannot introduce a data race on objects accessed during the execution of the algorithms.

Additionally, instead of talking about “applying user-defined function objects”, we define an umbrella term “element access functions”, which includes the functions required by the specification, as well as the user-provided function objects. We then define the behavior in terms of “invoking the element access functions”.