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