Commit 0d258483 authored by Pierre NARVOR's avatar Pierre NARVOR
Browse files

[cuda] Moved preprocessor CUDA related definitions in rtac_base (allows basic...

[cuda] Moved preprocessor CUDA related definitions in rtac_base (allows basic types to be used in CUDA as well)
parent 86561a71
...@@ -35,6 +35,7 @@ list(APPEND rtac_base_headers ...@@ -35,6 +35,7 @@ list(APPEND rtac_base_headers
include/rtac_base/type_utils.h include/rtac_base/type_utils.h
include/rtac_base/geometry.h include/rtac_base/geometry.h
include/rtac_base/interpolation.h include/rtac_base/interpolation.h
include/rtac_base/cuda_defines.h
) )
add_library(rtac_base SHARED add_library(rtac_base SHARED
......
...@@ -8,15 +8,7 @@ ...@@ -8,15 +8,7 @@
#include <cuda_runtime.h> #include <cuda_runtime.h>
#include <rtac_base/cuda_defines.h>
#if defined(__CUDACC__) || defined(__CUDABE__)
# define RTAC_CUDACC
# define RTAC_HOSTDEVICE __host__ __device__
# define RTAC_INLINE __forceinline__
#else
# define RTAC_HOSTDEVICE
# define RTAC_INLINE inline
#endif
#define CUDA_CHECK( call ) \ #define CUDA_CHECK( call ) \
do { \ do { \
......
#ifndef _DEF_RTAC_BASE_CUDA_DEFINES_H_
#define _DEF_RTAC_BASE_CUDA_DEFINES_H_
#if defined(__CUDACC__) || defined(__CUDABE__)
# define RTAC_CUDACC
# define RTAC_HOSTDEVICE __host__ __device__
# define RTAC_INLINE __forceinline__
#else
# define RTAC_HOSTDEVICE
# define RTAC_INLINE inline
#endif
#endif //_DEF_RTAC_BASE_CUDA_DEFINES_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment