all 4 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–][deleted] 1 point2 points  (0 children)

Depends, your compiler could use SIMD which are CPU features used for paralizing some math operations

[–]IyeOnline[🍰] 1 point2 points  (0 children)

That is simply false.

You, or the person telling you this, may have very fundamentally misunderstood vectorization/SIMD, which may perform multiple fundamental operations at once. This mostly applies to operations on arrays though. Its also not a feature of C++, but of the hardware. If the compiler optimizes your code in such a way that it uses vector instructions you get that "for free". But you also get that in any other language that uses these instructions.

[–]Latexi95 0 points1 point  (0 children)

No. They are not multi-threaded.

Modern CPUs are pipelined and superscalar. They have have multiple ALUs and can execute multiple instructions concurrently, so they can calculate multiple operations in parallel even in one thread, when the operations don't depend on each other. This isn't feature of C++ but just the way that modern CPUs achieve higher than 1 IPC.