I'm reading some of the C++ working standard, and I arrive at the chapter on Atomic Operations Library.
Are these types/operations which will never be split over various threads, i.e., thread-safe types and operations?
If that's true, why are there types like "atomic_bool" ? A normal primitive 'bool' is already type safe?
Further, could someone explain me some of the applications? Massive parallel for example?
Thanks for your explications!!!
Being type-safe and thread-safe are completely different concepts.
> Further, could someone explain me some of the applications?
Anything involving threads.
On a single CPU, the granularity is a single instruction.
On a multi-CPU system, the granularity is a bus cycle.
What the atomic types guarantee is that the objects will still do the right thing, despite the increased opportunity for interleaving the actions of multiple CPUs.
That's no longer true with multi-core CPUs.
Originally Posted by Salem
I'd say that "single CPU" means "Single core" - Multi-CPU systems are those with more than one processing unit, no matter if that is provided through a single chip or multiple chips.
Note that for example a single-core CPU with an "intelligent" graphics processor, is also a "multiprocessor" system. Although it is of course only relevant for data shared between the CPU and the GPU.
 Literally anything more advanced than the VGA graphics adapters, and certainly ALL of the 3D graphics cards are "intelligent" in this context.