C #: perform operations with the GPU, not with the CPU (Calculate Pi)

Recently, I read a lot about software (mainly related to science / math and encryption), which transfers part of its calculations to a GPU, which leads to an increase in speed by 100-1000 (!) Times for supported operations.

Is there a library, API, or other way to run something on the GPU via C #? I think of a simple Pi calculation. I have a GeForce 8800 GTX, if relevant at all (would prefer a solution without a card).

+48
c # api gpu
Aug 08 '09 at 21:02
source share
7 answers

This is a very new technology, but you can explore CUDA . Since your question is tagged with C #, here is the .NET wrapper .

As a bonus, it looks like your 8800 GTX supports CUDA.

+19
Aug 08 '09 at 21:05
source share

Another option that was not mentioned for computing a GPU with C # is Brahma .

Brahma provides LINQ-based abstraction for GPU computing - it is basically LINQ to GPU. It works on OpenGL and DirectX without additional libraries (but requires SM3). Some of the patterns are pretty amazing.

+15
Aug 08 '09 at 22:43
source share

You might want to look at this question.

You may be looking for Accelerator , but if you are interested in developing games in general, I suggest you take a look at XNA

+8
Aug 08 '09 at 21:06
source share

CUDA.NET should be exactly what you are looking for, and seems to support your specific graphics card.

+4
Aug 08 '09 at 21:09
source share

You can access the latest Direct3D APIs from .NET using the Windows API Code Code . Direct3D 11 comes with Compute Shaders. They are roughly comparable to CUDA, but they also work on GPUs other than NVIDIA.

Note that managed DirectX and XNA are limited by the Direct3D 9 feature set, which is somewhat difficult to use for GPGPUs.

+3
Aug 08 '09 at 21:39
source share

There is a set of .Net bindings for the Nvidia CUDA api called CUDA.net . You can refer to the reference manual for a sample C # code.

The preferred way to access your shared proccesor (GPU) is to use OpenCL so that your code is portable with ATI, but I think additional coding may be required, and I'm not sure how much OpenCL support is for the .NET platform.

If you want to use C ++, here is a brief overview on how to get sample code to compile with Visual Studio.

+2
Aug 08 '09 at 21:51
source share

FYI: the accelerator ( http://research.microsoft.com/en-us/projects/Accelerator/ ) did an excellent job with a few tests.

0
Aug 20 '09 at 3:54
source share



All Articles