New paper: N3724, A Parallel Algorithms Library -- J Hoberock, O Giroux, V Grover, H Sutter, 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: N3724

Date: 2013-08-30

A Parallel Algorithms Library

by J. Hoberock, O. Giroux, V. Grover, H. Sutter, et al.

Excerpt:

We propose an extension of the C++ standard library that provides access to parallel execution for a broad range of algorithms. Many of these algorithms correspond with algorithms already in the standard library, while some are novel. Our proposal is a pure extension, as it does not alter the meaning of any existing functionality. Our goal in this proposal is to provide access to the performance benefits of parallelism in a way that (1) can be easily adopted by programmers and (2) can be supported efficiently on the broadest possible range of hardware platforms.

We identify a collection of algorithms that permit efficient parallel implementations. We also introduce the concept of an execution policy, that may be used to specify how these algorithms should be executed. Execution policies become an optional parameter to a standard set of algorithms, permitting the programmer to write code such as the following:

std::vector<int> vec = ...

// previous standard sequential sort
std::sort(vec.begin(), vec.end());

// explicitly sequential sort
std::sort(std::seq, vec.begin(), vec.end());

// permitting parallel execution
std::sort(std::par, vec.begin(), vec.end());

// permitting vectorization as well
std::sort(std::vec, vec.begin(), vec.end());

// sort with dynamically-selected execution
size_t threshold = ...
std::execution_policy exec = std::seq;
if(vec.size() > threshold)
{
    exec = std::par;
}
std::sort(exec, vec.begin(), vec.end());

Interested programmers may experiment with this model of parallelism by accessing our prototype implementation at http://github.com/n3554/n3554.

New paper: N3723, Extend operator-> to support rvalues -- Pascal Costanza

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

Date: 2013-08-23

Extend operator-> to support rvalues

by Pascal Costanza

Excerpt:

We propose the following extension of C++ to enable user-provided definitions for operator-> that support move semantics:

  • A user can choose to implement operator-> with an additional parameter of type int. If this definition is called, the parameter will have the value zero. A user can either implement operator-> with or without this additional parameter for a given class. It is invalid to provide both definitions for a given class.
  • The return value of operator-> with the additional parameter is a complete class type, and the compiler generates a member access with the dot . operator on that return value instead of using the arrow -> operator.

New paper: N3720, Working Draft Technical Specification - URI -- Glyn Matthews, Dean Michael Berris

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

Date: 2013-08-30

Working Draft Technical Specification - URI

by Glyn Matthews, Dean Michael Berris

Excerpt:

The scope of this Technical Specification will include a single std::experimental::uri type, specifications about how the are intended to be processed and extended, including some additional helper types and functions. It will include a std::experimental::uri_builder type to build a URI from its components. Finally, it will include types and functions for percent encoding, URI references, reference resolution and URI normalization and comparison.

New paper: N3719, Extend INVOKE to support types convertible to target class -- Tomasz KamiƄski

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

Date: 2013-08-17

Extend INVOKE to support types convertible to target class

by Tomasz Kamiński

Excerpt:

This proposal is to extend the definition of INVOKE for class member pointers to cover types convertible to a target class of the pointer, like std::reference_wrapper.

Proposal also resolves LWG issue #2219

New paper: N3718, Transactional Memory Support for C++ -- V. Luchangco, J. Maurer, M. Moir, 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: N3718

Date: 2013-08-30

Transactional Memory Support for C++

by Victor Luchangco, Jens Maurer, Mark Moir, et al.

Excerpt:

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. It 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. This proposal 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 the SG5’s efforts towards a basic set of features that is useful and can support progress towards possible inclusion in the C++ standard. Reflecting this goal, for the first time, we present precise wording changes relative to the Working Draft of the C++ Standard (N3690) to implement this proposal. This document consists of an informal overview of the proposal, several illustrative examples, a summary of some of the discussion in SG5 and the earlier drafting group about design choices, and the above-mentioned wording changes.

New paper: N3717, SG5: Transactional Memory (TM) Meeting Minutes 2013/06/24-2013/08/26 -- M. 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: N3717

Date: 2013-08-30

SG5: Transactional Memory (TM) Meeting Minutes 2013/06/24-2013/08/26

by Michael Wong

Excerpt:

Minutes for 2013/06/24 SG5 Conference Call

Minutes for 2013/07/08 SG5 Conference Call

Minutes for 2013/07/22 SG5 Conference Call

Minutes for 2013/08/05 SG5 Conference Call

Minutes for 2013/08/19 SG5 Conference Call

Minutes for 2013/08/26 SG5 Conference Call

New papers: N3713-15, Core Issues Lists -- William M. Miller

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: N3713, N3714, N2715

Date: 2013-09-03

C++ Standard Core Language Active Issues, Revision 85

C++ Standard Core Language Defect Reports and Accepted Issues, Revision 85

C++ Standard Core Language Closed Issues, Revision 85

by William M. Miller

Excerpt:

The purpose of these documents is to record the disposition of issues that have come before the Core Language Working Group of the ANSI (INCITS PL22.16) and ISO (WG21) C++ Standard Committee.

New paper: N3712, Policy-Based Design for Safe Destruction in Concurrent Containers -- Arch Robison

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

Date: 2013-08-30

Policy-Based Design for Safe Destruction in Concurrent Containers

by Arch Robison

Excerpt:

Writing containers that support concurrent access/modi cation by multiple threads incurs a special problem: when is it safe to delete an object? The problem is surprisingly tricky when lock-free operations are involved. Numerous general means have been proposed, ...

This paper sketches a way of abstracting these means so that concurrent container implementations could be parameterized over these means, thus allowing users to select the means best for their context. ...

This paper presents a sketch, not a complete proposal. It is intended to elicit discussion from experts as to whether the abstraction is viable. As such, this paper presents a fairly minimal interface that omits knobs for weak memory consistency and and extensive overloading of operators, so that experts can focus on a core question: Is the abstraction sufficient to support various means for deferred object deletion?

New paper: N3706, C++ Distributed Counters -- Lawrence Crowl

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

Date: 2013-09-01

C++ Distributed Counters

by Lawrence Crowl

Excerpt:

We propose a set of coordinated counter types that collectively provide for distributed counting. The essential component of the design is a trade-off between the cost of incrementing the counter, the cost of loading (reading) the counter value, and the "lag" between an increment and its appearance in a "read" value. That is, the read of a counter value may not reflect the most recent increments. However, no count will be lost.

These counters are parameterized by the base integer type that maintains the count. Avoid situations that overflow the integer, as that may have undefined behavior. This constraint implies that counters must be sized to their use. (For dynamic mitigation, see the exchange operation below.)

LLVM Toolchain on Windows -- Chandler Carruth

Have you been waiting to use clang until it works on Windows? Your wait is over. The inimitable Chandler Carruth from Google announced an honest-to-god Windows installer for the LLVM toolchain that integrates into Visual Studio, and links with the native C++ runtime.

A Path Forward for an LLVM Toolchain on Windows

by Chandler Carruth

[...] we’ve been driving many of the efforts around compatibility with Visual Studio and native Windows C++ code in Clang and LLD (the LLVM linker). Today, as announced at my GoingNative 2013 talk, we are able to build a trivial C++ application that in turn links against native C++ libraries and uses them in real, interesting ways. This is a huge milestone for the project, and something we’re really excited to be talking more about.

Continue reading...