Re: Order of operation on multi core hardware
You claim that the execution order of a C++ program is not defined.
Yes, when writing multi-threaded/multi-core applications I claim (with third party citations) that the observed behaviour of one thread from the point of view of another is not defined. The compiler and CPU can rearrange the order of execution (allowed by the C++ standard). The observed order of execution within the thread is defined (by the C++ standard); not so from the point of view of a second thread (not defined by the C++ standard that most people still use.).
The old C++ standard didn't cover concurrent usage....
Never make concurrent accesses to shared memory and if you do be damned sure you know what you're doing because you're in uncharted territory not covered by the standard
Exactly the point I've been trying to make all along!
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman