3 ms·
volatile is a pre-requisite for implementing atomic types, as used in the post and enkiTS. It is not on its own sufficient however, and so I use both atomic int
by dougbinks 11y ago
volatile is a pre-requisite for implementing atomic types, as used in the post and enkiTS. It is not on its own sufficient however, and so I use both atomic intrinsics and memory barriers where appropriate. This is mentioned in the article, though obviously I need to emphasize the role of volatile more.
- dougbinks 11y agoFor those interested in the implementation of atomic operations see Jeff Preshing's "How Ubisoft Develops Games for Multicore - Before and After C++11", especially after 15m55s in on the video, or slide 37 of the pdf on github. Video: https://www.youtube.com/watch?v=X1T3IQ4N-3g&feature=youtu.be&t=15m55s https://www.youtube.com/watch?v=X1T3IQ4N-3g&feature=youtu.be... PDF: https://github.com/CppCon/CppCon2014/tree/master/Presentations/How%20Ubisoft%20Montreal%20Develops%20Games%20for%20Multicore https://github.com/CppCon/CppCon2014/tree/master/Presentatio...