Transactional Memory

Transactional memory is based on the idea of a transaction from the database theory. Transactional memory shall make the handling of threads a lot easier. That for two reasons. Data races and deadlocks disappear. Transactions are composable.

Read more
Tags: C++20
Views: 26180

Coroutines

Coroutines are functions that can suspend and resume their execution while keeping their state. The evolution in C++20 goes one step further.

Read more
Tags: C++20
Views: 75026

Latches And Barriers

Latches and barriers are simple to thread synchronisation mechanism which enables it that some threads wait until a counter becomes zero. We will presumably in C++20 get latches and barriers in three variations: std::latch, std::barrier, and std::flex_barrier.

Read more
Tags: C++20
Views: 39639

std::future Extensions

Tasks in the form of promises and futures have in C++11 an ambivalent reputation. On the one hand, they are a lot easier to use than threads or condition variables; on the other hand, they have a great deficiency. They can not be composed. C++20 will overcome this deficiency.

Read more
Tags: C++20, tasks
Views: 41501

And the Winners are

Mads Ravn, Antonis Polykratis, Martin Mancuska, David Farago, Edgar Rojas, and Adrian Javaloy.

Read more
Views: 8919

Atomic Smart Pointers

C++20 will have atomic smart pointers. To be exactly, we will get a std::atomic_shared_ptr and a std::atomic_weak_ptr. But why? std::shared_ptr and std::weak_ptr are already thread-safe. Sort of. Let me dive into the details.

Read more
Tags: C++20
Views: 128664

Parallel Algorithms of the Standard Template Library

The idea is quite simple. The Standard Template has more than 100 algorithms for searching, counting, and manipulating ranges and their elements. With C++17, 69 of them are overloaded and a few new ones are added. The overloaded and new algorithms can be invoked with a so-called execution policy. By using the execution policy, you can specify whether the algorithm should run sequential, parallel, or parallel and vectorise.

 

Read more
Tags: C++17
Views: 61391

Multithreading with C++17 and C++20

Forecasts about the future are difficult. In particular, when they are about C++20. Nevertheless, I will take a look into the crystal ball and will write in the next posts about, what we will get with C++17  and what we can hope for with C++20.

Read more
Tags: C++20, C++17
Views: 183356

Expression Templates

Expression templates are "structures representing a computation at compile-time, which structures are evaluated only as needed to produce efficient code for the entire computation" (https://en.wikipedia.org/wiki/Expression_templates). As needed, now we are in the centre of lazy evaluation and in the centre of this post.

Read more
Views: 37176

C++ is Lazy: CRTP

In my previous post Recursion, List Manipulation and Lazy Evaluation I wrote about the characteristics of functional programming:  The story about lazy evaluation in C++ is short. Sorry to say but I have forgotten templates. The two advanced techniques CRTP and expression templates are based on lazy evaluation.

Read more
Tags: templates
Views: 94267

My Newest E-Books

Course: Modern C++ Concurrency in Practice

Course: C++ Standard Library including C++14 & C++17

Course: Embedded Programming with Modern C++

Course: Generic Programming (Templates)

Course: C++ Fundamentals for Professionals

Subscribe to the newsletter (+ pdf bundle)

Blog archive

Source Code

Visitors

Today 7192

Yesterday 8041

Week 22816

Month 82445

All 6310917

Currently are 164 guests and no members online

Kubik-Rubik Joomla! Extensions

Latest comments