3 ms·
I wish it was easier to program a GPU... I've already refrained myself to learn vulkan because it scares me, but similarly, opengl and cuda are a bit mysteriou
by jokoon 3y ago
I wish it was easier to program a GPU...
I've already refrained myself to learn vulkan because it scares me, but similarly, opengl and cuda are a bit mysterious to me, and I don't really know how I could take advantage of it, since most computing tasks cannot be made parallel.
I've read there are data structures that are somehow able to take advantage of a GPU as an alternative to the CPU (for example a database running on a GPU), but it seems a very new domain, and I don't have the skill to explore it.
- HalfCrimp 3y agoIf you are comfortable with C++ already then look at Thrust. It's nvidia's analogue to the standard library arrived at GPU computing. Writing and launching raw cuda kernels is too low level for me, but writing with Thrust makes it feel pretty similar to writing regular C++ code. You still need to deal with moving data from host to device and back, but that's as simple as assigning a `thrust::device_vector` to a `thrust::host_vector`
- rnrn 3y agoor look at using standard C++ with an implementation that uses the GPU: https://docs.nvidia.com/hpc-sdk/compilers/c++-parallel-algorithms/index.html https://docs.nvidia.com/hpc-sdk/compilers/c++-parallel-algor...