Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA wrapper for Qt

Tags:

c++

cuda

qt

opencl

Qt have released a nice wrapper for Opencl ( QtOpencl ) which does a very good job of hiding a lot of boiler plate and making OpenCL play nicely with Qt's display widget and Opengl.

But there are a few things that I can do better in Cuda than OpenCL and the Cuda tools are much more mature.

It's relatively easy to make a simple Cuda C++ wrapper and integrate into the Qt build process but I wondered if anybody had done anything more? Ideally an equivalent QtCuda library.

The Qt people aren't interested in Cuda support because it's not cross platform enough

edit: Just for search, there is a Qt CUDA wrapper for openGL PBO. It's based on the Dr Dobbs simplePBO example. There are a couple of bugs fixes needed to make it play nicely with Cuda4 but it's a good start.

ps there is no way to contact the author of the blog and comments don't work - if he finds this let me know and i will send the fixes.

like image 615
Martin Beckett Avatar asked Jan 18 '11 19:01

Martin Beckett


2 Answers

The way I did it was to build a DLL in Visual Studio, warped CUDA Function call among normal C exported functions. They used LoadLibrary and GetProcAddress from QT IDE. All in all, it worked quite well.

like image 35
aamir Avatar answered Oct 31 '22 23:10

aamir


The Qt people aren't interested in Cuda support because it's not cross platform enough

Exactly. If you want to ignore this, you don't understand Qt's philosophy. And why create even more legacy-code, while it's easy to translate your existing kernels to OpenCL with MultiscaleLab Swan?

But the source of the library is free to download and used as a base.

like image 92
Vincent.StreamComputing Avatar answered Nov 01 '22 01:11

Vincent.StreamComputing