CUDA and CImg

Hi all,

I would like to know how I can compile CImg (library for image preccesing) with CUDA project (*.cu files). I need to handle images with CUDA technology for improved the time processing.

In CUDA there is a makefile as follows:

############################################################
####################

Build script for project

############################################################
####################

Add source files here

EXECUTABLE := cuda_cimg_project

Cuda source files (compiled with cudacc)

CUFILES := cuda_cimg_project .cu

C/C++ source files (compiled with gcc / c++)

CCFILES := cuda_cimg_project _gold.cpp

############################################################
####################

Rules and targets

include …/…/common/common.mk

Should I add something?

Thanks for advance,

Best Regards.

Fernando

Hi ¡¡

Its a very interesting issue. In fact, I tried to address the same issue
but without success. Please, post any advance in case you solve it. BTW,
what is your aim with this? job? I know about some open positions for
CUDA developers near London, but, where are you from?

Best wishes

Hi cirius,

I have solved the problem, at least I think so. I’ve had to modify the common.mk, and I added the following line:

LINK: = g + + -4.3-fPIC-O2 -L/usr/X11R6/lib-lm-lpthread-lX11

With this you can run the make command in your project and compile!.
It is important that the code CImg is in the *. cpp / *. cc and the rest in the *. cu and _kernel.cu.

I am developing a work for the university in Spain.

I hope that helped you.

Regards,

Fernando