user697111
user697111

Reputation: 2262

GPU Programming

I want to do some GPU programming. What's the way to go here? I want to learn something that is "open" , cross platform and a "higher" language. I don't want to be lock into just GPU vendor nor OS, platform, etc.

What are my choices here? Cuda, OpenCL, OpenMP, other? What's the pros/cons for them?

What about G/HLSL and PhysX?

I'm looking at doing "general purpose" programming, some math, number crunching, simulations, etc. Maybe spit out some pretty graphics, but not specifically graphics programming.

Upvotes: 4

Views: 6632

Answers (6)

user1436187
user1436187

Reputation: 3376

The GPU support for openMP will be available in near future:

http://openmp.org/sc14/Booth-Sam-IBM.pdf

Upvotes: 1

Bob Anderson
Bob Anderson

Reputation: 276

The answer marked correct is now outdated and incorrect. In particular OpenMP 4.0 supports GPU acceleration.

Upvotes: 9

M. Mimpen
M. Mimpen

Reputation: 1232

Nowadays - 2013/2014 - there is C++ Accelerated Massive Parallelism (AMP) of Microsoft. This is a high level language that compiles to High Level Shader Language (HLSL) so you do not have to write kernel code etc.

A simple and easy to read comparison between OpenCL and C++ AMP is done by the AMD folks and is found here (click!).

Upvotes: 1

Erik
Erik

Reputation: 479

Open CL is open but I've heard that a downside to this is the lack of documentation. ATI might be a better between NVIDIA and ATI since it was reportedly faster in 2009 but I'm not sure if those stats are still correct.

Upvotes: 0

Manolete
Manolete

Reputation: 3517

If you want to get involve with GPU and at higher level than OpenCL you might have a look to Matlab. There is a chance to program GPUs via Matlab and you do not need to learn lower models such as OpenCL and CUDA. CUDA it will be more efficient as you probably are going to program a NVIDIA card. However, openCL is the standard for GPGPUs and the way to code is pretty similar. Although you might find not very difficult to use CUDA or openCL, you will really find much harder to optimize them.

I hope it helps.

Upvotes: 0

keepitreall89
keepitreall89

Reputation: 1230

OpenMP is cpu only, but easy to implement, CUDA is basically GPU only. Ati Stream supports both, but only on Ati/AMD gpu's. OpenCL is your only "open" option that supports both.

Upvotes: 4

Related Questions