The Three Clocks
A clock consists of a starting point and a time tick. C++ offers with std::chrono::system_clock, std::chrono::steady_clock, and std::chrono::high_resolution_clock three clocks.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 698 entries already.
A clock consists of a starting point and a time tick. C++ offers with std::chrono::system_clock, std::chrono::steady_clock, and std::chrono::high_resolution_clock three clocks.
Time duration is the difference between two time points. It will be measured in time ticks.
The starting point (epoch) and the additional time duration define the time point. It consists of two components, clock and time duration.
A blog dealing with multithreading in modern C++ but not writing about the new time library is incomplete. Primarily because I often used the time library in my posts to measure the performance of shortcode snippets. Therefore, I give in this post an overview of the components of the time library: time point, time duration, […]
After I’ve calculated in three different ways the sum of a std::vector I want to draw my conclusions.
Until now, I’ve used two strategies to summate 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 […]
My goal is to sum up all elements of a vector. I used in the last post a single thread. In this post, I use multiple threads and, therefore, the full power of my PC. The addition will be done on a shared variable. What, at first glance, seems like a good idea is a […]
What is the fastest way to add the elements of a std::vector? This a question that I will pursue in the following posts. I use the single-threaded addition as the reference number. In further posts, I discuss atomics, locks, and thread-local data.
There are a lot of issues with the singleton pattern. I’m aware of that. But the singleton pattern is an ideal use case for a variable, which can only be initialized in a thread-safe way. From that point on, you can use it without synchronization. So in this post, I discuss different ways to initialize […]
With the relaxed semantics, we have no synchronizations and ordering constraints on atomic operations.