Config.h
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2013-2015 Imperial College London
5  * Copyright 2013-2015 Andreas Schuh
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef MIRTK_Config_H
21 #define MIRTK_Config_H
22 
23 
24 // ===========================================================================
25 // General
26 // ===========================================================================
27 
28 /// Whether to build for execution on Microsoft Windows
29 #ifndef WINDOWS
30 # if defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS) || defined(WIN32)
31 # define WINDOWS
32 # endif
33 #endif
34 
35 /// Precision of floating point types to use by default
36 /// 0: single-precision 1: double-precision
37 #define MIRTK_USE_FLOAT_BY_DEFAULT 0
38 
39 // ===========================================================================
40 // CUDA
41 // ===========================================================================
42 
43 // ---------------------------------------------------------------------------
44 #ifndef MIRTKCU_API
45 # if __CUDACC__
46 # define MIRTKCU_API __device__ __host__
47 # else
48 # define MIRTKCU_API
49 # endif
50 #endif
51 
52 // ---------------------------------------------------------------------------
53 #ifndef MIRTKCU_HOST_API
54 # if __CUDACC__
55 # define MIRTKCU_HOST_API __host__
56 # else
57 # define MIRTKCU_HOST_API
58 # endif
59 #endif
60 
61 // ---------------------------------------------------------------------------
62 #ifndef MIRTKCU_DEVICE_API
63 # if __CUDACC__
64 # define MIRTKCU_DEVICE_API __device__
65 # else
66 # define MIRTKCU_DEVICE_API
67 # endif
68 #endif
69 
70 
71 #endif // MIRTK_Config_H