Combining Windows Forms with CUDA


As part of my phd I am writing a piece of software to carry out computationally intensive simulations, with the idea of offloading the simulations to the graphics card.

I have written the Windows Forms side, and i have also written and tested the hardware side separately. However, i am having trouble linking the two together.

Are there any tutorials, hints, tips or anything that can help me do this.

Tom Clayton
Phd student - University of Edinburgh

I’ve found C++/CLI to be the best for mixing both .net and native. I would make a

library project for CUDA use and then have a windows forms app which depends on

the native lib project. The C++/CLI makes this really easy because you can just call the native functions with IJW “It Just Works”. If you are using C# I’d probably suggest using C++/CLI to create a wrapper project. There are other options, but this is what I’m currently doing also.