CLRX  1
An unofficial OpenCL extensions designed for Radeon GPUs
Config.h
Go to the documentation of this file.
1 /*
2  * CLRadeonExtender - Unofficial OpenCL Radeon Extensions Library
3  * Copyright (C) 2014-2018 Mateusz Szpakowski
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
24 #ifndef __CLRX_CONFIG_H__
25 #define __CLRX_CONFIG_H__
26 
28 #define CLRX_VERSION "0.1.9"
29 
31 #define CLRX_MAJOR_VERSION 0
32 #define CLRX_MINOR_VERSION 1
34 #define CLRX_MICRO_VERSION 9
36 #define CLRX_REVISION ""
38 #define CLRX_VERSION_NUMBER (CLRX_MAJOR_VERSION*10000U + CLRX_MINOR_VERSION*100U + \
40  CLRX_MICRO_VERSION)
41 
42 #define HAVE_GNU11
43 
44 /* #undef HAVE_ELF_H */
45 
46 /* #undef HAVE_INT128 */
47 
48 #define HAVE_CALL_ONCE
49 
50 #define HAVE_OPENGL
51 
52 /* architecture setup */
53 
54 #if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || \
55  defined(_M_IX86) || defined(__i386) || defined(_X86_)
56 # define HAVE_ARCH_INTEL 1
57 # define HAVE_ARCH_X86 1
58 # define HAVE_32BIT 1
59 #endif
60 
61 #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \
62  defined(_M_X64) || defined(_M_AMD64)
63 # define HAVE_ARCH_INTEL 1
64 # define HAVE_ARCH_X86_64 1
65 # define HAVE_64BIT 1
66 #endif
67 
68 #if defined(__powerpc__) || defined(__powerpc) || defined(_M_PPC) || \
69  defined(__POWERPC__) || defined(__ppc)
70 # define HAVE_ARCH_POWERPC 1
71 # if defined(__powerpc64__) || defined(__ppc64__) || _M_PPC>=620 || defined(__arch64__)
72 # define HAVE_ARCH_POWERPC64 1
73 # define HAVE_64BIT 1
74 # else
75 # define HAVE_ARCH_POWERPC32 1
76 # define HAVE_32BIT 1
77 # endif
78 #endif
79 
80 #if defined(__arm__) || defined(__thumb__) || defined(_M_ARM) || defined(_M_ARMT)
81 # define HAVE_ARCH_ARM 1
82 # if defined(__aarch64__)
83 # define HAVE_ARCH_ARM64 1
84 # define HAVE_64BIT 1
85 # else
86 # define HAVE_ARCH_ARM32 1
87 # define HAVE_32BIT 1
88 # endif
89 #endif
90 
91 #if !defined(HAVE_ARCH_ARM) && defined(__aarch64__)
92 # define HAVE_ARCH_ARM 1
93 # define HAVE_ARCH_ARM64 1
94 # define HAVE_64BIT 1
95 #endif
96 
97 #if defined(__sparc__) || defined(__sparc)
98 # define HAVE_ARCH_SPARC 1
99 # if defined(__sparc_v9__) || defined(__sparcv9)
100 # define HAVE_ARCH_SPARC64 1
101 # define HAVE_64BIT 1
102 # else
103 # define HAVE_ARCH_SPARC32 1
104 # define HAVE_32BIT 1
105 # endif
106 #endif
107 
108 /* endianness */
109 #if defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || \
110  defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB__) || \
111  defined(__MIPSEB)
112 # define HAVE_BIG_ENDIAN 1
113 #else
114 # define HAVE_LITTLE_ENDIAN 1
115 #endif
116 
117 /* machine bits */
118 #if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
119 # ifdef _WIN64
120 # define HAVE_64BIT 1
121 # else
122 # ifdef _WIN32
123 # define HAVE_32BIT 1
124 # endif
125 # endif
126 #endif
127 
128 #if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
129 # if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__==8
130 # define HAVE_64BIT 1
131 # else
132 # define HAVE_32BIT 1
133 # endif
134 #endif
135 
136 /* operating system */
137 
138 #ifdef __GNU__
139 # define HAVE_GNU 1
140 #endif
141 
142 #if defined(__linux__) || defined(linux)
143 # define HAVE_LINUX 1
144 #endif
145 
146 #if defined(_WIN32) || defined(_WIN64) || defined(__WINDOWS__) || defined(__WIN32__)
147 # define HAVE_WINDOWS 1
148 #endif
149 
150 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
151  defined(__bsdi__) || defined(__DragonFly__)
152 # define HAVE_BSD 1
153 #endif
154 
155 #if defined(__MINGW32__) || defined(__MINGW64__)
156 # define HAVE_MINGW 1
157 #endif
158 
159 /* config setup */
160 
161 #ifndef HAVE_WINDOWS
162 # define SYSTEM_CONFIG_PATH "/etc"
164 
165 # ifdef HAVE_32BIT
166 # define DEFAULT_AMDOCLNAME "libamdocl32.so"
168 # else
169 # define DEFAULT_AMDOCLNAME "libamdocl64.so"
171 # endif
172 
174 # define CLRX_NATIVE_DIR_SEP '/'
175 # define CLRX_NATIVE_DIR_SEP_S "/"
177 
179 # define CLRX_ALT_DIR_SEP '\\'
180 # define CLRX_ALT_DIR_SEP_S "\\"
182 
183 #else
184 # define SYSTEM_CONFIG_PATH "c:\\etc"
186 
187 # ifdef HAVE_32BIT
188 # define DEFAULT_AMDOCLNAME "amdocl.dll"
190 # else
191 # define DEFAULT_AMDOCLNAME "amdocl64.dll"
193 # endif
194 
196 # define CLRX_NATIVE_DIR_SEP '\\'
197 # define CLRX_NATIVE_DIR_SEP_S "\\"
199 
201 # define CLRX_ALT_DIR_SEP '/'
202 # define CLRX_ALT_DIR_SEP_S "/"
204 
205 # ifndef HAVE_MINGW
206 # define strcasecmp(A,B) _stricmp(A,B)
207 # define strncasecmp(A,B,N) _strnicmp(A,B,N)
208 # if defined(_MSC_VER) && _MSC_VER<1900
209 # define snprintf(B,N,F,...) _snprintf(B,N,F,__VA_ARGS__)
210 # endif
211 # endif
212 #endif
213 
214 /* symbols visibility */
215 
216 #if __GNUC__ >= 4 && !defined(__CYGWIN__) && !defined(HAVE_MINGW)
217 # define CLRX_INTERNAL __attribute__((visibility("hidden")))
218 #else
219 # define CLRX_INTERNAL
220 #endif
221 
222 /* types and defs */
223 
225 typedef signed char cxchar;
227 typedef unsigned char cxuchar;
229 typedef unsigned char cxbyte;
231 typedef signed short cxshort;
233 typedef unsigned short cxushort;
235 typedef signed int cxint;
237 typedef unsigned int cxuint;
239 typedef signed long cxlong;
241 typedef unsigned long cxulong;
243 typedef signed long long cxllong;
245 typedef unsigned long long cxullong;
246 #ifdef _MSC_VER
247 # ifdef HAVE_64BIT
248 typedef signed long long ssize_t;
249 # define SSIZE_MIN (-9223372036854775808LL)
250 # define SSIZE_MAX (9223372036854775807LL)
251 # else
252 typedef signed long ssize_t;
253 # define SSIZE_MIN (-2147483648LL)
254 # define SSIZE_MAX (2147483647LL)
255 # endif
256 # define NOMINMAX
257 #endif
258 
259 #if __cplusplus < 201103L || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || defined(HAVE_MINGW)
260 # ifndef __STDC_LIMIT_MACROS
261 # define __STDC_LIMIT_MACROS 1
262 # endif
263 # ifndef __STDC_FORMAT_MACROS
264 # define __STDC_FORMAT_MACROS 1
265 # endif
266 #endif
267 
268 #endif
signed short cxshort
signed short
Definition: Config.h:231
signed char cxchar
signed character (signed byte)
Definition: Config.h:225
signed long cxlong
signed long
Definition: Config.h:239
unsigned char cxuchar
unsigned character (unsigned byte)
Definition: Config.h:227
unsigned long long cxullong
unsigned long long
Definition: Config.h:245
unsigned char cxbyte
unsigned byte
Definition: Config.h:229
unsigned int cxuint
unsigned int
Definition: Config.h:237
unsigned short cxushort
unsigned short
Definition: Config.h:233
unsigned long cxulong
unsigned long
Definition: Config.h:241
signed long long cxllong
signed long long
Definition: Config.h:243
signed int cxint
signed int
Definition: Config.h:235