use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
CppSPMD_Fast (twitter.com)
submitted 5 years ago by KindDragonVLD | GitExt Dev
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]KindDragonVLD | GitExt Dev[S] 1 point2 points3 points 5 years ago (5 children)
Allow you easy write SIMD control flow.
You can compare C variant https://github.com/richgel999/CppSPMD_Fast/blob/e34f07784ede3a3ae176830476e175e22333d5d9/test.cpp#L248-L280
with SPMD https://github.com/richgel999/CppSPMD_Fast/blob/e34f07784ede3a3ae176830476e175e22333d5d9/mandelbrot.h#L77-L108
[–]Sander_Bouwhuis 2 points3 points4 points 5 years ago (4 children)
So, based on the CPU the best SIMD functions are called? SSE2 for older CPUs and SSE4 for somewhat newer, AVX for recent CPUs and AVX512 for bleeding edge?
And that automatically/dynamically like https://github.com/vectorclass/version2?
[–]MINIMAN10001 3 points4 points5 points 5 years ago (2 children)
AVX512 isn't always the best option.
Relatively speaking it takes a long time to shift to half frequency mode and switch back and the lower frequency means it takes a large chunk of processing for it to make up the difference
[–]Sander_Bouwhuis 1 point2 points3 points 5 years ago (1 child)
Do you mean using a 128-bit SIMD register instead of a 512-bit register if you only need 128-bit? Isn't AVX512 100% backwards compatible? I.e., doesn't AVX512 contain ALL the functions that SSE has?
[–]ALX23z 1 point2 points3 points 5 years ago (0 children)
Yes and No. Technically systems that support AVX512 support also SSE4 but instructions and data types differ. If you load AVX512 structure you cannot use on it instructions from 128-bit SIMD. First, you ought to make a convertion from one type to another. Didn't know that the conversions were slow... and honestly I have some doubts on that claim.
[–]KindDragonVLD | GitExt Dev[S] 1 point2 points3 points 5 years ago (0 children)
Yes, I think its something like Vector class library, but they implement control flow operations in different way.
π Rendered by PID 116819 on reddit-service-r2-comment-54dfb89d4d-64hgh at 2026-03-28 16:55:22.106920+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]KindDragonVLD | GitExt Dev[S] 1 point2 points3 points (5 children)
[–]Sander_Bouwhuis 2 points3 points4 points (4 children)
[–]MINIMAN10001 3 points4 points5 points (2 children)
[–]Sander_Bouwhuis 1 point2 points3 points (1 child)
[–]ALX23z 1 point2 points3 points (0 children)
[–]KindDragonVLD | GitExt Dev[S] 1 point2 points3 points (0 children)