thread_local

Multithreaded: Summation with Minimal Synchronization

Until now I've used two strategies for the summation of a std::vector. First I did the whole math in one thread (Single Threaded: Summation of a vector); second multiple threads shared the same variable for the result (Multithreaded: Summation of a vector). In particular the second strategy was extremely naive. In this post I will apply my knowledge of both posts. My goal is it that the thread will perform their summation as independent form each other as possible and therefore reduce the synchronization overhead. 

Read more
Comments 4Views: 1205

Thread-Local Data

By using the keyword thread_local, you define the thread local data. Thread-local can easily be explained in a few words.

Read more
Add CommentViews: 1751

Support my blog by buying my E-book

Latest comments

Modernes C++

Subscribe to the newsletter

Including two chapters of my e-book
Introduction and Multithreading

Blog archive

Source Code

Visitors

Today 1033

All 227047

Currently are 107 guests and no members online