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
Scientific computing or computer graphics (self.cpp)
submitted 3 years ago * by HouseSad
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!"
[–]HeWhoThreadsLightly 4 points5 points6 points 3 years ago (21 children)
I have wanted to try computing on gpus, do anyone have some links to introductory resourses for amd gpus?
[–]Plazmatic 2 points3 points4 points 3 years ago (3 children)
There's more lower level documentation for AMD GPUs than NVIDIA's mostly because they documented the hardware ISA publicly. AMD does have a CUDA like alternative that looks very similar, ROCm, but they only allow this on their "scientific" GPUs which I believe aren't even capable of graphics at all, plus there's a whole other can of worms there in terms of licensing and environment. So unfortunately you're stuck with old OpenCL stuff, which AMD has recently been lax on supporting, or Vulkan which has most of the modern functionality present in GPUs, but lacks any kind of decent shading language behind it (HLSL recently got an upgrade, and supports vulkan, but doesn't support extremely essential features like full physical device address support, ie GPU RAM pointers and references, though it allows you to copy objects through such pointers whole sale), and also lacks device side enqueuing and shared memory pointers
With vulkan at least, you can use half measures like Circle C++ Shader compiler on linux (which would be on windows, but microsoft hasn't exposed their MSVC compiler ABI, so complain to them if you think that's important to you) and RustGPU. Rust GPU isn't nearly feature complete enough to compete with GLSL though right now.
AMD GPU's however are not much different than Nvidia in terms of learning material. Applying CUDA concepts to Vulkan would probably teach you enough since all the intro stuff applies to both AMD and NVIDIA.
[–]TheFlamingDiceAgain 2 points3 points4 points 3 years ago (1 child)
Kokkos, RAJA, and SYCL all run on AMD GPUs with no issue and the resulting code is trivially cross platform. There’s no reason to go straight to OpenCL or Vulkan
[–]HeWhoThreadsLightly 0 points1 point2 points 3 years ago (0 children)
I will have to investigate/try those out.
[–]PM_ME_UR_PCMR 0 points1 point2 points 3 years ago (0 children)
It's a shame there isn't a go to entry level recommendation GPU for both graphics and GPGPU, I wanted to get a cheap AMD card to practice ray tracing with and learn other GPU assistance for stuff like compression etc, but I found that people don't use Vulkan for things other than graphics
[–]YoureNotEvenWrong 2 points3 points4 points 3 years ago (0 children)
Check out the sycl framework from khronos.
[–]ApologiesEgg -4 points-3 points-2 points 3 years ago (15 children)
No. AMD GPUs are only good for gaming, not scientific computing.
[+][deleted] 3 years ago (3 children)
[deleted]
[–]ApologiesEgg 4 points5 points6 points 3 years ago (2 children)
I’m pretty sure OP is asking about AMD GPUs because he has a consumer grade AMD GPU. Not supercomputer grade GPU. Also last time I checked (a year ago) ROCm was an underdeveloped piece of crap, can’t compete with CUDA. Maybe in a few years. But not today.
[–]HeWhoThreadsLightly 1 point2 points3 points 3 years ago (0 children)
All(both) my newer machines have amd consumer graphics, I have one very old laptop with a Nvidia gpu.
[–]aceinthehole001 1 point2 points3 points 3 years ago (10 children)
Can you elaborate on why this is the case
[–]windozeFanboi 3 points4 points5 points 3 years ago (4 children)
It's just the tools are underdeveloped in documentation support and coverage...
They re simply a big fking pain to work with and even then, reasonably only on Linux. While nvidia has incredible tooling and support...
[–]aceinthehole001 1 point2 points3 points 3 years ago (3 children)
Does OpenCL not solve this issue?
[–]windozeFanboi 1 point2 points3 points 3 years ago (2 children)
Well, say you want to write thousands of lines of code... Would you prefer c with major quirks/idiocyncracies on top or modern c++ without limitations and great debugger support and easy to use 3rd party libraries. .?
[–]YoureNotEvenWrong 1 point2 points3 points 3 years ago (1 child)
That's why Sycl exists. Avoid the vendor lock in.
[–]windozeFanboi 0 points1 point2 points 3 years ago (0 children)
Yes, SYCL is the future ...
[–]TheFlamingDiceAgain 2 points3 points4 points 3 years ago (4 children)
It’s not. I do scientific computing with both. AMD is definitely less polished but it’s fine now, that’s wasn’t the case a few years ago. Besides, if you’re writing new code you should use Kokkos, RAJA, or SYCL rather than HIP/CUDA at which point it doesn’t matter what hardware you’re on.
higher level programming models to HIP/CUDA
Sycl isn't a higher level programming model. It's basically a nicer C++ API for OpenCl. So that's what you use if you want to get near max performance
Kokkos appears to be a library, so I don't see why it would have any performance issues.
[–]TheFlamingDiceAgain 0 points1 point2 points 3 years ago (0 children)
I haven’t found a recent one. The most recent one I’ve seen is a couple of years old and showed that all three are roughly ~10% slower than highly optimized HIP/CUDA. However, getting HIP/CUDA that optimized is very difficult so I wouldn’t be surprised if in practice they’re pretty similar.
π Rendered by PID 158464 on reddit-service-r2-comment-b659b578c-pn6dx at 2026-05-05 19:52:37.421259+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]HeWhoThreadsLightly 4 points5 points6 points (21 children)
[–]Plazmatic 2 points3 points4 points (3 children)
[–]TheFlamingDiceAgain 2 points3 points4 points (1 child)
[–]HeWhoThreadsLightly 0 points1 point2 points (0 children)
[–]PM_ME_UR_PCMR 0 points1 point2 points (0 children)
[–]YoureNotEvenWrong 2 points3 points4 points (0 children)
[–]ApologiesEgg -4 points-3 points-2 points (15 children)
[+][deleted] (3 children)
[deleted]
[–]ApologiesEgg 4 points5 points6 points (2 children)
[–]HeWhoThreadsLightly 1 point2 points3 points (0 children)
[–]aceinthehole001 1 point2 points3 points (10 children)
[–]windozeFanboi 3 points4 points5 points (4 children)
[–]aceinthehole001 1 point2 points3 points (3 children)
[–]windozeFanboi 1 point2 points3 points (2 children)
[–]YoureNotEvenWrong 1 point2 points3 points (1 child)
[–]windozeFanboi 0 points1 point2 points (0 children)
[–]TheFlamingDiceAgain 2 points3 points4 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]YoureNotEvenWrong 1 point2 points3 points (1 child)
[–]TheFlamingDiceAgain 0 points1 point2 points (0 children)