C++ running on my GTX 460

Soldato
Joined
15 Feb 2011
Posts
10,234
Location
Slough
i'm doing a simple program for my algorithms coursework which needs to use divide and conquer methods to find the convex hull around a large set of points. this sounds like it could be perfect for my GTX 460 to run with its many cores, so i was wondering if there was a simple way of getting a C++ program to run on the graphics card.

anyone know of a simple way of doing this?


by the way, i'm a complete novice at programming. i've just about got my head around the basics of classes in C++, so if you could keep all the technical programming stuff in morons terms that would be great stuff in
 
If you are just starting I would think that using your gfx card would be massive overkill. Play around with that on the sidelines but do it via the method your course requires.

One of the biggest issues I found with certain programs was the disparity between production and test environments leading to an algorithm that works fine but is inefficient and causes problems on a less capable machine.
 
If you are just starting I would think that using your gfx card would be massive overkill. Play around with that on the sidelines but do it via the method your course requires.

One of the biggest issues I found with certain programs was the disparity between production and test environments leading to an algorithm that works fine but is inefficient and causes problems on a less capable machine.

yeah, it was just going to be an aside in my own time. all i wanted to do was see the difference between sorting several million numbers or whatever i needed to do on the graphics card compared to the processor
 
GPGPU! (gpgpu.org)

OpenCL etc if you're using linux or apple. There's a GPGPU standard that MS is doing. I used to be an ATI registered researcher for CTM before they went down the OpenCL route.

You will need to redesign your algorithms to be parallel and then use parallel techniques (such as ping-ponging etc). The key is data dependencies and ensuring you process the data in such a way that the stream processors can execute unhindered.

In the old days the CPU would do 10-13GB/sec max, the X1950XTX did 120GB/sec max. Now it's probably even more.. the killer is the upload/download speed of the PCI-Express bus. So you'll also need to plan data access times carefully with that in mind.
 
Last edited:
If you've got a nvidia card - then you'll want to use nvidia's offering CUDA (plus it has awesome tools).

Note none of CUDA, OpenCL or DirectCompute use C/C++ they all use a specific language (or language extensions) for the task. If you want to stay C++ land there's Thrust or C++ amp (C++11 only).
 
If you've got a nvidia card - then you'll want to use nvidia's offering CUDA (plus it has awesome tools).

Note none of CUDA, OpenCL or DirectCompute use C/C++ they all use a specific language (or language extensions) for the task. If you want to stay C++ land there's Thrust or C++ amp (C++11 only).
ah, this is why the nvidia cuda toolkit thing is looking very confusing.

if someone could link me to something that makes visual studios ('05 or '10) give me the option to compile for my graphics card, or gives me a visual studios like environment for C++ on the graphics card i'll be a happy bunny. other than that its just too much effort for what i want to do with it
 
Back
Top Bottom