Integrating CUDA and Windows Forms or WPF

Hi!

I need a GUI for my Cuda application. Currently I have a console application, which is fine for me, but not for others.

I am developing for Windows 7 using Visual Studio 2010 and Cuda 3.2 build customizations.

Can I simply create a GUI in Windows Forms / WPF and then just state an extern “C” funtion, that will be resolved to a function calling a Cuda kernel? I tried to do so just now and I had a lot of compilation errors, including some CLR stuff. Blah. After a quick googling I have an impression, that it isn’t as simple as it seemed.

I am waiting for your ideas and opinions

Kindest regards,
conicall

Use WPF it is the new trend, I presume that you are using C# with NET.

So read this article :

http://www.c-sharpcorner.com/uploadfile/rafaelwo/cuda-integration-with-C-Sharp/

The code is also given there in a ZIP file. It is the same old story of handling unmanaged DLLs in C# so be patient and learn the way. I do not know about CUDA.NET hopefully some time NVIDIA is going to buy it and provide it to the users of NET programming because they are increasing rapidly.

Cheers,

Alexander.

Thank you very much! I followed the tutorial and I have just succeeded at calling a CUDA kernel from C# WPF application :biggrin:

Thank you very much!