xref: /aosp_15_r20/external/angle/src/common/PackedCLEnums_autogen.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_packed_gl_enums.py using data from packed_cl_enums.json.
3 //
4 // Copyright 2017 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // PackedCLEnums_autogen.h:
9 //   Declares ANGLE-specific enums classes for CLenums and functions operating
10 //   on them.
11 
12 #ifndef COMMON_PACKEDCLENUMS_AUTOGEN_H_
13 #define COMMON_PACKEDCLENUMS_AUTOGEN_H_
14 
15 #include <angle_cl.h>
16 typedef cl_uint CLenum;
17 
18 #include <cstdint>
19 #include <ostream>
20 
21 namespace cl
22 {
23 
24 template <typename Enum>
25 Enum FromCLenum(CLenum from);
26 
27 enum class AddressingMode : uint8_t
28 {
29     None           = 0,
30     ClampToEdge    = 1,
31     Clamp          = 2,
32     Repeat         = 3,
33     MirroredRepeat = 4,
34 
35     InvalidEnum = 5,
36     EnumCount   = 5,
37 };
38 
39 template <>
40 AddressingMode FromCLenum<AddressingMode>(CLenum from);
41 CLenum ToCLenum(AddressingMode from);
42 std::ostream &operator<<(std::ostream &os, AddressingMode value);
43 
44 enum class CommandQueueInfo : uint8_t
45 {
46     Context         = 0,
47     Device          = 1,
48     ReferenceCount  = 2,
49     Properties      = 3,
50     Size            = 4,
51     DeviceDefault   = 5,
52     PropertiesArray = 6,
53 
54     InvalidEnum = 7,
55     EnumCount   = 7,
56 };
57 
58 template <>
59 CommandQueueInfo FromCLenum<CommandQueueInfo>(CLenum from);
60 CLenum ToCLenum(CommandQueueInfo from);
61 std::ostream &operator<<(std::ostream &os, CommandQueueInfo value);
62 
63 enum class ContextInfo : uint8_t
64 {
65     ReferenceCount = 0,
66     Devices        = 1,
67     Properties     = 2,
68     NumDevices     = 3,
69 
70     InvalidEnum = 4,
71     EnumCount   = 4,
72 };
73 
74 template <>
75 ContextInfo FromCLenum<ContextInfo>(CLenum from);
76 CLenum ToCLenum(ContextInfo from);
77 std::ostream &operator<<(std::ostream &os, ContextInfo value);
78 
79 enum class DeviceInfo : uint8_t
80 {
81     Type                                = 0,
82     VendorID                            = 1,
83     MaxComputeUnits                     = 2,
84     MaxWorkItemDimensions               = 3,
85     MaxWorkGroupSize                    = 4,
86     MaxWorkItemSizes                    = 5,
87     PreferredVectorWidthChar            = 6,
88     PreferredVectorWidthShort           = 7,
89     PreferredVectorWidthInt             = 8,
90     PreferredVectorWidthLong            = 9,
91     PreferredVectorWidthFloat           = 10,
92     PreferredVectorWidthDouble          = 11,
93     MaxClockFrequency                   = 12,
94     AddressBits                         = 13,
95     MaxReadImageArgs                    = 14,
96     MaxWriteImageArgs                   = 15,
97     MaxMemAllocSize                     = 16,
98     Image2D_MaxWidth                    = 17,
99     Image2D_MaxHeight                   = 18,
100     Image3D_MaxWidth                    = 19,
101     Image3D_MaxHeight                   = 20,
102     Image3D_MaxDepth                    = 21,
103     ImageSupport                        = 22,
104     MaxParameterSize                    = 23,
105     MaxSamplers                         = 24,
106     MemBaseAddrAlign                    = 25,
107     MinDataTypeAlignSize                = 26,
108     SingleFpConfig                      = 27,
109     GlobalMemCacheType                  = 28,
110     GlobalMemCachelineSize              = 29,
111     GlobalMemCacheSize                  = 30,
112     GlobalMemSize                       = 31,
113     MaxConstantBufferSize               = 32,
114     MaxConstantArgs                     = 33,
115     LocalMemType                        = 34,
116     LocalMemSize                        = 35,
117     ErrorCorrectionSupport              = 36,
118     ProfilingTimerResolution            = 37,
119     EndianLittle                        = 38,
120     Available                           = 39,
121     CompilerAvailable                   = 40,
122     ExecutionCapabilities               = 41,
123     QueueOnHostProperties               = 42,
124     Name                                = 43,
125     Vendor                              = 44,
126     DriverVersion                       = 45,
127     Profile                             = 46,
128     Version                             = 47,
129     Extensions                          = 48,
130     Platform                            = 49,
131     DoubleFpConfig                      = 50,
132     HalfFpConfig                        = 51,
133     PreferredVectorWidthHalf            = 52,
134     HostUnifiedMemory                   = 53,
135     NativeVectorWidthChar               = 54,
136     NativeVectorWidthShort              = 55,
137     NativeVectorWidthInt                = 56,
138     NativeVectorWidthLong               = 57,
139     NativeVectorWidthFloat              = 58,
140     NativeVectorWidthDouble             = 59,
141     NativeVectorWidthHalf               = 60,
142     OpenCL_C_Version                    = 61,
143     LinkerAvailable                     = 62,
144     BuiltInKernels                      = 63,
145     ImageMaxBufferSize                  = 64,
146     ImageMaxArraySize                   = 65,
147     ParentDevice                        = 66,
148     PartitionMaxSubDevices              = 67,
149     PartitionProperties                 = 68,
150     PartitionAffinityDomain             = 69,
151     PartitionType                       = 70,
152     ReferenceCount                      = 71,
153     PreferredInteropUserSync            = 72,
154     PrintfBufferSize                    = 73,
155     ImagePitchAlignment                 = 74,
156     ImageBaseAddressAlignment           = 75,
157     MaxReadWriteImageArgs               = 76,
158     MaxGlobalVariableSize               = 77,
159     QueueOnDeviceProperties             = 78,
160     QueueOnDevicePreferredSize          = 79,
161     QueueOnDeviceMaxSize                = 80,
162     MaxOnDeviceQueues                   = 81,
163     MaxOnDeviceEvents                   = 82,
164     SVM_Capabilities                    = 83,
165     GlobalVariablePreferredTotalSize    = 84,
166     MaxPipeArgs                         = 85,
167     PipeMaxActiveReservations           = 86,
168     PipeMaxPacketSize                   = 87,
169     PreferredPlatformAtomicAlignment    = 88,
170     PreferredGlobalAtomicAlignment      = 89,
171     PreferredLocalAtomicAlignment       = 90,
172     IL_Version                          = 91,
173     MaxNumSubGroups                     = 92,
174     SubGroupIndependentForwardProgress  = 93,
175     NumericVersion                      = 94,
176     ExtensionsWithVersion               = 95,
177     ILsWithVersion                      = 96,
178     BuiltInKernelsWithVersion           = 97,
179     AtomicMemoryCapabilities            = 98,
180     AtomicFenceCapabilities             = 99,
181     NonUniformWorkGroupSupport          = 100,
182     OpenCL_C_AllVersions                = 101,
183     PreferredWorkGroupSizeMultiple      = 102,
184     WorkGroupCollectiveFunctionsSupport = 103,
185     GenericAddressSpaceSupport          = 104,
186     OpenCL_C_Features                   = 105,
187     DeviceEnqueueCapabilities           = 106,
188     PipeSupport                         = 107,
189     LatestConformanceVersionPassed      = 108,
190 
191     InvalidEnum = 109,
192     EnumCount   = 109,
193 };
194 
195 template <>
196 DeviceInfo FromCLenum<DeviceInfo>(CLenum from);
197 CLenum ToCLenum(DeviceInfo from);
198 std::ostream &operator<<(std::ostream &os, DeviceInfo value);
199 
200 enum class EventInfo : uint8_t
201 {
202     CommandQueue           = 0,
203     CommandType            = 1,
204     ReferenceCount         = 2,
205     CommandExecutionStatus = 3,
206     Context                = 4,
207 
208     InvalidEnum = 5,
209     EnumCount   = 5,
210 };
211 
212 template <>
213 EventInfo FromCLenum<EventInfo>(CLenum from);
214 CLenum ToCLenum(EventInfo from);
215 std::ostream &operator<<(std::ostream &os, EventInfo value);
216 
217 enum class ExecutionStatus : uint8_t
218 {
219     Complete  = 0,
220     Running   = 1,
221     Submitted = 2,
222     Queued    = 3,
223 
224     InvalidEnum = 4,
225     EnumCount   = 4,
226 };
227 
228 template <>
229 ExecutionStatus FromCLenum<ExecutionStatus>(CLenum from);
230 CLenum ToCLenum(ExecutionStatus from);
231 std::ostream &operator<<(std::ostream &os, ExecutionStatus value);
232 
233 enum class FilterMode : uint8_t
234 {
235     Nearest = 0,
236     Linear  = 1,
237 
238     InvalidEnum = 2,
239     EnumCount   = 2,
240 };
241 
242 template <>
243 FilterMode FromCLenum<FilterMode>(CLenum from);
244 CLenum ToCLenum(FilterMode from);
245 std::ostream &operator<<(std::ostream &os, FilterMode value);
246 
247 enum class ImageInfo : uint8_t
248 {
249     Format       = 0,
250     ElementSize  = 1,
251     RowPitch     = 2,
252     SlicePitch   = 3,
253     Width        = 4,
254     Height       = 5,
255     Depth        = 6,
256     ArraySize    = 7,
257     Buffer       = 8,
258     NumMipLevels = 9,
259     NumSamples   = 10,
260 
261     InvalidEnum = 11,
262     EnumCount   = 11,
263 };
264 
265 template <>
266 ImageInfo FromCLenum<ImageInfo>(CLenum from);
267 CLenum ToCLenum(ImageInfo from);
268 std::ostream &operator<<(std::ostream &os, ImageInfo value);
269 
270 enum class KernelArgInfo : uint8_t
271 {
272     AddressQualifier = 0,
273     AccessQualifier  = 1,
274     TypeName         = 2,
275     TypeQualifier    = 3,
276     Name             = 4,
277 
278     InvalidEnum = 5,
279     EnumCount   = 5,
280 };
281 
282 template <>
283 KernelArgInfo FromCLenum<KernelArgInfo>(CLenum from);
284 CLenum ToCLenum(KernelArgInfo from);
285 std::ostream &operator<<(std::ostream &os, KernelArgInfo value);
286 
287 enum class KernelExecInfo : uint8_t
288 {
289     SVM_Ptrs            = 0,
290     SVM_FineGrainSystem = 1,
291 
292     InvalidEnum = 2,
293     EnumCount   = 2,
294 };
295 
296 template <>
297 KernelExecInfo FromCLenum<KernelExecInfo>(CLenum from);
298 CLenum ToCLenum(KernelExecInfo from);
299 std::ostream &operator<<(std::ostream &os, KernelExecInfo value);
300 
301 enum class KernelInfo : uint8_t
302 {
303     FunctionName   = 0,
304     NumArgs        = 1,
305     ReferenceCount = 2,
306     Context        = 3,
307     Program        = 4,
308     Attributes     = 5,
309 
310     InvalidEnum = 6,
311     EnumCount   = 6,
312 };
313 
314 template <>
315 KernelInfo FromCLenum<KernelInfo>(CLenum from);
316 CLenum ToCLenum(KernelInfo from);
317 std::ostream &operator<<(std::ostream &os, KernelInfo value);
318 
319 enum class KernelSubGroupInfo : uint8_t
320 {
321     MaxSubGroupSizeForNdrange = 0,
322     SubGroupCountForNdrange   = 1,
323     LocalSizeForSubGroupCount = 2,
324     MaxNumSubGroups           = 3,
325     CompileNumSubGroups       = 4,
326 
327     InvalidEnum = 5,
328     EnumCount   = 5,
329 };
330 
331 template <>
332 KernelSubGroupInfo FromCLenum<KernelSubGroupInfo>(CLenum from);
333 CLenum ToCLenum(KernelSubGroupInfo from);
334 std::ostream &operator<<(std::ostream &os, KernelSubGroupInfo value);
335 
336 enum class KernelWorkGroupInfo : uint8_t
337 {
338     WorkGroupSize                  = 0,
339     CompileWorkGroupSize           = 1,
340     LocalMemSize                   = 2,
341     PreferredWorkGroupSizeMultiple = 3,
342     PrivateMemSize                 = 4,
343     GlobalWorkSize                 = 5,
344 
345     InvalidEnum = 6,
346     EnumCount   = 6,
347 };
348 
349 template <>
350 KernelWorkGroupInfo FromCLenum<KernelWorkGroupInfo>(CLenum from);
351 CLenum ToCLenum(KernelWorkGroupInfo from);
352 std::ostream &operator<<(std::ostream &os, KernelWorkGroupInfo value);
353 
354 enum class MemInfo : uint8_t
355 {
356     Type                = 0,
357     Flags               = 1,
358     Size                = 2,
359     HostPtr             = 3,
360     MapCount            = 4,
361     ReferenceCount      = 5,
362     Context             = 6,
363     AssociatedMemObject = 7,
364     Offset              = 8,
365     UsesSVM_Pointer     = 9,
366     Properties          = 10,
367 
368     InvalidEnum = 11,
369     EnumCount   = 11,
370 };
371 
372 template <>
373 MemInfo FromCLenum<MemInfo>(CLenum from);
374 CLenum ToCLenum(MemInfo from);
375 std::ostream &operator<<(std::ostream &os, MemInfo value);
376 
377 enum class MemObjectType : uint8_t
378 {
379     Buffer         = 0,
380     Image2D        = 1,
381     Image3D        = 2,
382     Image2D_Array  = 3,
383     Image1D        = 4,
384     Image1D_Array  = 5,
385     Image1D_Buffer = 6,
386     Pipe           = 7,
387 
388     InvalidEnum = 8,
389     EnumCount   = 8,
390 };
391 
392 template <>
393 MemObjectType FromCLenum<MemObjectType>(CLenum from);
394 CLenum ToCLenum(MemObjectType from);
395 std::ostream &operator<<(std::ostream &os, MemObjectType value);
396 
397 enum class PipeInfo : uint8_t
398 {
399     PacketSize = 0,
400     MaxPackets = 1,
401     Properties = 2,
402 
403     InvalidEnum = 3,
404     EnumCount   = 3,
405 };
406 
407 template <>
408 PipeInfo FromCLenum<PipeInfo>(CLenum from);
409 CLenum ToCLenum(PipeInfo from);
410 std::ostream &operator<<(std::ostream &os, PipeInfo value);
411 
412 enum class PlatformInfo : uint8_t
413 {
414     Profile               = 0,
415     Version               = 1,
416     Name                  = 2,
417     Vendor                = 3,
418     Extensions            = 4,
419     HostTimerResolution   = 5,
420     NumericVersion        = 6,
421     ExtensionsWithVersion = 7,
422     IcdSuffix             = 8,
423 
424     InvalidEnum = 9,
425     EnumCount   = 9,
426 };
427 
428 template <>
429 PlatformInfo FromCLenum<PlatformInfo>(CLenum from);
430 CLenum ToCLenum(PlatformInfo from);
431 std::ostream &operator<<(std::ostream &os, PlatformInfo value);
432 
433 enum class ProfilingInfo : uint8_t
434 {
435     CommandQueued   = 0,
436     CommandSubmit   = 1,
437     CommandStart    = 2,
438     CommandEnd      = 3,
439     CommandComplete = 4,
440 
441     InvalidEnum = 5,
442     EnumCount   = 5,
443 };
444 
445 template <>
446 ProfilingInfo FromCLenum<ProfilingInfo>(CLenum from);
447 CLenum ToCLenum(ProfilingInfo from);
448 std::ostream &operator<<(std::ostream &os, ProfilingInfo value);
449 
450 enum class ProgramBuildInfo : uint8_t
451 {
452     Status                  = 0,
453     Options                 = 1,
454     Log                     = 2,
455     BinaryType              = 3,
456     GlobalVariableTotalSize = 4,
457 
458     InvalidEnum = 5,
459     EnumCount   = 5,
460 };
461 
462 template <>
463 ProgramBuildInfo FromCLenum<ProgramBuildInfo>(CLenum from);
464 CLenum ToCLenum(ProgramBuildInfo from);
465 std::ostream &operator<<(std::ostream &os, ProgramBuildInfo value);
466 
467 enum class ProgramInfo : uint8_t
468 {
469     ReferenceCount          = 0,
470     Context                 = 1,
471     NumDevices              = 2,
472     Devices                 = 3,
473     Source                  = 4,
474     BinarySizes             = 5,
475     Binaries                = 6,
476     NumKernels              = 7,
477     KernelNames             = 8,
478     IL                      = 9,
479     ScopeGlobalCtorsPresent = 10,
480     ScopeGlobalDtorsPresent = 11,
481 
482     InvalidEnum = 12,
483     EnumCount   = 12,
484 };
485 
486 template <>
487 ProgramInfo FromCLenum<ProgramInfo>(CLenum from);
488 CLenum ToCLenum(ProgramInfo from);
489 std::ostream &operator<<(std::ostream &os, ProgramInfo value);
490 
491 enum class SamplerInfo : uint8_t
492 {
493     ReferenceCount   = 0,
494     Context          = 1,
495     NormalizedCoords = 2,
496     AddressingMode   = 3,
497     FilterMode       = 4,
498     Properties       = 5,
499 
500     InvalidEnum = 6,
501     EnumCount   = 6,
502 };
503 
504 template <>
505 SamplerInfo FromCLenum<SamplerInfo>(CLenum from);
506 CLenum ToCLenum(SamplerInfo from);
507 std::ostream &operator<<(std::ostream &os, SamplerInfo value);
508 
509 }  // namespace cl
510 
511 #endif  // COMMON_PACKEDCLENUMS_AUTOGEN_H_
512