2
// This unit is part of the GLScene Engine https://github.com/glscene
5
Conversion of OpenCL header file: cl_platform.h to Delphi,
6
from http://www.khronos.org/registry/cl/.
9
01/11/09 - DanB - Creation
12
// *****************************************************************************
13
// * Copyright (c) 2008-2009 The Khronos Group Inc.
15
// * Permission is hereby granted, free of charge, to any person obtaining a
16
// * copy of this software and/or associated documentation files (the
17
// * "Materials"), to deal in the Materials without restriction, including
18
// * without limitation the rights to use, copy, modify, merge, publish,
19
// * distribute, sublicense, and/or sell copies of the Materials, and to
20
// * permit persons to whom the Materials are furnished to do so, subject to
21
// * the following conditions:
23
// * The above copyright notice and this permission notice shall be included
24
// * in all copies or substantial portions of the Materials.
26
// * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27
// * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28
// * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
29
// * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
30
// * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
31
// * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
32
// * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
33
// ****************************************************************************/
47
// Pintptr_t = ^intptr_t;
59
Tcl_half = Word; // hmmm, no half precision floating point in Delphi
64
Pcl_uchar = ^Tcl_uchar;
65
Pcl_short = ^Tcl_short;
66
Pcl_ushort = ^Tcl_ushort;
70
Pcl_ulong = ^Tcl_ulong;
73
Pcl_float = ^Tcl_float;
74
Pcl_double = ^Tcl_double;
76
// and a few goodies to go with them
81
CL_SCHAR_MIN = (-127 - 1);
82
CL_CHAR_MAX = CL_SCHAR_MAX;
83
CL_CHAR_MIN = CL_SCHAR_MIN;
86
CL_SHRT_MIN = (-32767 - 1);
88
CL_INT_MAX = 2147483647;
89
CL_INT_MIN = (-2147483647 - 1);
90
CL_UINT_MAX = $FFFFFFFF;
91
CL_LONG_MAX = $7FFFFFFFFFFFFFFF;
92
CL_LONG_MIN = -$7FFFFFFFFFFFFFFF - 1;
93
CL_ULONG_MAX = $FFFFFFFFFFFFFFFF;
97
CL_FLT_MAX_10_EXP = +38;
98
CL_FLT_MAX_EXP = +128;
99
CL_FLT_MIN_10_EXP = -37;
100
CL_FLT_MIN_EXP = -125;
102
CL_FLT_MAX = 1.7E38; // 0x1.fffffep127f;
103
CL_FLT_MIN = 1.17E-38; // 0x1.0p-126f;
104
CL_FLT_EPSILON = 1.0E-7; // 0x1.0p-23f;
107
CL_DBL_MANT_DIG = 53;
108
CL_DBL_MAX_10_EXP = +308;
109
CL_DBL_MAX_EXP = +1024;
110
CL_DBL_MIN_10_EXP = -307;
111
CL_DBL_MIN_EXP = -1021;
113
CL_DBL_MAX = 8.98E307; // 0x1.fffffffffffffp1023;
114
CL_DBL_MIN = 2.2E-308; // 0x1.0p-1022;
115
CL_DBL_EPSILON = 2.2E-26; // 0x1.0p-52;
120
// * Note: OpenCL requires that all types be naturally aligned.
121
// * This means that vector types must be naturally aligned.
122
// * For example, a vector of four floats must be aligned to
123
// * a 16 byte boundary (calculated as 4 * the natural 4-byte
124
// * alignment of the float). The alignment qualifiers here
125
// * will only function properly if your compiler supports them
126
// * and if you don't actively work to defeat them. For example,
127
// * in order for a cl_float4 to be 16 byte aligned in a struct,
128
// * the start of the struct must itself be 16-byte aligned.
130
// * Maintaining proper alignment is the user's responsibility.
134
Tcl_char2 = array [0 .. 1] of Tcl_char;
135
Tcl_char4 = array [0 .. 3] of Tcl_char;
136
Tcl_char8 = array [0 .. 7] of Tcl_char;
137
Tcl_char16 = array [0 .. 15] of Tcl_char;
139
Tcl_uchar2 = array [0 .. 1] of Tcl_uchar;
140
Tcl_uchar4 = array [0 .. 3] of Tcl_uchar;
141
Tcl_uchar8 = array [0 .. 7] of Tcl_uchar;
142
Tcl_uchar16 = array [0 .. 15] of Tcl_uchar;
144
Tcl_short2 = array [0 .. 1] of Tcl_short;
145
Tcl_short4 = array [0 .. 3] of Tcl_short;
146
Tcl_short8 = array [0 .. 7] of Tcl_short;
147
Tcl_short16 = array [0 .. 15] of Tcl_short;
149
Tcl_ushort2 = array [0 .. 1] of Tcl_ushort;
150
Tcl_ushort4 = array [0 .. 3] of Tcl_ushort;
151
Tcl_ushort8 = array [0 .. 7] of Tcl_ushort;
152
Tcl_ushort16 = array [0 .. 15] of Tcl_ushort;
154
Tcl_int2 = array [0 .. 1] of Tcl_int;
155
Tcl_int4 = array [0 .. 3] of Tcl_int;
156
Tcl_int8 = array [0 .. 7] of Tcl_int;
157
Tcl_int16 = array [0 .. 15] of Tcl_int;
159
Tcl_uint2 = array [0 .. 1] of Tcl_uint;
160
Tcl_uint4 = array [0 .. 3] of Tcl_uint;
161
Tcl_uint8 = array [0 .. 7] of Tcl_uint;
162
Tcl_uint16 = array [0 .. 15] of Tcl_uint;
164
Tcl_long2 = array [0 .. 1] of Tcl_long;
165
Tcl_long4 = array [0 .. 3] of Tcl_long;
166
Tcl_long8 = array [0 .. 7] of Tcl_long;
167
Tcl_long16 = array [0 .. 15] of Tcl_long;
169
Tcl_ulong2 = array [0 .. 1] of Tcl_ulong;
170
Tcl_ulong4 = array [0 .. 3] of Tcl_ulong;
171
Tcl_ulong8 = array [0 .. 7] of Tcl_ulong;
172
Tcl_ulong16 = array [0 .. 15] of Tcl_ulong;
174
Tcl_float2 = array [0 .. 1] of Tcl_float;
175
Tcl_float4 = array [0 .. 3] of Tcl_float;
176
Tcl_float8 = array [0 .. 7] of Tcl_float;
177
Tcl_float16 = array [0 .. 15] of Tcl_float;
179
Tcl_double2 = array [0 .. 1] of Tcl_double;
180
Tcl_double4 = array [0 .. 3] of Tcl_double;
181
Tcl_double8 = array [0 .. 7] of Tcl_double;
182
Tcl_double16 = array [0 .. 15] of Tcl_double;
183
// There are no vector types for half