Jump to content
  • Advertisement
Sign in to follow this  
Inderpreet Singh

Questions about GPGPU

This topic is 1283 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know compute shaders use HLSL, Nvidia has CUDA etc and so on. My question is can C++ be made to run on GPU? If yes, will it be faster than HLSL and CUDA ?

Edited by Inder

Share this post


Link to post
Share on other sites
Advertisement

L. Spiro is the man, one word and you got the answer.

You have to bind the compiled shader and the graphic card knows what he has to do, no other way.

Edited by Alundra

Share this post


Link to post
Share on other sites

I should also point out that CUDA is basically C++, but missing a few things.

Share this post


Link to post
Share on other sites
In a similar vein to C++ AMP, there's SYCL, a khronos standard to embed opencl code directly into c++ code.

It's also worth noting that opencl 2.1 adopted a subset of c++14 as a compute kernel language (basically all of c++ except what you'd expect not to be possible on a GPU)

Share this post


Link to post
Share on other sites
Cuda and opencl 2.1 (no driver supports it atm) allow you to write c++ kernel.
But you can't write function in pure c++ (or even c) code that will execute on the gpu transparently, except maybe with c++ amp.

Share this post


Link to post
Share on other sites
The algorithms you use, and your own knowledge of GPUs will have 100x more performance impact than your choice of language.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!