MorphoGraphX  2.0-1-227
CudaGlobal.hpp
Go to the documentation of this file.
1 //
2 // This file is part of MorphoGraphX - http://www.MorphoGraphX.org
3 // Copyright (C) 2012-2015 Richard S. Smith and collaborators.
4 //
5 // If you use MorphoGraphX in your work, please cite:
6 // http://dx.doi.org/10.7554/eLife.05864
7 //
8 // MorphoGraphX is free software, and is licensed under under the terms of the
9 // GNU General (GPL) Public License version 2.0, http://www.gnu.org/licenses.
10 //
11 #ifndef CUDA_GLOBAL_H
12 #define CUDA_GLOBAL_H
13 
14 /*
15  * \file CudaGlobal.hpp
16  *
17  * Defines global items for cuda
18  */
19 #ifdef __CUDACC__
20  #define CU_HOST_DEVICE __host__ __device__ inline
21 #else
22  #define CU_HOST_DEVICE inline
23 #endif
24 
25 #ifdef WIN32
26  #ifdef THRUST_BACKEND_CUDA
27  #ifdef cuda_EXPORTS
28  #define cuda_EXPORT extern "C" __declspec(dllexport)
29  #else
30  #define cuda_EXPORT extern "C" __declspec(dllimport)
31  #endif
32  #else
33  #ifdef mgx_EXPORTS
34  #define cuda_EXPORT extern "C" __declspec(dllexport)
35  #else
36  #define cuda_EXPORT extern "C" __declspec(dllimport)
37  #endif
38  #endif
39 #else
40  #define cuda_EXPORT
41 #endif
42 
43 #define CU_EPSILON 1e-10f
44 
45 #endif