There Is A New Future -- Felix Petriconi

Version 1.0 of a new C++ future and channel library has been released.

There Is A New Future

by Sean Parent, Foster Brereton and Felix Petriconi

About the library:

This library provides high level abstractions for implementing algorithms that eases the use of multiple CPU cores while minimizing the contention.

The future implementaton differs in several aspects compared to the C++11/14/17 standard futures: It provides continuations and joins, which were just added in a C++17 TS. But more important this futures propagate values through the graph and not futures. This allows an easy way of creating splits. That means a single future can have multiple continuations into different directions. An other important difference is that the futures support cancellation. So if one is not anymore interested in the result of a future, then one can destroy the future without the need to wait until the future is fullfilled, as it is the case with std::future (and boost::future). An already started future will run until its end, but will not trigger any continuation. So in all these cases, all chained continuations will never be triggered. Additionally the future interface is designed in a way, that one can use build in or custom build executors.

Since one can create with futures only graphs for single use, this library provides as well channels. With these channels one can build graphs, that can be used for multiple invocations.

CppCast Episode 104: Postmodern C++ with Tony Van Eerd

Episode 104 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Tony Van Eerd to talk about his recent award winning C++Now talk on Postmodern C++ and his views on lock-free programming.

CppCast Episode 104: Postmodern C++ with Tony Van Eerd

by Rob Irving and Jason Turner

About the interviewee:

Tony Van Eerd has been coding for well over 25 years, and hopefully coding well for some of that. Mostly in graphics/video/film/broadcast (at Inscriber & Adobe), writing low level pixel++, high level UI, threading, and everything else. He now enables painting with light at Christie Digital. He is on the C++ Committee. He is a Ninja and a Jedi.

CppCon 2016: STL Algorithms - why you should use them, and how to write your own--Marshall Clow

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

STL Algorithms - why you should use them, and how to write your own

by Marshall Clow

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

One of the most powerful features of the C++ standard library is the collection of basic algorithms. Everyone knows about sort and copy, but there are is a lot of powerful capabilities in the other algorithms as well. In this talk, I will explore some of the algorithms in the library, and give a rationale for writing your own, along with examples.

The motivation for writing your own algorithms is that you can create generic building blocks that can be used over and over again in your library or application, and which will allow your to program at a higher level of abstraction. Instead of thinking, "how do I sort this vector", you just call std::sort. The same should apply to the algorithms that are specific to your domain - once you write them.

P0616R0: de-pessimize legacy algorithms with std::move -- Peter Sommerlad

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

Document number: P0616R0

Date: 2017-06-06

de-pessimize legacy <numeric> algorithms with std::move

by Peter Sommerlad

Excerpt:

Acknowledgements

  • LEWG in Kona for inspiring me to write this paper.
  • Howard Hinnant for "being OK" with the change and telling me that he wasn’t brave enough for C++11 at the time to change it, when it would not have been a potentially breaking change for pathological cases.

P

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

Document number: P0616R0

Date: 2017-06-06

de-pessimize legacy <numeric> algorithms with std::move

by Peter Sommerlad

Excerpt:

Acknowledgements

  • LEWG in Kona for inspiring me to write this paper.
  • Howard Hinnant for "being OK" with the change and telling me that he wasn’t brave enough for C++11 at the time to change it, when it would not have been a potentially breaking change for pathological cases.

P0506R1: use string_view ... instead of const string &/const char* -- Peter Sommerlad

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

Document number: P0506R1

Date: 2017-06-06

use string_view for library function parameters instead of const string &/const char *

by Peter Sommerlad

Excerpt:

With basic_string_view there is no longer a reason to keep library APIs that have overloads taking std::string const & and char const * parameter types. Both should be replaced by a single version taking a std::string_view.

Acknowledgements — LEWG in Issaquah for proposing me to write this paper, even when it can not make it into C++17.

Changes from previous versions 4.1 p0506r0

  • removed unnecessary Allocator template parameter
  • change layout in regex adaptation to see changes easier piecewise judgement
  • adjust latex to most current std.tex macros
  • adjust to new standard chapter numbering
  • make regex_search allocator aware again by taking the allocator from a string parameter.

P0448R1: A strstream replacement using span<charT> as buffer -- Peter Sommerlad

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

Document number: P0448R1

Date: 2017-06-07

A strstream replacement using span<charT> as buffer

by Peter Sommerlad

Excerpt:

This paper proposes a class template basic_spanbuf and the corresponding stream class templates to enable the use of streams on externally provided memory buffers. No ownership or re-allocation support is given. For those features we have string-based streams. ...

Today, with span we actually have a library type representing such buffers views we can use for specifying (and implementing) such streams. They can be used in areas where dynamic (re-)allocation of stringstreams is not acceptable but the burden of caring for a pre-existing buffer during the lifetime of the stream is manageable.

Changes from p0448r0

  • provide explanation why non-copy-ability, while technically feasible, is an OK thing.
  • remove wrong Allocator template parameter (we never allocate anything).
  • adhere to new section numbering of the standard.
  • tried to clarify lifetime and threading issues.

P0408R2: Efficient Access to basic_stringbuf’s Buffer -- Peter Sommerlad

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

Document number: P0408R2

Date: 2017-06-07

Efficient Access to basic_stringbuf’s Buffer

by Peter Sommerlad

Excerpt:

This paper proposes to adjust the API of basic_stringbuf and the corresponding stream class templates to allow accessing the underlying string more efficiently.

N4666: National Body Comments: ISO/IEC PDTS 22277, C++ Extensions for Coroutines -- Barry Hedquist

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

Document number: N4666

Date: 2017-06-05

National Body Comments: ISO/IEC PDTS 22277, C++ Extensions for Coroutines

by Barry Hedquist

Excerpt:

Attached is SC22 N5205, a complete set of National Body Comments submitted to JTC1 SC22 in response to the SC22 N5193, Ballot for ISO/IEC PDTS 22277, C++ Extensions for Coroutines.

These comments are to be addressed at the next WG21 meeting in Toronto, July 10 - 15, 2017.

Document numbers referenced in the ballot comments are WG21 documents unless otherwise stated.

CppCon 2016: High Performance Code 201: Hybrid Data Structures--Chandler Carruth

Have you registered for CppCon 2017 in September? Don’t delay – Registration is open now.

While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2016 for you to enjoy. Here is today’s feature:

High Performance Code 201: Hybrid Data Structures

by Chandler Carruth

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Modern programs’ performance characteristics are often dictated by their data. Whether the cache locality of data access, the size of working set, or avoiding costly memory allocation overhead. Unfortunately, the standard C++ library data structures range from adequate to terrible at controlling these aspects, and they don’t provide any of the core mechanisms needed for extremely efficient data structure design.

This talk will present the core concepts of designing high performance data structures in C++. It is based on years of experience in the LLVM compiler as well as several other large code bases. From these principles, the talk will propose a suite of data structures that provide performance without loss of generality or functionality. As much as this talk will present specific data structure designs, its primary intent will be to give an understanding of what makes these structures have greater performance than more naive approaches.