PDA

View Full Version : NVIDIA CUDA + Qt



redscorp
6th August 2008, 14:04
Hi All!

I made small program to check if it's possible to integrate NVIDIA CUDA and Qt runtimes in one application. ;)
http://cuda-z.svn.sourceforge.net/viewvc/cuda-z/trunk/
Currently this code builds with MS VS2005 + Qt 4.4.0 + NVIDIA CUDA toolkit 1.1 and w/o big problems can be ported to linux/osx.

Following files can be interesting for you:
- cuda-z.pro (http://cuda-z.svn.sourceforge.net/viewvc/cuda-z/trunk/cuda-z.pro?revision=45&view=markup)
- cudainfo.cu (http://cuda-z.svn.sourceforge.net/viewvc/cuda-z/trunk/src/cudainfo.cu?revision=42&view=markup)
- cudainfo.h (http://cuda-z.svn.sourceforge.net/viewvc/cuda-z/trunk/src/cudainfo.h?revision=35&view=markup)

You can freely use this code. ;)

--
WBR,
AG

hpc
12th July 2010, 14:57
Hey hi,
I am working in Linux. I wanted to ask that for running the above, I need to build the project using QT creator but how will it detect the nvcc then.

wysota
12th July 2010, 15:43
Creator runs qmake and make. So all you need to do is to provide a proper .pro file where you will shadow all the required variables. Alternatively you can write your own platform specs but it's more work.

vikholt
24th October 2010, 17:35
I made small program to check if it's possible to integrate NVIDIA CUDA and Qt runtimes in one application. ;)
http://cuda-z.svn.sourceforge.net/viewvc/cuda-z/trunk/
Currently this code builds with MS VS2005 + Qt 4.4.0 + NVIDIA CUDA toolkit 1.1 and w/o big problems can be ported to linux/osx.


Thank you redscorp. On my new MacBook Pro from mid 2010, I had to add the option '--machine 64' to the nvcc compiler command line options. I did it by hand, by extracting the nvcc line from the 'make' command output, and adding the option manually.

How should the architecture be specified properly, from the .pro project file?