Skip to content

Details

Hi,

this time we will have two talks. One by Yegor Derevenets about the Rationales behind C++ atomics and one short talk by André Bergner on faster complex number for C++.

There are two reasons to be on time (before 20:00).
1.) We will have Pizza and Beer for you! ;)
2.) There is a big gate to the backyard that gets closed at 20:00h. In case you are late please call the number 030-6110351180 and somebody will come and open the gate for you. The meetup will be in the last of the yards before the river as shown in this picture.

http://photos1.meetupstatic.com/photos/event/d/9/9/6/600_436375702.jpeg

Abstracts

Faster complex numbers for C++

Complex numbers are important fundamental tool from mathematics enabling many problems to be written in a more generic form. The STL comes with an implementation to work with complex numbers in a natural way.

Motivated by some useful real world examples I will discuss benchmarks of std::complex and demonstrate how an alternative implementation based on expression templates outperforms std::complex and competes with hand-crafted C code.

Rationales behind C++ atomics

C++11 introduced special atomic types that allow the user to perform operations on memory atomically. In addition to that, these atomic operations allow the user to request a specific order in which they, as well as preceding and succeeding memory accesses, will hit the memory, i.e., will be observed by other threads.

The default order is sequential consistency: atomic operations are visible to all the threads in the same order, they are not reordered with other memory accesses in the same thread. C++ provides a way to request weaker guarantees: release, acquire, consume, relaxed memory order.

In the talk I will try to explain why having five (actually, six) different memory orders is a good idea, what they actually mean, what is the intuition, and how atomic memory accesses with these orders are compiled into x86 and Power assembly.

Related topics

You may also like