ocl: fix CL_RUNTIME_EXPORT for master branch
[profile/ivi/opencv.git] / modules / ocl / src / precomp.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 //  By downloading, copying, installing or using the software you agree to this license.
6 //  If you do not agree to this license, do not download, install,
7 //  copy or use the software.
8 //
9 //
10 //                           License Agreement
11 //                For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2010-2012, Institute Of Software Chinese Academy Of Science, all rights reserved.
14 // Copyright (C) 2010-2012, Advanced Micro Devices, Inc., all rights reserved.
15 // Copyright (C) 2010-2012, Multicoreware, Inc., all rights reserved.
16 // Third party copyrights are property of their respective owners.
17 //
18 // @Authors
19 //    Guoping Long, longguoping@gmail.com
20 //    Yao Wang, bitwangyaoyao@gmail.com
21 //
22 // Redistribution and use in source and binary forms, with or without modification,
23 // are permitted provided that the following conditions are met:
24 //
25 //   * Redistribution's of source code must retain the above copyright notice,
26 //     this list of conditions and the following disclaimer.
27 //
28 //   * Redistribution's in binary form must reproduce the above copyright notice,
29 //     this list of conditions and the following disclaimer in the documentation
30 //     and/or other oclMaterials provided with the distribution.
31 //
32 //   * The name of the copyright holders may not be used to endorse or promote products
33 //     derived from this software without specific prior written permission.
34 //
35 // This software is provided by the copyright holders and contributors "as is" and
36 // any express or implied warranties, including, but not limited to, the implied
37 // warranties of merchantability and fitness for a particular purpose are disclaimed.
38 // In no event shall the Intel Corporation or contributors be liable for any direct,
39 // indirect, incidental, special, exemplary, or consequential damages
40 // (including, but not limited to, procurement of substitute goods or services;
41 // loss of use, data, or profits; or business interruption) however caused
42 // and on any theory of liability, whether in contract, strict liability,
43 // or tort (including negligence or otherwise) arising in any way out of
44 // the use of this software, even if advised of the possibility of such damage.
45 //
46 //M*/
47
48 #ifndef __OPENCV_PRECOMP_H__
49 #define __OPENCV_PRECOMP_H__
50
51 #if defined _MSC_VER && _MSC_VER >= 1200
52 #pragma warning( disable: 4267 4324 4244 4251 4710 4711 4514 4996 )
53 #endif
54
55 #if defined(_WIN32)
56 #include <windows.h>
57 #endif
58
59 #include "cvconfig.h"
60
61 #if defined(BUILD_SHARED_LIBS)
62 #if defined WIN32 || defined _WIN32 || defined WINCE
63 #define CL_RUNTIME_EXPORT __declspec(dllexport)
64 #elif defined __GNUC__ && __GNUC__ >= 4
65 #define CL_RUNTIME_EXPORT __attribute__ ((visibility ("default")))
66 #else
67 #define CL_RUNTIME_EXPORT
68 #endif
69 #else
70 #define CL_RUNTIME_EXPORT
71 #endif
72
73 #include <map>
74 #include <iostream>
75 #include <limits>
76 #include <vector>
77 #include <algorithm>
78 #include <sstream>
79 #include <exception>
80 #include <stdio.h>
81
82 #undef OPENCV_NOSTL
83
84 #include "opencv2/imgproc.hpp"
85 #include "opencv2/objdetect/objdetect_c.h"
86 #include "opencv2/ocl.hpp"
87
88 #include "opencv2/core/utility.hpp"
89 #include "opencv2/core/private.hpp"
90
91 #define __ATI__
92
93 #if defined (HAVE_OPENCL)
94
95 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
96 #include "opencv2/ocl/private/util.hpp"
97 #include "safe_call.hpp"
98
99 #else /* defined(HAVE_OPENCL) */
100
101 static inline void throw_nogpu()
102 {
103     CV_Error(CV_GpuNotSupported, "The library is compilled without OpenCL support.\n");
104 }
105
106 #endif /* defined(HAVE_OPENCL) */
107
108 #endif /* __OPENCV_PRECOMP_H__ */