¡@

Home 

c++ Programming Glossary: x.load

C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?

http://stackoverflow.com/questions/6319146/c11-introduced-a-standardized-memory-model-what-does-it-mean-and-how-is-it-g

Thread 1 Thread 2 x.store 17 cout y.load y.store 37 cout x.load endl Now things get much more interesting. First of all the.. memory_order_relaxed y.store 37 memory_order_relaxed cout x.load memory_order_relaxed endl The more modern the CPU the more likely.. memory_order_acquire y.store 37 memory_order_release cout x.load memory_order_acquire endl This takes us back to the ordered..

What does `std::kill_dependency` do, and why would I want to use it?

http://stackoverflow.com/questions/7150395/what-does-stdkill-dependency-do-and-why-would-i-want-to-use-it

a dependency into the do_something_with function. r1 x.load memory_order_consume r2 r1 index do_something_with a r2 There.. dependency between the second line and the indexing. r1 x.load memory_order_consume r2 r1 index do_something_with a std kill_dependency.. instructions as it pleases. It could produce any of 1 r1 x.load memory_order_consume r2 r1 index do_something_with 0 2 r1 x.load..