c# with cuda c# can call a cuda dll file?

Hi Guys
I have a question that
first we make some cuda functions and then build it to dll file
second shall we make a new c# project to call the cuda function on dll file
so we can use C# to make to program for computer interface (easier than C++)
and we can get the capacity of CUDA

Now in my computer, I don’t have c# so I can not try to do it
Does anybody has tried to do it, can you tell me that it can work.

Hello!

This exactly what i am doing and it is working! :D

GUI under .NET via C# and rendering/computing core via CUDA in external DLL…

Everything works ok but when i compile Emu_Debug mode i just can’t trace into any of my dll function :( Pdb file should be ok but maybe I am just too lame with those C# things :D

C++ and WIN32 forever! :P

Deploying CUDA library as a COM component makes sense. Instead of packaging the CUDA library as simple C DLL , deploy it as a COM component. You will be able to access your code through tons of languages and scripts and through different machines too.

Cheers,

Neeraj

Thank you Neeraj and lokiman External Image

Your Idea is helpful for me. Now I will download C# express to use it :D

I was wondering if you would be willing to share your C# wrapper to CUDA?

Im interested in using CUDA for non graphics applications but I’m not sure how I can utilise it yet. I wouldn’t like to spend to much time wrapping it up in C# to find it is not of much use to me.

Huh, this is actually what I am working on as well. Maybe we should all collaborate on these open issues to create some concrete code for the community.

For stepping into the dll you need to enable “enable unmanaged code debugging” inside the c# project properties.
For how to work with a c# and c++ dll in general, see my response in [url=“http://forums.nvidia.com/index.php?showtopic=159708”]http://forums.nvidia.com/index.php?showtopic=159708[/url]

How about [url=“http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx”]http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx[/url]? I am currently using it and it looks fine to me.