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.7"
29 
31 #define CLRX_MAJOR_VERSION 0
32 #define CLRX_MINOR_VERSION 1
34 #define CLRX_MICRO_VERSION 7
36 #define CLRX_REVISION ""
38 
39 #define HAVE_GNU11
40 
41 /* #undef HAVE_ELF_H */
42 
43 /* #undef HAVE_INT128 */
44 
45 #define HAVE_CALL_ONCE
46 
47 #define HAVE_OPENGL
48 
49 /* architecture setup */
50 
51 #if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || \
52  defined(_M_IX86) || defined(__i386) || defined(_X86_)
53 # define HAVE_ARCH_INTEL 1
54 # define HAVE_ARCH_X86 1
55 # define HAVE_32BIT 1
56 #endif
57 
58 #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \
59  defined(_M_X64) || defined(_M_AMD64)
60 # define HAVE_ARCH_INTEL 1
61 # define HAVE_ARCH_X86_64 1
62 # define HAVE_64BIT 1
63 #endif
64 
65 #if defined(__powerpc__) || defined(__powerpc) || defined(_M_PPC) || \
66  defined(__POWERPC__) || defined(__ppc)
67 # define HAVE_ARCH_POWERPC 1
68 # if defined(__powerpc64__) || defined(__ppc64__) || _M_PPC>=620 || defined(__arch64__)
69 # define HAVE_ARCH_POWERPC64 1
70 # define HAVE_64BIT 1
71 # else
72 # define HAVE_ARCH_POWERPC32 1
73 # define HAVE_32BIT 1
74 # endif
75 #endif
76 
77 #if defined(__arm__) || defined(__thumb__) || defined(_M_ARM) || defined(_M_ARMT)
78 # define HAVE_ARCH_ARM 1
79 # if defined(__aarch64__)
80 # define HAVE_ARCH_ARM64 1
81 # define HAVE_64BIT 1
82 # else
83 # define HAVE_ARCH_ARM32 1
84 # define HAVE_32BIT 1
85 # endif
86 #endif
87 
88 #if !defined(HAVE_ARCH_ARM) && defined(__aarch64__)
89 # define HAVE_ARCH_ARM 1
90 # define HAVE_ARCH_ARM64 1
91 # define HAVE_64BIT 1
92 #endif
93 
94 /* endianness */
95 #if defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || \
96  defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB__) || \
97  defined(__MIPSEB)
98 # define HAVE_BIG_ENDIAN 1
99 #else
100 # define HAVE_LITTLE_ENDIAN 1
101 #endif
102 
103 /* machine bits */
104 #if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
105 # ifdef _WIN64
106 # define HAVE_64BIT 1
107 # else
108 # ifdef _WIN32
109 # define HAVE_32BIT 1
110 # endif
111 # endif
112 #endif
113 
114 #if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
115 # if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__==8
116 # define HAVE_64BIT 1
117 # else
118 # define HAVE_32BIT 1
119 # endif
120 #endif
121 
122 /* operating system */
123 
124 #ifdef __GNU__
125 # define HAVE_GNU 1
126 #endif
127 
128 #if defined(__linux__) || defined(linux)
129 # define HAVE_LINUX 1
130 #endif
131 
132 #if defined(_WIN32) || defined(_WIN64) || defined(__WINDOWS__) || defined(__WIN32__)
133 # define HAVE_WINDOWS 1
134 #endif
135 
136 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
137  defined(__bsdi__) || defined(__DragonFly__)
138 # define HAVE_BSD 1
139 #endif
140 
141 #if defined(__MINGW32__) || defined(__MINGW64__)
142 # define HAVE_MINGW 1
143 #endif
144 
145 /* config setup */
146 
147 #ifndef HAVE_WINDOWS
148 # define SYSTEM_CONFIG_PATH "/etc"
150 
151 # ifdef HAVE_32BIT
152 # define DEFAULT_AMDOCLNAME "libamdocl32.so"
154 # else
155 # define DEFAULT_AMDOCLNAME "libamdocl64.so"
157 # endif
158 
160 # define CLRX_NATIVE_DIR_SEP '/'
161 # define CLRX_NATIVE_DIR_SEP_S "/"
163 
165 # define CLRX_ALT_DIR_SEP '\\'
166 # define CLRX_ALT_DIR_SEP_S "\\"
168 
169 #else
170 # define SYSTEM_CONFIG_PATH "c:\\etc"
172 
173 # ifdef HAVE_32BIT
174 # define DEFAULT_AMDOCLNAME "amdocl.dll"
176 # else
177 # define DEFAULT_AMDOCLNAME "amdocl64.dll"
179 # endif
180 
182 # define CLRX_NATIVE_DIR_SEP '\\'
183 # define CLRX_NATIVE_DIR_SEP_S "\\"
185 
187 # define CLRX_ALT_DIR_SEP '/'
188 # define CLRX_ALT_DIR_SEP_S "/"
190 
191 # ifndef HAVE_MINGW
192 # define strcasecmp(A,B) _stricmp(A,B)
193 # define strncasecmp(A,B,N) _strnicmp(A,B,N)
194 # if defined(_MSC_VER) && _MSC_VER<1900
195 # define snprintf(B,N,F,...) _snprintf(B,N,F,__VA_ARGS__)
196 # endif
197 # endif
198 #endif
199 
200 /* symbols visibility */
201 
202 #if __GNUC__ >= 4 && !defined(__CYGWIN__) && !defined(HAVE_MINGW)
203 # define CLRX_INTERNAL __attribute__((visibility("hidden")))
204 #else
205 # define CLRX_INTERNAL
206 #endif
207 
208 /* types and defs */
209 
211 typedef signed char cxchar;
213 typedef unsigned char cxuchar;
215 typedef unsigned char cxbyte;
217 typedef signed short cxshort;
219 typedef unsigned short cxushort;
221 typedef signed int cxint;
223 typedef unsigned int cxuint;
225 typedef signed long cxlong;
227 typedef unsigned long cxulong;
229 typedef signed long long cxllong;
231 typedef unsigned long long cxullong;
232 #ifdef _MSC_VER
233 # ifdef HAVE_64BIT
234 typedef signed long long ssize_t;
235 # define SSIZE_MIN (-9223372036854775808LL)
236 # define SSIZE_MAX (9223372036854775807LL)
237 # else
238 typedef signed long ssize_t;
239 # define SSIZE_MIN (-2147483648LL)
240 # define SSIZE_MAX (2147483647LL)
241 # endif
242 # define NOMINMAX
243 #endif
244 
245 #if __cplusplus < 201103L || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || defined(HAVE_MINGW)
246 # ifndef __STDC_LIMIT_MACROS
247 # define __STDC_LIMIT_MACROS 1
248 # endif
249 # ifndef __STDC_FORMAT_MACROS
250 # define __STDC_FORMAT_MACROS 1
251 # endif
252 #endif
253 
254 #endif
signed short cxshort
signed short
Definition: Config.h:217
signed char cxchar
signed character (signed byte)
Definition: Config.h:211
signed long cxlong
signed long
Definition: Config.h:225
unsigned char cxuchar
unsigned character (unsigned byte)
Definition: Config.h:213
unsigned long long cxullong
unsigned long long
Definition: Config.h:231
unsigned char cxbyte
unsigned byte
Definition: Config.h:215
unsigned int cxuint
unsigned int
Definition: Config.h:223
unsigned short cxushort
unsigned short
Definition: Config.h:219
unsigned long cxulong
unsigned long
Definition: Config.h:227
signed long long cxllong
signed long long
Definition: Config.h:229
signed int cxint
signed int
Definition: Config.h:221