[Rtk-users] CMake configuration of CUDA_SDK_ROOT_DIR

MORY, CYRIL Cyril.Mory at philips.com
Thu Jun 20 08:05:44 EDT 2013


Ok, I'll copy-paste the code :)
If, at some point in time, you need to have CMake find the CUDA SDK, you might be interested in knowing that CUDA 5.0 and higher no longer have a cutil.h file. It has been replaced with helper_*.h files, located in the same directory. It's explained in http://stackoverflow.com/questions/12474191/cuda5-examples-has-anyone-translated-some-cutil-definitions-to-cuda5

Regards,
Cyril

-----Message d'origine-----
De : rtk-users-bounces at openrtk.org [mailto:rtk-users-bounces at openrtk.org] De la part de Simon Rit
Envoyé : jeudi 20 juin 2013 10:50
À : MORY, CYRIL
Cc : rtk-users at openrtk.org
Objet : Re: [Rtk-users] CMake configuration of CUDA_SDK_ROOT_DIR

Hi Cyril,
We are not using the SDK features. But if you look at FindCUDA.cmake, it does
  find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h which means that you have to point to the directory containing "common/inc/cutil.h".
But you still have to modify the CMakeLists.txt on the RTK side. This is explained in FindCUDA.Cmake :
# Example of how to find an include file from the CUDA_SDK_ROOT_DIR

# find_path(CUDA_CUT_INCLUDE_DIR
#   cutil.h
#   PATHS ${CUDA_SDK_SEARCH_PATH}
#   PATH_SUFFIXES "common/inc"
#   DOC "Location of cutil.h"
#   NO_DEFAULT_PATH
#   )
# # Now search system paths
# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h")

# mark_as_advanced(CUDA_CUT_INCLUDE_DIR)

So far, we have always preferred to copy/paste the code...
Simon

On Wed, Jun 19, 2013 at 3:05 PM, MORY, CYRIL <Cyril.Mory at philips.com> wrote:
> Hi everyone,
>
>
>
> I'm developing a CUDA filter and I'd like to use addition between
> objects of type int4.
>
> Operators between CUDA vector types are defined in the header file
> helper_math.h included in the CUDA SDK. But when typing #include
> <helper_math.h> in my CUDA file, the IDE tells me the file can't be found.
>
> Is it related to the fact that in my CMake configuration of RTK, the
> line CUDA_SDK_ROOT_DIR is not found ? (CMake says "CUDA_SDK_ROOT_DIR-NOTFOUND").
>
> If so, how am I supposed to configure this line ?
>
> If not, do you have a solution to propose (I could just copy paste the
> file, but it's dirty) ?
>
>
>
> Regards,
>
> ==========================================
>
> Cyril Mory
>
> PhD student at Philips Medisys and CREATIS
>
>
>
> Groupement Hospitalier Est
>
> Hôpital Cardiologique Louis Pradel
>
> Laboratoire CREATIS - Bât. B13
>
> CNRS UMR5220, INSERM U1044, INSA-Lyon, Univ. Lyon 1
>
> 28, Avenue du Doyen LEPINE
>
> 69677 Bron cedex FRANCE
>
>
>
> Office : +33 4 72 35 74 12
>
> Cell : +33 6 69 46 73 79
>
>
>
>
> ________________________________
> The information contained in this message may be confidential and
> legally protected under applicable law. The message is intended solely
> for the addressee(s). If you are not the intended recipient, you are
> hereby notified that any use, forwarding, dissemination, or
> reproduction of this message is strictly prohibited and may be
> unlawful. If you are not the intended recipient, please contact the
> sender by return e-mail and destroy all copies of the original message.
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at openrtk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users
>
_______________________________________________
Rtk-users mailing list
Rtk-users at openrtk.org
http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.




More information about the Rtk-users mailing list