Commit 8226dc23 by John Plate Committed by Commit Bot

Generate CL enums in libGLESv2

Bug: angleproject:5869 Change-Id: Ie547d415bed37accef6cb62d28bc6b088a1eb810 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2829370Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: John Plate <jplate@google.com>
parent fbfecbe2
......@@ -10,7 +10,7 @@
"scripts/entry_point_packed_gl_enums.json":
"4f7b43863a5e61991bba4010db463679",
"scripts/generate_entry_points.py":
"15459e0793e7bfece50f13991be8d51b",
"6be5ee077187f1ec68e8e6035bcd2cae",
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml":
......@@ -120,7 +120,7 @@
"src/libGL/libGL_autogen.def":
"2789d87b05eea9f53d52e2aff499b785",
"src/libGLESv2/cl_stubs_autogen.h":
"719dd03921e8cfcd8db6c53c0bddd4ae",
"a20a5e774c40e4230878b90e76fe4f82",
"src/libGLESv2/egl_ext_stubs_autogen.h":
"2ef3b8d087f2a97f7270b96077c93856",
"src/libGLESv2/egl_get_labeled_object_data.json":
......@@ -128,7 +128,7 @@
"src/libGLESv2/egl_stubs_autogen.h":
"6439daa350c1663e71dd0af37dcc91df",
"src/libGLESv2/entry_points_cl_autogen.cpp":
"fc02d4dce683eedc19e4e9e321928238",
"3a65b1fd9a07a192819df70e7b8ec292",
"src/libGLESv2/entry_points_cl_autogen.h":
"129fa7936c8bc6a20de9269da0c3c7d3",
"src/libGLESv2/entry_points_egl_autogen.cpp":
......
{
"src/common/PackedCLEnums_autogen.cpp":
"399217e4821b02c00fb96788de683c55",
"src/common/PackedCLEnums_autogen.h":
"76e2457971997ca26ff3761ac21573e4",
"src/common/PackedEGLEnums_autogen.cpp":
"1e5cf84847c9880d32d1f638b366ed08",
"src/common/PackedEGLEnums_autogen.h":
"0a944740b92f9ff99e3dd99e81122326",
"0574ea48b14b76dc13e654a11597bf1d",
"src/common/PackedGLEnums_autogen.cpp":
"e2cb0a29dcd2bdbda338b82953c752ee",
"src/common/PackedGLEnums_autogen.h":
"be253a688922f04c20166b4e31f6a227",
"60a5b286c98aba32a0e3b537a1424ee9",
"src/common/gen_packed_gl_enums.py":
"d0f03fcaaefd38e45b3ac1bdfefc0bab",
"7453287e3f184427043604d172a6765b",
"src/common/packed_cl_enums.json":
"a30fcf0740b85c0a32518fe4f7d1e138",
"src/common/packed_egl_enums.json":
"76e1b814421e121164d60a0d89cb16c1",
"src/common/packed_gl_enums.json":
......
......@@ -251,7 +251,9 @@ void CL_API_CALL CL_{name}({params})
{{
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
// TODO: {name}
{packed_gl_enum_conversions}
// TODO: validate
cl::{name}({internal_params});
}}
......@@ -262,7 +264,9 @@ TEMPLATE_CL_ENTRY_POINT_WITH_RETURN = """\
{{
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
// TODO: {name}
{packed_gl_enum_conversions}
// TODO: validate
return cl::{name}({internal_params});
}}
......@@ -283,6 +287,8 @@ TEMPLATE_CL_STUBS_HEADER = """\
#include "angle_cl.h"
#include "common/PackedCLEnums_autogen.h"
namespace cl
{{
{stubs}
......@@ -970,6 +976,9 @@ LIBCL_SOURCE_INCLUDES = """\
#include "cl_stubs_autogen.h"
#include "entry_points_cl_utils.h"
#include "validationCL.h"
using namespace cl;
"""
TEMPLATE_EVENT_COMMENT = """\
......@@ -1184,7 +1193,28 @@ TEMPLATE_RESOURCE_ID_TYPE_NAME_CASE = """\
case ResourceIDType::{resource_id_type}:
return "{resource_id_type}";"""
CL_PACKED_TYPES = {}
CL_PACKED_TYPES = {
"cl_platform_info": "PlatformInfo",
"cl_device_info": "DeviceInfo",
"cl_context_info": "ContextInfo",
"cl_command_queue_info": "CommandQueueInfo",
"cl_mem_object_type": "MemObjectType",
"cl_mem_info": "MemInfo",
"cl_image_info": "ImageInfo",
"cl_pipe_info": "PipeInfo",
"cl_addressing_mode": "AddressingMode",
"cl_filter_mode": "FilterMode",
"cl_sampler_info": "SamplerInfo",
"cl_program_info": "ProgramInfo",
"cl_program_build_info": "ProgramBuildInfo",
"cl_kernel_info": "KernelInfo",
"cl_kernel_arg_info": "KernelArgInfo",
"cl_kernel_work_group_info": "KernelWorkGroupInfo",
"cl_kernel_sub_group_info": "KernelSubGroupInfo",
"cl_kernel_exec_info": "KernelExecInfo",
"cl_event_info": "EventInfo",
"cl_profiling_info": "ProfilingInfo",
}
EGL_PACKED_TYPES = {
"EGLContext": "gl::Context *",
......@@ -1831,7 +1861,8 @@ class CLEntryPoints(ANGLEEntryPoints):
commands,
CLEntryPoints.all_param_types,
CLEntryPoints.get_packed_enums(),
export_template=TEMPLATE_CL_ENTRY_POINT_EXPORT)
export_template=TEMPLATE_CL_ENTRY_POINT_EXPORT,
packed_param_types=CL_PACKED_TYPES)
@classmethod
def get_packed_enums(cls):
......
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_packed_gl_enums.py using data from packed_cl_enums.json.
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// PackedCLEnums_autogen.cpp:
// Implements ANGLE-specific enums classes for CLenums and functions operating
// on them.
#include "common/PackedCLEnums_autogen.h"
#include "common/debug.h"
namespace cl
{
template <>
AddressingMode FromCLenum<AddressingMode>(CLenum from)
{
switch (from)
{
case CL_ADDRESS_NONE:
return AddressingMode::None;
case CL_ADDRESS_CLAMP_TO_EDGE:
return AddressingMode::ClampToEdge;
case CL_ADDRESS_CLAMP:
return AddressingMode::Clamp;
case CL_ADDRESS_REPEAT:
return AddressingMode::Repeat;
case CL_ADDRESS_MIRRORED_REPEAT:
return AddressingMode::MirroredRepeat;
default:
return AddressingMode::InvalidEnum;
}
}
CLenum ToCLenum(AddressingMode from)
{
switch (from)
{
case AddressingMode::None:
return CL_ADDRESS_NONE;
case AddressingMode::ClampToEdge:
return CL_ADDRESS_CLAMP_TO_EDGE;
case AddressingMode::Clamp:
return CL_ADDRESS_CLAMP;
case AddressingMode::Repeat:
return CL_ADDRESS_REPEAT;
case AddressingMode::MirroredRepeat:
return CL_ADDRESS_MIRRORED_REPEAT;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, AddressingMode value)
{
switch (value)
{
case AddressingMode::None:
os << "CL_ADDRESS_NONE";
break;
case AddressingMode::ClampToEdge:
os << "CL_ADDRESS_CLAMP_TO_EDGE";
break;
case AddressingMode::Clamp:
os << "CL_ADDRESS_CLAMP";
break;
case AddressingMode::Repeat:
os << "CL_ADDRESS_REPEAT";
break;
case AddressingMode::MirroredRepeat:
os << "CL_ADDRESS_MIRRORED_REPEAT";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
CommandQueueInfo FromCLenum<CommandQueueInfo>(CLenum from)
{
switch (from)
{
case CL_QUEUE_CONTEXT:
return CommandQueueInfo::Context;
case CL_QUEUE_DEVICE:
return CommandQueueInfo::Device;
case CL_QUEUE_REFERENCE_COUNT:
return CommandQueueInfo::ReferenceCount;
case CL_QUEUE_PROPERTIES:
return CommandQueueInfo::Properties;
case CL_QUEUE_SIZE:
return CommandQueueInfo::Size;
case CL_QUEUE_DEVICE_DEFAULT:
return CommandQueueInfo::DeviceDefault;
case CL_QUEUE_PROPERTIES_ARRAY:
return CommandQueueInfo::PropertiesArray;
default:
return CommandQueueInfo::InvalidEnum;
}
}
CLenum ToCLenum(CommandQueueInfo from)
{
switch (from)
{
case CommandQueueInfo::Context:
return CL_QUEUE_CONTEXT;
case CommandQueueInfo::Device:
return CL_QUEUE_DEVICE;
case CommandQueueInfo::ReferenceCount:
return CL_QUEUE_REFERENCE_COUNT;
case CommandQueueInfo::Properties:
return CL_QUEUE_PROPERTIES;
case CommandQueueInfo::Size:
return CL_QUEUE_SIZE;
case CommandQueueInfo::DeviceDefault:
return CL_QUEUE_DEVICE_DEFAULT;
case CommandQueueInfo::PropertiesArray:
return CL_QUEUE_PROPERTIES_ARRAY;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, CommandQueueInfo value)
{
switch (value)
{
case CommandQueueInfo::Context:
os << "CL_QUEUE_CONTEXT";
break;
case CommandQueueInfo::Device:
os << "CL_QUEUE_DEVICE";
break;
case CommandQueueInfo::ReferenceCount:
os << "CL_QUEUE_REFERENCE_COUNT";
break;
case CommandQueueInfo::Properties:
os << "CL_QUEUE_PROPERTIES";
break;
case CommandQueueInfo::Size:
os << "CL_QUEUE_SIZE";
break;
case CommandQueueInfo::DeviceDefault:
os << "CL_QUEUE_DEVICE_DEFAULT";
break;
case CommandQueueInfo::PropertiesArray:
os << "CL_QUEUE_PROPERTIES_ARRAY";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
ContextInfo FromCLenum<ContextInfo>(CLenum from)
{
switch (from)
{
case CL_CONTEXT_REFERENCE_COUNT:
return ContextInfo::ReferenceCount;
case CL_CONTEXT_DEVICES:
return ContextInfo::Devices;
case CL_CONTEXT_PROPERTIES:
return ContextInfo::Properties;
case CL_CONTEXT_NUM_DEVICES:
return ContextInfo::NumDevices;
default:
return ContextInfo::InvalidEnum;
}
}
CLenum ToCLenum(ContextInfo from)
{
switch (from)
{
case ContextInfo::ReferenceCount:
return CL_CONTEXT_REFERENCE_COUNT;
case ContextInfo::Devices:
return CL_CONTEXT_DEVICES;
case ContextInfo::Properties:
return CL_CONTEXT_PROPERTIES;
case ContextInfo::NumDevices:
return CL_CONTEXT_NUM_DEVICES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ContextInfo value)
{
switch (value)
{
case ContextInfo::ReferenceCount:
os << "CL_CONTEXT_REFERENCE_COUNT";
break;
case ContextInfo::Devices:
os << "CL_CONTEXT_DEVICES";
break;
case ContextInfo::Properties:
os << "CL_CONTEXT_PROPERTIES";
break;
case ContextInfo::NumDevices:
os << "CL_CONTEXT_NUM_DEVICES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
DeviceInfo FromCLenum<DeviceInfo>(CLenum from)
{
switch (from)
{
case CL_DEVICE_TYPE:
return DeviceInfo::Type;
case CL_DEVICE_VENDOR_ID:
return DeviceInfo::VendorID;
case CL_DEVICE_MAX_COMPUTE_UNITS:
return DeviceInfo::MaxComputeUnits;
case CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:
return DeviceInfo::MaxWorkItemDimensions;
case CL_DEVICE_MAX_WORK_GROUP_SIZE:
return DeviceInfo::MaxWorkGroupSize;
case CL_DEVICE_MAX_WORK_ITEM_SIZES:
return DeviceInfo::MaxWorkItemSizes;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR:
return DeviceInfo::PreferredVectorWidthChar;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT:
return DeviceInfo::PreferredVectorWidthShort;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT:
return DeviceInfo::PreferredVectorWidthInt;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG:
return DeviceInfo::PreferredVectorWidthLong;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT:
return DeviceInfo::PreferredVectorWidthFloat;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE:
return DeviceInfo::PreferredVectorWidthDouble;
case CL_DEVICE_MAX_CLOCK_FREQUENCY:
return DeviceInfo::MaxClockFrequency;
case CL_DEVICE_ADDRESS_BITS:
return DeviceInfo::AddressBits;
case CL_DEVICE_MAX_READ_IMAGE_ARGS:
return DeviceInfo::MaxReadImageArgs;
case CL_DEVICE_MAX_WRITE_IMAGE_ARGS:
return DeviceInfo::MaxWriteImageArgs;
case CL_DEVICE_MAX_MEM_ALLOC_SIZE:
return DeviceInfo::MaxMemAllocSize;
case CL_DEVICE_IMAGE2D_MAX_WIDTH:
return DeviceInfo::Image2D_MaxWidth;
case CL_DEVICE_IMAGE2D_MAX_HEIGHT:
return DeviceInfo::Image2D_MaxHeight;
case CL_DEVICE_IMAGE3D_MAX_WIDTH:
return DeviceInfo::Image3D_MaxWidth;
case CL_DEVICE_IMAGE3D_MAX_HEIGHT:
return DeviceInfo::Image3D_MaxHeight;
case CL_DEVICE_IMAGE3D_MAX_DEPTH:
return DeviceInfo::Image3D_MaxDepth;
case CL_DEVICE_IMAGE_SUPPORT:
return DeviceInfo::ImageSupport;
case CL_DEVICE_MAX_PARAMETER_SIZE:
return DeviceInfo::MaxParameterSize;
case CL_DEVICE_MAX_SAMPLERS:
return DeviceInfo::MaxSamplers;
case CL_DEVICE_MEM_BASE_ADDR_ALIGN:
return DeviceInfo::MemBaseAddrAlign;
case CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE:
return DeviceInfo::MinDataTypeAlignSize;
case CL_DEVICE_SINGLE_FP_CONFIG:
return DeviceInfo::SingleFpConfig;
case CL_DEVICE_GLOBAL_MEM_CACHE_TYPE:
return DeviceInfo::GlobalMemCacheType;
case CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE:
return DeviceInfo::GlobalMemCachelineSize;
case CL_DEVICE_GLOBAL_MEM_CACHE_SIZE:
return DeviceInfo::GlobalMemCacheSize;
case CL_DEVICE_GLOBAL_MEM_SIZE:
return DeviceInfo::GlobalMemSize;
case CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:
return DeviceInfo::MaxConstantBufferSize;
case CL_DEVICE_MAX_CONSTANT_ARGS:
return DeviceInfo::MaxConstantArgs;
case CL_DEVICE_LOCAL_MEM_TYPE:
return DeviceInfo::LocalMemType;
case CL_DEVICE_LOCAL_MEM_SIZE:
return DeviceInfo::LocalMemSize;
case CL_DEVICE_ERROR_CORRECTION_SUPPORT:
return DeviceInfo::ErrorCorrectionSupport;
case CL_DEVICE_PROFILING_TIMER_RESOLUTION:
return DeviceInfo::ProfilingTimerResolution;
case CL_DEVICE_ENDIAN_LITTLE:
return DeviceInfo::EndianLittle;
case CL_DEVICE_AVAILABLE:
return DeviceInfo::Available;
case CL_DEVICE_COMPILER_AVAILABLE:
return DeviceInfo::CompilerAvailable;
case CL_DEVICE_EXECUTION_CAPABILITIES:
return DeviceInfo::ExecutionCapabilities;
case CL_DEVICE_QUEUE_ON_HOST_PROPERTIES:
return DeviceInfo::QueueOnHostProperties;
case CL_DEVICE_NAME:
return DeviceInfo::Name;
case CL_DEVICE_VENDOR:
return DeviceInfo::Vendor;
case CL_DRIVER_VERSION:
return DeviceInfo::DriverVersion;
case CL_DEVICE_PROFILE:
return DeviceInfo::Profile;
case CL_DEVICE_VERSION:
return DeviceInfo::Version;
case CL_DEVICE_EXTENSIONS:
return DeviceInfo::Extensions;
case CL_DEVICE_PLATFORM:
return DeviceInfo::Platform;
case CL_DEVICE_DOUBLE_FP_CONFIG:
return DeviceInfo::DoubleFpConfig;
case CL_DEVICE_HALF_FP_CONFIG:
return DeviceInfo::HalfFpConfig;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF:
return DeviceInfo::PreferredVectorWidthHalf;
case CL_DEVICE_HOST_UNIFIED_MEMORY:
return DeviceInfo::HostUnifiedMemory;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR:
return DeviceInfo::NativeVectorWidthChar;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT:
return DeviceInfo::NativeVectorWidthShort;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_INT:
return DeviceInfo::NativeVectorWidthInt;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG:
return DeviceInfo::NativeVectorWidthLong;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT:
return DeviceInfo::NativeVectorWidthFloat;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE:
return DeviceInfo::NativeVectorWidthDouble;
case CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF:
return DeviceInfo::NativeVectorWidthHalf;
case CL_DEVICE_OPENCL_C_VERSION:
return DeviceInfo::OpenCL_C_Version;
case CL_DEVICE_LINKER_AVAILABLE:
return DeviceInfo::LinkerAvailable;
case CL_DEVICE_BUILT_IN_KERNELS:
return DeviceInfo::BuiltInKernels;
case CL_DEVICE_IMAGE_MAX_BUFFER_SIZE:
return DeviceInfo::ImageMaxBufferSize;
case CL_DEVICE_IMAGE_MAX_ARRAY_SIZE:
return DeviceInfo::ImageMaxArraySize;
case CL_DEVICE_PARENT_DEVICE:
return DeviceInfo::ParentDevice;
case CL_DEVICE_PARTITION_MAX_SUB_DEVICES:
return DeviceInfo::PartitionMaxSubDevices;
case CL_DEVICE_PARTITION_PROPERTIES:
return DeviceInfo::PartitionProperties;
case CL_DEVICE_PARTITION_AFFINITY_DOMAIN:
return DeviceInfo::PartitionAffinityDomain;
case CL_DEVICE_PARTITION_TYPE:
return DeviceInfo::PartitionType;
case CL_DEVICE_REFERENCE_COUNT:
return DeviceInfo::ReferenceCount;
case CL_DEVICE_PREFERRED_INTEROP_USER_SYNC:
return DeviceInfo::PreferredInteropUserSync;
case CL_DEVICE_PRINTF_BUFFER_SIZE:
return DeviceInfo::PrintfBufferSize;
case CL_DEVICE_IMAGE_PITCH_ALIGNMENT:
return DeviceInfo::ImagePitchAlignment;
case CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT:
return DeviceInfo::ImageBaseAddressAlignment;
case CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS:
return DeviceInfo::MaxReadWriteImageArgs;
case CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE:
return DeviceInfo::MaxGlobalVariableSize;
case CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES:
return DeviceInfo::QueueOnDeviceProperties;
case CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE:
return DeviceInfo::QueueOnDevicePreferredSize;
case CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE:
return DeviceInfo::QueueOnDeviceMaxSize;
case CL_DEVICE_MAX_ON_DEVICE_QUEUES:
return DeviceInfo::MaxOnDeviceQueues;
case CL_DEVICE_MAX_ON_DEVICE_EVENTS:
return DeviceInfo::MaxOnDeviceEvents;
case CL_DEVICE_SVM_CAPABILITIES:
return DeviceInfo::SVM_Capabilities;
case CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE:
return DeviceInfo::GlobalVariablePreferredTotalSize;
case CL_DEVICE_MAX_PIPE_ARGS:
return DeviceInfo::MaxPipeArgs;
case CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS:
return DeviceInfo::PipeMaxActiveReservations;
case CL_DEVICE_PIPE_MAX_PACKET_SIZE:
return DeviceInfo::PipeMaxPacketSize;
case CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT:
return DeviceInfo::PreferredPlatformAtomicAlignment;
case CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT:
return DeviceInfo::PreferredGlobalAtomicAlignment;
case CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT:
return DeviceInfo::PreferredLocalAtomicAlignment;
case CL_DEVICE_IL_VERSION:
return DeviceInfo::IL_Version;
case CL_DEVICE_MAX_NUM_SUB_GROUPS:
return DeviceInfo::MaxNumSubGroups;
case CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS:
return DeviceInfo::SubGroupIndependentForwardProgress;
case CL_DEVICE_NUMERIC_VERSION:
return DeviceInfo::NumericVersion;
case CL_DEVICE_EXTENSIONS_WITH_VERSION:
return DeviceInfo::ExtensionsWithVersion;
case CL_DEVICE_ILS_WITH_VERSION:
return DeviceInfo::ILsWithVersion;
case CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION:
return DeviceInfo::BuiltInKernelsWithVersion;
case CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES:
return DeviceInfo::AtomicMemoryCapabilities;
case CL_DEVICE_ATOMIC_FENCE_CAPABILITIES:
return DeviceInfo::AtomicFenceCapabilities;
case CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT:
return DeviceInfo::NonUniformWorkGroupSupport;
case CL_DEVICE_OPENCL_C_ALL_VERSIONS:
return DeviceInfo::OpenCL_C_AllVersions;
case CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE:
return DeviceInfo::PreferredWorkGroupSizeMultiple;
case CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT:
return DeviceInfo::WorkGroupCollectiveFunctionsSupport;
case CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT:
return DeviceInfo::GenericAddressSpaceSupport;
case CL_DEVICE_OPENCL_C_FEATURES:
return DeviceInfo::OpenCL_C_Features;
case CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES:
return DeviceInfo::DeviceEnqueueCapabilities;
case CL_DEVICE_PIPE_SUPPORT:
return DeviceInfo::PipeSupport;
case CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED:
return DeviceInfo::LatestConformanceVersionPassed;
default:
return DeviceInfo::InvalidEnum;
}
}
CLenum ToCLenum(DeviceInfo from)
{
switch (from)
{
case DeviceInfo::Type:
return CL_DEVICE_TYPE;
case DeviceInfo::VendorID:
return CL_DEVICE_VENDOR_ID;
case DeviceInfo::MaxComputeUnits:
return CL_DEVICE_MAX_COMPUTE_UNITS;
case DeviceInfo::MaxWorkItemDimensions:
return CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS;
case DeviceInfo::MaxWorkGroupSize:
return CL_DEVICE_MAX_WORK_GROUP_SIZE;
case DeviceInfo::MaxWorkItemSizes:
return CL_DEVICE_MAX_WORK_ITEM_SIZES;
case DeviceInfo::PreferredVectorWidthChar:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR;
case DeviceInfo::PreferredVectorWidthShort:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT;
case DeviceInfo::PreferredVectorWidthInt:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT;
case DeviceInfo::PreferredVectorWidthLong:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG;
case DeviceInfo::PreferredVectorWidthFloat:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT;
case DeviceInfo::PreferredVectorWidthDouble:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE;
case DeviceInfo::MaxClockFrequency:
return CL_DEVICE_MAX_CLOCK_FREQUENCY;
case DeviceInfo::AddressBits:
return CL_DEVICE_ADDRESS_BITS;
case DeviceInfo::MaxReadImageArgs:
return CL_DEVICE_MAX_READ_IMAGE_ARGS;
case DeviceInfo::MaxWriteImageArgs:
return CL_DEVICE_MAX_WRITE_IMAGE_ARGS;
case DeviceInfo::MaxMemAllocSize:
return CL_DEVICE_MAX_MEM_ALLOC_SIZE;
case DeviceInfo::Image2D_MaxWidth:
return CL_DEVICE_IMAGE2D_MAX_WIDTH;
case DeviceInfo::Image2D_MaxHeight:
return CL_DEVICE_IMAGE2D_MAX_HEIGHT;
case DeviceInfo::Image3D_MaxWidth:
return CL_DEVICE_IMAGE3D_MAX_WIDTH;
case DeviceInfo::Image3D_MaxHeight:
return CL_DEVICE_IMAGE3D_MAX_HEIGHT;
case DeviceInfo::Image3D_MaxDepth:
return CL_DEVICE_IMAGE3D_MAX_DEPTH;
case DeviceInfo::ImageSupport:
return CL_DEVICE_IMAGE_SUPPORT;
case DeviceInfo::MaxParameterSize:
return CL_DEVICE_MAX_PARAMETER_SIZE;
case DeviceInfo::MaxSamplers:
return CL_DEVICE_MAX_SAMPLERS;
case DeviceInfo::MemBaseAddrAlign:
return CL_DEVICE_MEM_BASE_ADDR_ALIGN;
case DeviceInfo::MinDataTypeAlignSize:
return CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE;
case DeviceInfo::SingleFpConfig:
return CL_DEVICE_SINGLE_FP_CONFIG;
case DeviceInfo::GlobalMemCacheType:
return CL_DEVICE_GLOBAL_MEM_CACHE_TYPE;
case DeviceInfo::GlobalMemCachelineSize:
return CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE;
case DeviceInfo::GlobalMemCacheSize:
return CL_DEVICE_GLOBAL_MEM_CACHE_SIZE;
case DeviceInfo::GlobalMemSize:
return CL_DEVICE_GLOBAL_MEM_SIZE;
case DeviceInfo::MaxConstantBufferSize:
return CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE;
case DeviceInfo::MaxConstantArgs:
return CL_DEVICE_MAX_CONSTANT_ARGS;
case DeviceInfo::LocalMemType:
return CL_DEVICE_LOCAL_MEM_TYPE;
case DeviceInfo::LocalMemSize:
return CL_DEVICE_LOCAL_MEM_SIZE;
case DeviceInfo::ErrorCorrectionSupport:
return CL_DEVICE_ERROR_CORRECTION_SUPPORT;
case DeviceInfo::ProfilingTimerResolution:
return CL_DEVICE_PROFILING_TIMER_RESOLUTION;
case DeviceInfo::EndianLittle:
return CL_DEVICE_ENDIAN_LITTLE;
case DeviceInfo::Available:
return CL_DEVICE_AVAILABLE;
case DeviceInfo::CompilerAvailable:
return CL_DEVICE_COMPILER_AVAILABLE;
case DeviceInfo::ExecutionCapabilities:
return CL_DEVICE_EXECUTION_CAPABILITIES;
case DeviceInfo::QueueOnHostProperties:
return CL_DEVICE_QUEUE_ON_HOST_PROPERTIES;
case DeviceInfo::Name:
return CL_DEVICE_NAME;
case DeviceInfo::Vendor:
return CL_DEVICE_VENDOR;
case DeviceInfo::DriverVersion:
return CL_DRIVER_VERSION;
case DeviceInfo::Profile:
return CL_DEVICE_PROFILE;
case DeviceInfo::Version:
return CL_DEVICE_VERSION;
case DeviceInfo::Extensions:
return CL_DEVICE_EXTENSIONS;
case DeviceInfo::Platform:
return CL_DEVICE_PLATFORM;
case DeviceInfo::DoubleFpConfig:
return CL_DEVICE_DOUBLE_FP_CONFIG;
case DeviceInfo::HalfFpConfig:
return CL_DEVICE_HALF_FP_CONFIG;
case DeviceInfo::PreferredVectorWidthHalf:
return CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF;
case DeviceInfo::HostUnifiedMemory:
return CL_DEVICE_HOST_UNIFIED_MEMORY;
case DeviceInfo::NativeVectorWidthChar:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR;
case DeviceInfo::NativeVectorWidthShort:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT;
case DeviceInfo::NativeVectorWidthInt:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_INT;
case DeviceInfo::NativeVectorWidthLong:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG;
case DeviceInfo::NativeVectorWidthFloat:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT;
case DeviceInfo::NativeVectorWidthDouble:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE;
case DeviceInfo::NativeVectorWidthHalf:
return CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF;
case DeviceInfo::OpenCL_C_Version:
return CL_DEVICE_OPENCL_C_VERSION;
case DeviceInfo::LinkerAvailable:
return CL_DEVICE_LINKER_AVAILABLE;
case DeviceInfo::BuiltInKernels:
return CL_DEVICE_BUILT_IN_KERNELS;
case DeviceInfo::ImageMaxBufferSize:
return CL_DEVICE_IMAGE_MAX_BUFFER_SIZE;
case DeviceInfo::ImageMaxArraySize:
return CL_DEVICE_IMAGE_MAX_ARRAY_SIZE;
case DeviceInfo::ParentDevice:
return CL_DEVICE_PARENT_DEVICE;
case DeviceInfo::PartitionMaxSubDevices:
return CL_DEVICE_PARTITION_MAX_SUB_DEVICES;
case DeviceInfo::PartitionProperties:
return CL_DEVICE_PARTITION_PROPERTIES;
case DeviceInfo::PartitionAffinityDomain:
return CL_DEVICE_PARTITION_AFFINITY_DOMAIN;
case DeviceInfo::PartitionType:
return CL_DEVICE_PARTITION_TYPE;
case DeviceInfo::ReferenceCount:
return CL_DEVICE_REFERENCE_COUNT;
case DeviceInfo::PreferredInteropUserSync:
return CL_DEVICE_PREFERRED_INTEROP_USER_SYNC;
case DeviceInfo::PrintfBufferSize:
return CL_DEVICE_PRINTF_BUFFER_SIZE;
case DeviceInfo::ImagePitchAlignment:
return CL_DEVICE_IMAGE_PITCH_ALIGNMENT;
case DeviceInfo::ImageBaseAddressAlignment:
return CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT;
case DeviceInfo::MaxReadWriteImageArgs:
return CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS;
case DeviceInfo::MaxGlobalVariableSize:
return CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE;
case DeviceInfo::QueueOnDeviceProperties:
return CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES;
case DeviceInfo::QueueOnDevicePreferredSize:
return CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE;
case DeviceInfo::QueueOnDeviceMaxSize:
return CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE;
case DeviceInfo::MaxOnDeviceQueues:
return CL_DEVICE_MAX_ON_DEVICE_QUEUES;
case DeviceInfo::MaxOnDeviceEvents:
return CL_DEVICE_MAX_ON_DEVICE_EVENTS;
case DeviceInfo::SVM_Capabilities:
return CL_DEVICE_SVM_CAPABILITIES;
case DeviceInfo::GlobalVariablePreferredTotalSize:
return CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE;
case DeviceInfo::MaxPipeArgs:
return CL_DEVICE_MAX_PIPE_ARGS;
case DeviceInfo::PipeMaxActiveReservations:
return CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS;
case DeviceInfo::PipeMaxPacketSize:
return CL_DEVICE_PIPE_MAX_PACKET_SIZE;
case DeviceInfo::PreferredPlatformAtomicAlignment:
return CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT;
case DeviceInfo::PreferredGlobalAtomicAlignment:
return CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT;
case DeviceInfo::PreferredLocalAtomicAlignment:
return CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT;
case DeviceInfo::IL_Version:
return CL_DEVICE_IL_VERSION;
case DeviceInfo::MaxNumSubGroups:
return CL_DEVICE_MAX_NUM_SUB_GROUPS;
case DeviceInfo::SubGroupIndependentForwardProgress:
return CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS;
case DeviceInfo::NumericVersion:
return CL_DEVICE_NUMERIC_VERSION;
case DeviceInfo::ExtensionsWithVersion:
return CL_DEVICE_EXTENSIONS_WITH_VERSION;
case DeviceInfo::ILsWithVersion:
return CL_DEVICE_ILS_WITH_VERSION;
case DeviceInfo::BuiltInKernelsWithVersion:
return CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION;
case DeviceInfo::AtomicMemoryCapabilities:
return CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES;
case DeviceInfo::AtomicFenceCapabilities:
return CL_DEVICE_ATOMIC_FENCE_CAPABILITIES;
case DeviceInfo::NonUniformWorkGroupSupport:
return CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT;
case DeviceInfo::OpenCL_C_AllVersions:
return CL_DEVICE_OPENCL_C_ALL_VERSIONS;
case DeviceInfo::PreferredWorkGroupSizeMultiple:
return CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE;
case DeviceInfo::WorkGroupCollectiveFunctionsSupport:
return CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT;
case DeviceInfo::GenericAddressSpaceSupport:
return CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT;
case DeviceInfo::OpenCL_C_Features:
return CL_DEVICE_OPENCL_C_FEATURES;
case DeviceInfo::DeviceEnqueueCapabilities:
return CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES;
case DeviceInfo::PipeSupport:
return CL_DEVICE_PIPE_SUPPORT;
case DeviceInfo::LatestConformanceVersionPassed:
return CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, DeviceInfo value)
{
switch (value)
{
case DeviceInfo::Type:
os << "CL_DEVICE_TYPE";
break;
case DeviceInfo::VendorID:
os << "CL_DEVICE_VENDOR_ID";
break;
case DeviceInfo::MaxComputeUnits:
os << "CL_DEVICE_MAX_COMPUTE_UNITS";
break;
case DeviceInfo::MaxWorkItemDimensions:
os << "CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS";
break;
case DeviceInfo::MaxWorkGroupSize:
os << "CL_DEVICE_MAX_WORK_GROUP_SIZE";
break;
case DeviceInfo::MaxWorkItemSizes:
os << "CL_DEVICE_MAX_WORK_ITEM_SIZES";
break;
case DeviceInfo::PreferredVectorWidthChar:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR";
break;
case DeviceInfo::PreferredVectorWidthShort:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT";
break;
case DeviceInfo::PreferredVectorWidthInt:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT";
break;
case DeviceInfo::PreferredVectorWidthLong:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG";
break;
case DeviceInfo::PreferredVectorWidthFloat:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT";
break;
case DeviceInfo::PreferredVectorWidthDouble:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE";
break;
case DeviceInfo::MaxClockFrequency:
os << "CL_DEVICE_MAX_CLOCK_FREQUENCY";
break;
case DeviceInfo::AddressBits:
os << "CL_DEVICE_ADDRESS_BITS";
break;
case DeviceInfo::MaxReadImageArgs:
os << "CL_DEVICE_MAX_READ_IMAGE_ARGS";
break;
case DeviceInfo::MaxWriteImageArgs:
os << "CL_DEVICE_MAX_WRITE_IMAGE_ARGS";
break;
case DeviceInfo::MaxMemAllocSize:
os << "CL_DEVICE_MAX_MEM_ALLOC_SIZE";
break;
case DeviceInfo::Image2D_MaxWidth:
os << "CL_DEVICE_IMAGE2D_MAX_WIDTH";
break;
case DeviceInfo::Image2D_MaxHeight:
os << "CL_DEVICE_IMAGE2D_MAX_HEIGHT";
break;
case DeviceInfo::Image3D_MaxWidth:
os << "CL_DEVICE_IMAGE3D_MAX_WIDTH";
break;
case DeviceInfo::Image3D_MaxHeight:
os << "CL_DEVICE_IMAGE3D_MAX_HEIGHT";
break;
case DeviceInfo::Image3D_MaxDepth:
os << "CL_DEVICE_IMAGE3D_MAX_DEPTH";
break;
case DeviceInfo::ImageSupport:
os << "CL_DEVICE_IMAGE_SUPPORT";
break;
case DeviceInfo::MaxParameterSize:
os << "CL_DEVICE_MAX_PARAMETER_SIZE";
break;
case DeviceInfo::MaxSamplers:
os << "CL_DEVICE_MAX_SAMPLERS";
break;
case DeviceInfo::MemBaseAddrAlign:
os << "CL_DEVICE_MEM_BASE_ADDR_ALIGN";
break;
case DeviceInfo::MinDataTypeAlignSize:
os << "CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE";
break;
case DeviceInfo::SingleFpConfig:
os << "CL_DEVICE_SINGLE_FP_CONFIG";
break;
case DeviceInfo::GlobalMemCacheType:
os << "CL_DEVICE_GLOBAL_MEM_CACHE_TYPE";
break;
case DeviceInfo::GlobalMemCachelineSize:
os << "CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE";
break;
case DeviceInfo::GlobalMemCacheSize:
os << "CL_DEVICE_GLOBAL_MEM_CACHE_SIZE";
break;
case DeviceInfo::GlobalMemSize:
os << "CL_DEVICE_GLOBAL_MEM_SIZE";
break;
case DeviceInfo::MaxConstantBufferSize:
os << "CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE";
break;
case DeviceInfo::MaxConstantArgs:
os << "CL_DEVICE_MAX_CONSTANT_ARGS";
break;
case DeviceInfo::LocalMemType:
os << "CL_DEVICE_LOCAL_MEM_TYPE";
break;
case DeviceInfo::LocalMemSize:
os << "CL_DEVICE_LOCAL_MEM_SIZE";
break;
case DeviceInfo::ErrorCorrectionSupport:
os << "CL_DEVICE_ERROR_CORRECTION_SUPPORT";
break;
case DeviceInfo::ProfilingTimerResolution:
os << "CL_DEVICE_PROFILING_TIMER_RESOLUTION";
break;
case DeviceInfo::EndianLittle:
os << "CL_DEVICE_ENDIAN_LITTLE";
break;
case DeviceInfo::Available:
os << "CL_DEVICE_AVAILABLE";
break;
case DeviceInfo::CompilerAvailable:
os << "CL_DEVICE_COMPILER_AVAILABLE";
break;
case DeviceInfo::ExecutionCapabilities:
os << "CL_DEVICE_EXECUTION_CAPABILITIES";
break;
case DeviceInfo::QueueOnHostProperties:
os << "CL_DEVICE_QUEUE_ON_HOST_PROPERTIES";
break;
case DeviceInfo::Name:
os << "CL_DEVICE_NAME";
break;
case DeviceInfo::Vendor:
os << "CL_DEVICE_VENDOR";
break;
case DeviceInfo::DriverVersion:
os << "CL_DRIVER_VERSION";
break;
case DeviceInfo::Profile:
os << "CL_DEVICE_PROFILE";
break;
case DeviceInfo::Version:
os << "CL_DEVICE_VERSION";
break;
case DeviceInfo::Extensions:
os << "CL_DEVICE_EXTENSIONS";
break;
case DeviceInfo::Platform:
os << "CL_DEVICE_PLATFORM";
break;
case DeviceInfo::DoubleFpConfig:
os << "CL_DEVICE_DOUBLE_FP_CONFIG";
break;
case DeviceInfo::HalfFpConfig:
os << "CL_DEVICE_HALF_FP_CONFIG";
break;
case DeviceInfo::PreferredVectorWidthHalf:
os << "CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF";
break;
case DeviceInfo::HostUnifiedMemory:
os << "CL_DEVICE_HOST_UNIFIED_MEMORY";
break;
case DeviceInfo::NativeVectorWidthChar:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR";
break;
case DeviceInfo::NativeVectorWidthShort:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT";
break;
case DeviceInfo::NativeVectorWidthInt:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_INT";
break;
case DeviceInfo::NativeVectorWidthLong:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG";
break;
case DeviceInfo::NativeVectorWidthFloat:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT";
break;
case DeviceInfo::NativeVectorWidthDouble:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE";
break;
case DeviceInfo::NativeVectorWidthHalf:
os << "CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF";
break;
case DeviceInfo::OpenCL_C_Version:
os << "CL_DEVICE_OPENCL_C_VERSION";
break;
case DeviceInfo::LinkerAvailable:
os << "CL_DEVICE_LINKER_AVAILABLE";
break;
case DeviceInfo::BuiltInKernels:
os << "CL_DEVICE_BUILT_IN_KERNELS";
break;
case DeviceInfo::ImageMaxBufferSize:
os << "CL_DEVICE_IMAGE_MAX_BUFFER_SIZE";
break;
case DeviceInfo::ImageMaxArraySize:
os << "CL_DEVICE_IMAGE_MAX_ARRAY_SIZE";
break;
case DeviceInfo::ParentDevice:
os << "CL_DEVICE_PARENT_DEVICE";
break;
case DeviceInfo::PartitionMaxSubDevices:
os << "CL_DEVICE_PARTITION_MAX_SUB_DEVICES";
break;
case DeviceInfo::PartitionProperties:
os << "CL_DEVICE_PARTITION_PROPERTIES";
break;
case DeviceInfo::PartitionAffinityDomain:
os << "CL_DEVICE_PARTITION_AFFINITY_DOMAIN";
break;
case DeviceInfo::PartitionType:
os << "CL_DEVICE_PARTITION_TYPE";
break;
case DeviceInfo::ReferenceCount:
os << "CL_DEVICE_REFERENCE_COUNT";
break;
case DeviceInfo::PreferredInteropUserSync:
os << "CL_DEVICE_PREFERRED_INTEROP_USER_SYNC";
break;
case DeviceInfo::PrintfBufferSize:
os << "CL_DEVICE_PRINTF_BUFFER_SIZE";
break;
case DeviceInfo::ImagePitchAlignment:
os << "CL_DEVICE_IMAGE_PITCH_ALIGNMENT";
break;
case DeviceInfo::ImageBaseAddressAlignment:
os << "CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT";
break;
case DeviceInfo::MaxReadWriteImageArgs:
os << "CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS";
break;
case DeviceInfo::MaxGlobalVariableSize:
os << "CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE";
break;
case DeviceInfo::QueueOnDeviceProperties:
os << "CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES";
break;
case DeviceInfo::QueueOnDevicePreferredSize:
os << "CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE";
break;
case DeviceInfo::QueueOnDeviceMaxSize:
os << "CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE";
break;
case DeviceInfo::MaxOnDeviceQueues:
os << "CL_DEVICE_MAX_ON_DEVICE_QUEUES";
break;
case DeviceInfo::MaxOnDeviceEvents:
os << "CL_DEVICE_MAX_ON_DEVICE_EVENTS";
break;
case DeviceInfo::SVM_Capabilities:
os << "CL_DEVICE_SVM_CAPABILITIES";
break;
case DeviceInfo::GlobalVariablePreferredTotalSize:
os << "CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE";
break;
case DeviceInfo::MaxPipeArgs:
os << "CL_DEVICE_MAX_PIPE_ARGS";
break;
case DeviceInfo::PipeMaxActiveReservations:
os << "CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS";
break;
case DeviceInfo::PipeMaxPacketSize:
os << "CL_DEVICE_PIPE_MAX_PACKET_SIZE";
break;
case DeviceInfo::PreferredPlatformAtomicAlignment:
os << "CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT";
break;
case DeviceInfo::PreferredGlobalAtomicAlignment:
os << "CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT";
break;
case DeviceInfo::PreferredLocalAtomicAlignment:
os << "CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT";
break;
case DeviceInfo::IL_Version:
os << "CL_DEVICE_IL_VERSION";
break;
case DeviceInfo::MaxNumSubGroups:
os << "CL_DEVICE_MAX_NUM_SUB_GROUPS";
break;
case DeviceInfo::SubGroupIndependentForwardProgress:
os << "CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS";
break;
case DeviceInfo::NumericVersion:
os << "CL_DEVICE_NUMERIC_VERSION";
break;
case DeviceInfo::ExtensionsWithVersion:
os << "CL_DEVICE_EXTENSIONS_WITH_VERSION";
break;
case DeviceInfo::ILsWithVersion:
os << "CL_DEVICE_ILS_WITH_VERSION";
break;
case DeviceInfo::BuiltInKernelsWithVersion:
os << "CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION";
break;
case DeviceInfo::AtomicMemoryCapabilities:
os << "CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES";
break;
case DeviceInfo::AtomicFenceCapabilities:
os << "CL_DEVICE_ATOMIC_FENCE_CAPABILITIES";
break;
case DeviceInfo::NonUniformWorkGroupSupport:
os << "CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT";
break;
case DeviceInfo::OpenCL_C_AllVersions:
os << "CL_DEVICE_OPENCL_C_ALL_VERSIONS";
break;
case DeviceInfo::PreferredWorkGroupSizeMultiple:
os << "CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE";
break;
case DeviceInfo::WorkGroupCollectiveFunctionsSupport:
os << "CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT";
break;
case DeviceInfo::GenericAddressSpaceSupport:
os << "CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT";
break;
case DeviceInfo::OpenCL_C_Features:
os << "CL_DEVICE_OPENCL_C_FEATURES";
break;
case DeviceInfo::DeviceEnqueueCapabilities:
os << "CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES";
break;
case DeviceInfo::PipeSupport:
os << "CL_DEVICE_PIPE_SUPPORT";
break;
case DeviceInfo::LatestConformanceVersionPassed:
os << "CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
EventInfo FromCLenum<EventInfo>(CLenum from)
{
switch (from)
{
case CL_EVENT_COMMAND_QUEUE:
return EventInfo::CommandQueue;
case CL_EVENT_COMMAND_TYPE:
return EventInfo::CommandType;
case CL_EVENT_REFERENCE_COUNT:
return EventInfo::ReferenceCount;
case CL_EVENT_COMMAND_EXECUTION_STATUS:
return EventInfo::CommandExecutionStatus;
case CL_EVENT_CONTEXT:
return EventInfo::Context;
default:
return EventInfo::InvalidEnum;
}
}
CLenum ToCLenum(EventInfo from)
{
switch (from)
{
case EventInfo::CommandQueue:
return CL_EVENT_COMMAND_QUEUE;
case EventInfo::CommandType:
return CL_EVENT_COMMAND_TYPE;
case EventInfo::ReferenceCount:
return CL_EVENT_REFERENCE_COUNT;
case EventInfo::CommandExecutionStatus:
return CL_EVENT_COMMAND_EXECUTION_STATUS;
case EventInfo::Context:
return CL_EVENT_CONTEXT;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, EventInfo value)
{
switch (value)
{
case EventInfo::CommandQueue:
os << "CL_EVENT_COMMAND_QUEUE";
break;
case EventInfo::CommandType:
os << "CL_EVENT_COMMAND_TYPE";
break;
case EventInfo::ReferenceCount:
os << "CL_EVENT_REFERENCE_COUNT";
break;
case EventInfo::CommandExecutionStatus:
os << "CL_EVENT_COMMAND_EXECUTION_STATUS";
break;
case EventInfo::Context:
os << "CL_EVENT_CONTEXT";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
FilterMode FromCLenum<FilterMode>(CLenum from)
{
switch (from)
{
case CL_FILTER_NEAREST:
return FilterMode::Nearest;
case CL_FILTER_LINEAR:
return FilterMode::Linear;
default:
return FilterMode::InvalidEnum;
}
}
CLenum ToCLenum(FilterMode from)
{
switch (from)
{
case FilterMode::Nearest:
return CL_FILTER_NEAREST;
case FilterMode::Linear:
return CL_FILTER_LINEAR;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, FilterMode value)
{
switch (value)
{
case FilterMode::Nearest:
os << "CL_FILTER_NEAREST";
break;
case FilterMode::Linear:
os << "CL_FILTER_LINEAR";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
ImageInfo FromCLenum<ImageInfo>(CLenum from)
{
switch (from)
{
case CL_IMAGE_FORMAT:
return ImageInfo::Format;
case CL_IMAGE_ELEMENT_SIZE:
return ImageInfo::ElementSize;
case CL_IMAGE_ROW_PITCH:
return ImageInfo::RowPitch;
case CL_IMAGE_SLICE_PITCH:
return ImageInfo::SlicePitch;
case CL_IMAGE_WIDTH:
return ImageInfo::Width;
case CL_IMAGE_HEIGHT:
return ImageInfo::Height;
case CL_IMAGE_DEPTH:
return ImageInfo::Depth;
case CL_IMAGE_ARRAY_SIZE:
return ImageInfo::ArraySize;
case CL_IMAGE_BUFFER:
return ImageInfo::Buffer;
case CL_IMAGE_NUM_MIP_LEVELS:
return ImageInfo::NumMipLevels;
case CL_IMAGE_NUM_SAMPLES:
return ImageInfo::NumSamples;
default:
return ImageInfo::InvalidEnum;
}
}
CLenum ToCLenum(ImageInfo from)
{
switch (from)
{
case ImageInfo::Format:
return CL_IMAGE_FORMAT;
case ImageInfo::ElementSize:
return CL_IMAGE_ELEMENT_SIZE;
case ImageInfo::RowPitch:
return CL_IMAGE_ROW_PITCH;
case ImageInfo::SlicePitch:
return CL_IMAGE_SLICE_PITCH;
case ImageInfo::Width:
return CL_IMAGE_WIDTH;
case ImageInfo::Height:
return CL_IMAGE_HEIGHT;
case ImageInfo::Depth:
return CL_IMAGE_DEPTH;
case ImageInfo::ArraySize:
return CL_IMAGE_ARRAY_SIZE;
case ImageInfo::Buffer:
return CL_IMAGE_BUFFER;
case ImageInfo::NumMipLevels:
return CL_IMAGE_NUM_MIP_LEVELS;
case ImageInfo::NumSamples:
return CL_IMAGE_NUM_SAMPLES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ImageInfo value)
{
switch (value)
{
case ImageInfo::Format:
os << "CL_IMAGE_FORMAT";
break;
case ImageInfo::ElementSize:
os << "CL_IMAGE_ELEMENT_SIZE";
break;
case ImageInfo::RowPitch:
os << "CL_IMAGE_ROW_PITCH";
break;
case ImageInfo::SlicePitch:
os << "CL_IMAGE_SLICE_PITCH";
break;
case ImageInfo::Width:
os << "CL_IMAGE_WIDTH";
break;
case ImageInfo::Height:
os << "CL_IMAGE_HEIGHT";
break;
case ImageInfo::Depth:
os << "CL_IMAGE_DEPTH";
break;
case ImageInfo::ArraySize:
os << "CL_IMAGE_ARRAY_SIZE";
break;
case ImageInfo::Buffer:
os << "CL_IMAGE_BUFFER";
break;
case ImageInfo::NumMipLevels:
os << "CL_IMAGE_NUM_MIP_LEVELS";
break;
case ImageInfo::NumSamples:
os << "CL_IMAGE_NUM_SAMPLES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
KernelArgInfo FromCLenum<KernelArgInfo>(CLenum from)
{
switch (from)
{
case CL_KERNEL_ARG_ADDRESS_QUALIFIER:
return KernelArgInfo::AddressQualifier;
case CL_KERNEL_ARG_ACCESS_QUALIFIER:
return KernelArgInfo::AccessQualifier;
case CL_KERNEL_ARG_TYPE_NAME:
return KernelArgInfo::TypeName;
case CL_KERNEL_ARG_TYPE_QUALIFIER:
return KernelArgInfo::TypeQualifier;
case CL_KERNEL_ARG_NAME:
return KernelArgInfo::Name;
default:
return KernelArgInfo::InvalidEnum;
}
}
CLenum ToCLenum(KernelArgInfo from)
{
switch (from)
{
case KernelArgInfo::AddressQualifier:
return CL_KERNEL_ARG_ADDRESS_QUALIFIER;
case KernelArgInfo::AccessQualifier:
return CL_KERNEL_ARG_ACCESS_QUALIFIER;
case KernelArgInfo::TypeName:
return CL_KERNEL_ARG_TYPE_NAME;
case KernelArgInfo::TypeQualifier:
return CL_KERNEL_ARG_TYPE_QUALIFIER;
case KernelArgInfo::Name:
return CL_KERNEL_ARG_NAME;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, KernelArgInfo value)
{
switch (value)
{
case KernelArgInfo::AddressQualifier:
os << "CL_KERNEL_ARG_ADDRESS_QUALIFIER";
break;
case KernelArgInfo::AccessQualifier:
os << "CL_KERNEL_ARG_ACCESS_QUALIFIER";
break;
case KernelArgInfo::TypeName:
os << "CL_KERNEL_ARG_TYPE_NAME";
break;
case KernelArgInfo::TypeQualifier:
os << "CL_KERNEL_ARG_TYPE_QUALIFIER";
break;
case KernelArgInfo::Name:
os << "CL_KERNEL_ARG_NAME";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
KernelExecInfo FromCLenum<KernelExecInfo>(CLenum from)
{
switch (from)
{
case CL_KERNEL_EXEC_INFO_SVM_PTRS:
return KernelExecInfo::SVM_Ptrs;
case CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM:
return KernelExecInfo::SVM_FineGrainSystem;
default:
return KernelExecInfo::InvalidEnum;
}
}
CLenum ToCLenum(KernelExecInfo from)
{
switch (from)
{
case KernelExecInfo::SVM_Ptrs:
return CL_KERNEL_EXEC_INFO_SVM_PTRS;
case KernelExecInfo::SVM_FineGrainSystem:
return CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, KernelExecInfo value)
{
switch (value)
{
case KernelExecInfo::SVM_Ptrs:
os << "CL_KERNEL_EXEC_INFO_SVM_PTRS";
break;
case KernelExecInfo::SVM_FineGrainSystem:
os << "CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
KernelInfo FromCLenum<KernelInfo>(CLenum from)
{
switch (from)
{
case CL_KERNEL_FUNCTION_NAME:
return KernelInfo::FunctionName;
case CL_KERNEL_NUM_ARGS:
return KernelInfo::NumArgs;
case CL_KERNEL_REFERENCE_COUNT:
return KernelInfo::ReferenceCount;
case CL_KERNEL_CONTEXT:
return KernelInfo::Context;
case CL_KERNEL_PROGRAM:
return KernelInfo::Program;
case CL_KERNEL_ATTRIBUTES:
return KernelInfo::Attributes;
default:
return KernelInfo::InvalidEnum;
}
}
CLenum ToCLenum(KernelInfo from)
{
switch (from)
{
case KernelInfo::FunctionName:
return CL_KERNEL_FUNCTION_NAME;
case KernelInfo::NumArgs:
return CL_KERNEL_NUM_ARGS;
case KernelInfo::ReferenceCount:
return CL_KERNEL_REFERENCE_COUNT;
case KernelInfo::Context:
return CL_KERNEL_CONTEXT;
case KernelInfo::Program:
return CL_KERNEL_PROGRAM;
case KernelInfo::Attributes:
return CL_KERNEL_ATTRIBUTES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, KernelInfo value)
{
switch (value)
{
case KernelInfo::FunctionName:
os << "CL_KERNEL_FUNCTION_NAME";
break;
case KernelInfo::NumArgs:
os << "CL_KERNEL_NUM_ARGS";
break;
case KernelInfo::ReferenceCount:
os << "CL_KERNEL_REFERENCE_COUNT";
break;
case KernelInfo::Context:
os << "CL_KERNEL_CONTEXT";
break;
case KernelInfo::Program:
os << "CL_KERNEL_PROGRAM";
break;
case KernelInfo::Attributes:
os << "CL_KERNEL_ATTRIBUTES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
KernelSubGroupInfo FromCLenum<KernelSubGroupInfo>(CLenum from)
{
switch (from)
{
case CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE:
return KernelSubGroupInfo::MaxSubGroupSizeForNdrange;
case CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE:
return KernelSubGroupInfo::SubGroupCountForNdrange;
case CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT:
return KernelSubGroupInfo::LocalSizeForSubGroupCount;
case CL_KERNEL_MAX_NUM_SUB_GROUPS:
return KernelSubGroupInfo::MaxNumSubGroups;
case CL_KERNEL_COMPILE_NUM_SUB_GROUPS:
return KernelSubGroupInfo::CompileNumSubGroups;
default:
return KernelSubGroupInfo::InvalidEnum;
}
}
CLenum ToCLenum(KernelSubGroupInfo from)
{
switch (from)
{
case KernelSubGroupInfo::MaxSubGroupSizeForNdrange:
return CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE;
case KernelSubGroupInfo::SubGroupCountForNdrange:
return CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE;
case KernelSubGroupInfo::LocalSizeForSubGroupCount:
return CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT;
case KernelSubGroupInfo::MaxNumSubGroups:
return CL_KERNEL_MAX_NUM_SUB_GROUPS;
case KernelSubGroupInfo::CompileNumSubGroups:
return CL_KERNEL_COMPILE_NUM_SUB_GROUPS;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, KernelSubGroupInfo value)
{
switch (value)
{
case KernelSubGroupInfo::MaxSubGroupSizeForNdrange:
os << "CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE";
break;
case KernelSubGroupInfo::SubGroupCountForNdrange:
os << "CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE";
break;
case KernelSubGroupInfo::LocalSizeForSubGroupCount:
os << "CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT";
break;
case KernelSubGroupInfo::MaxNumSubGroups:
os << "CL_KERNEL_MAX_NUM_SUB_GROUPS";
break;
case KernelSubGroupInfo::CompileNumSubGroups:
os << "CL_KERNEL_COMPILE_NUM_SUB_GROUPS";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
KernelWorkGroupInfo FromCLenum<KernelWorkGroupInfo>(CLenum from)
{
switch (from)
{
case CL_KERNEL_WORK_GROUP_SIZE:
return KernelWorkGroupInfo::WorkGroupSize;
case CL_KERNEL_COMPILE_WORK_GROUP_SIZE:
return KernelWorkGroupInfo::CompileWorkGroupSize;
case CL_KERNEL_LOCAL_MEM_SIZE:
return KernelWorkGroupInfo::LocalMemSize;
case CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE:
return KernelWorkGroupInfo::PreferredWorkGroupSizeMultiple;
case CL_KERNEL_PRIVATE_MEM_SIZE:
return KernelWorkGroupInfo::PrivateMemSize;
case CL_KERNEL_GLOBAL_WORK_SIZE:
return KernelWorkGroupInfo::GlobalWorkSize;
default:
return KernelWorkGroupInfo::InvalidEnum;
}
}
CLenum ToCLenum(KernelWorkGroupInfo from)
{
switch (from)
{
case KernelWorkGroupInfo::WorkGroupSize:
return CL_KERNEL_WORK_GROUP_SIZE;
case KernelWorkGroupInfo::CompileWorkGroupSize:
return CL_KERNEL_COMPILE_WORK_GROUP_SIZE;
case KernelWorkGroupInfo::LocalMemSize:
return CL_KERNEL_LOCAL_MEM_SIZE;
case KernelWorkGroupInfo::PreferredWorkGroupSizeMultiple:
return CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE;
case KernelWorkGroupInfo::PrivateMemSize:
return CL_KERNEL_PRIVATE_MEM_SIZE;
case KernelWorkGroupInfo::GlobalWorkSize:
return CL_KERNEL_GLOBAL_WORK_SIZE;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, KernelWorkGroupInfo value)
{
switch (value)
{
case KernelWorkGroupInfo::WorkGroupSize:
os << "CL_KERNEL_WORK_GROUP_SIZE";
break;
case KernelWorkGroupInfo::CompileWorkGroupSize:
os << "CL_KERNEL_COMPILE_WORK_GROUP_SIZE";
break;
case KernelWorkGroupInfo::LocalMemSize:
os << "CL_KERNEL_LOCAL_MEM_SIZE";
break;
case KernelWorkGroupInfo::PreferredWorkGroupSizeMultiple:
os << "CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE";
break;
case KernelWorkGroupInfo::PrivateMemSize:
os << "CL_KERNEL_PRIVATE_MEM_SIZE";
break;
case KernelWorkGroupInfo::GlobalWorkSize:
os << "CL_KERNEL_GLOBAL_WORK_SIZE";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
MemInfo FromCLenum<MemInfo>(CLenum from)
{
switch (from)
{
case CL_MEM_TYPE:
return MemInfo::Type;
case CL_MEM_FLAGS:
return MemInfo::Flags;
case CL_MEM_SIZE:
return MemInfo::Size;
case CL_MEM_HOST_PTR:
return MemInfo::HostPtr;
case CL_MEM_MAP_COUNT:
return MemInfo::MapCount;
case CL_MEM_REFERENCE_COUNT:
return MemInfo::ReferenceCount;
case CL_MEM_CONTEXT:
return MemInfo::Context;
case CL_MEM_ASSOCIATED_MEMOBJECT:
return MemInfo::AssociatedMemObject;
case CL_MEM_OFFSET:
return MemInfo::Offset;
case CL_MEM_USES_SVM_POINTER:
return MemInfo::UsesSVM_Pointer;
case CL_MEM_PROPERTIES:
return MemInfo::Properties;
default:
return MemInfo::InvalidEnum;
}
}
CLenum ToCLenum(MemInfo from)
{
switch (from)
{
case MemInfo::Type:
return CL_MEM_TYPE;
case MemInfo::Flags:
return CL_MEM_FLAGS;
case MemInfo::Size:
return CL_MEM_SIZE;
case MemInfo::HostPtr:
return CL_MEM_HOST_PTR;
case MemInfo::MapCount:
return CL_MEM_MAP_COUNT;
case MemInfo::ReferenceCount:
return CL_MEM_REFERENCE_COUNT;
case MemInfo::Context:
return CL_MEM_CONTEXT;
case MemInfo::AssociatedMemObject:
return CL_MEM_ASSOCIATED_MEMOBJECT;
case MemInfo::Offset:
return CL_MEM_OFFSET;
case MemInfo::UsesSVM_Pointer:
return CL_MEM_USES_SVM_POINTER;
case MemInfo::Properties:
return CL_MEM_PROPERTIES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, MemInfo value)
{
switch (value)
{
case MemInfo::Type:
os << "CL_MEM_TYPE";
break;
case MemInfo::Flags:
os << "CL_MEM_FLAGS";
break;
case MemInfo::Size:
os << "CL_MEM_SIZE";
break;
case MemInfo::HostPtr:
os << "CL_MEM_HOST_PTR";
break;
case MemInfo::MapCount:
os << "CL_MEM_MAP_COUNT";
break;
case MemInfo::ReferenceCount:
os << "CL_MEM_REFERENCE_COUNT";
break;
case MemInfo::Context:
os << "CL_MEM_CONTEXT";
break;
case MemInfo::AssociatedMemObject:
os << "CL_MEM_ASSOCIATED_MEMOBJECT";
break;
case MemInfo::Offset:
os << "CL_MEM_OFFSET";
break;
case MemInfo::UsesSVM_Pointer:
os << "CL_MEM_USES_SVM_POINTER";
break;
case MemInfo::Properties:
os << "CL_MEM_PROPERTIES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
MemObjectType FromCLenum<MemObjectType>(CLenum from)
{
switch (from)
{
case CL_MEM_OBJECT_BUFFER:
return MemObjectType::Buffer;
case CL_MEM_OBJECT_IMAGE2D:
return MemObjectType::Image2D;
case CL_MEM_OBJECT_IMAGE3D:
return MemObjectType::Image3D;
case CL_MEM_OBJECT_IMAGE2D_ARRAY:
return MemObjectType::Image2D_Array;
case CL_MEM_OBJECT_IMAGE1D:
return MemObjectType::Image1D;
case CL_MEM_OBJECT_IMAGE1D_ARRAY:
return MemObjectType::Image1D_Array;
case CL_MEM_OBJECT_IMAGE1D_BUFFER:
return MemObjectType::Image1D_Buffer;
case CL_MEM_OBJECT_PIPE:
return MemObjectType::Pipe;
default:
return MemObjectType::InvalidEnum;
}
}
CLenum ToCLenum(MemObjectType from)
{
switch (from)
{
case MemObjectType::Buffer:
return CL_MEM_OBJECT_BUFFER;
case MemObjectType::Image2D:
return CL_MEM_OBJECT_IMAGE2D;
case MemObjectType::Image3D:
return CL_MEM_OBJECT_IMAGE3D;
case MemObjectType::Image2D_Array:
return CL_MEM_OBJECT_IMAGE2D_ARRAY;
case MemObjectType::Image1D:
return CL_MEM_OBJECT_IMAGE1D;
case MemObjectType::Image1D_Array:
return CL_MEM_OBJECT_IMAGE1D_ARRAY;
case MemObjectType::Image1D_Buffer:
return CL_MEM_OBJECT_IMAGE1D_BUFFER;
case MemObjectType::Pipe:
return CL_MEM_OBJECT_PIPE;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, MemObjectType value)
{
switch (value)
{
case MemObjectType::Buffer:
os << "CL_MEM_OBJECT_BUFFER";
break;
case MemObjectType::Image2D:
os << "CL_MEM_OBJECT_IMAGE2D";
break;
case MemObjectType::Image3D:
os << "CL_MEM_OBJECT_IMAGE3D";
break;
case MemObjectType::Image2D_Array:
os << "CL_MEM_OBJECT_IMAGE2D_ARRAY";
break;
case MemObjectType::Image1D:
os << "CL_MEM_OBJECT_IMAGE1D";
break;
case MemObjectType::Image1D_Array:
os << "CL_MEM_OBJECT_IMAGE1D_ARRAY";
break;
case MemObjectType::Image1D_Buffer:
os << "CL_MEM_OBJECT_IMAGE1D_BUFFER";
break;
case MemObjectType::Pipe:
os << "CL_MEM_OBJECT_PIPE";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
PipeInfo FromCLenum<PipeInfo>(CLenum from)
{
switch (from)
{
case CL_PIPE_PACKET_SIZE:
return PipeInfo::PacketSize;
case CL_PIPE_MAX_PACKETS:
return PipeInfo::MaxPackets;
case CL_PIPE_PROPERTIES:
return PipeInfo::Properties;
default:
return PipeInfo::InvalidEnum;
}
}
CLenum ToCLenum(PipeInfo from)
{
switch (from)
{
case PipeInfo::PacketSize:
return CL_PIPE_PACKET_SIZE;
case PipeInfo::MaxPackets:
return CL_PIPE_MAX_PACKETS;
case PipeInfo::Properties:
return CL_PIPE_PROPERTIES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, PipeInfo value)
{
switch (value)
{
case PipeInfo::PacketSize:
os << "CL_PIPE_PACKET_SIZE";
break;
case PipeInfo::MaxPackets:
os << "CL_PIPE_MAX_PACKETS";
break;
case PipeInfo::Properties:
os << "CL_PIPE_PROPERTIES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
PlatformInfo FromCLenum<PlatformInfo>(CLenum from)
{
switch (from)
{
case CL_PLATFORM_PROFILE:
return PlatformInfo::Profile;
case CL_PLATFORM_VERSION:
return PlatformInfo::Version;
case CL_PLATFORM_NAME:
return PlatformInfo::Name;
case CL_PLATFORM_VENDOR:
return PlatformInfo::Vendor;
case CL_PLATFORM_EXTENSIONS:
return PlatformInfo::Extensions;
case CL_PLATFORM_HOST_TIMER_RESOLUTION:
return PlatformInfo::HostTimerResolution;
case CL_PLATFORM_NUMERIC_VERSION:
return PlatformInfo::NumericVersion;
case CL_PLATFORM_EXTENSIONS_WITH_VERSION:
return PlatformInfo::ExtensionsWithVersion;
default:
return PlatformInfo::InvalidEnum;
}
}
CLenum ToCLenum(PlatformInfo from)
{
switch (from)
{
case PlatformInfo::Profile:
return CL_PLATFORM_PROFILE;
case PlatformInfo::Version:
return CL_PLATFORM_VERSION;
case PlatformInfo::Name:
return CL_PLATFORM_NAME;
case PlatformInfo::Vendor:
return CL_PLATFORM_VENDOR;
case PlatformInfo::Extensions:
return CL_PLATFORM_EXTENSIONS;
case PlatformInfo::HostTimerResolution:
return CL_PLATFORM_HOST_TIMER_RESOLUTION;
case PlatformInfo::NumericVersion:
return CL_PLATFORM_NUMERIC_VERSION;
case PlatformInfo::ExtensionsWithVersion:
return CL_PLATFORM_EXTENSIONS_WITH_VERSION;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, PlatformInfo value)
{
switch (value)
{
case PlatformInfo::Profile:
os << "CL_PLATFORM_PROFILE";
break;
case PlatformInfo::Version:
os << "CL_PLATFORM_VERSION";
break;
case PlatformInfo::Name:
os << "CL_PLATFORM_NAME";
break;
case PlatformInfo::Vendor:
os << "CL_PLATFORM_VENDOR";
break;
case PlatformInfo::Extensions:
os << "CL_PLATFORM_EXTENSIONS";
break;
case PlatformInfo::HostTimerResolution:
os << "CL_PLATFORM_HOST_TIMER_RESOLUTION";
break;
case PlatformInfo::NumericVersion:
os << "CL_PLATFORM_NUMERIC_VERSION";
break;
case PlatformInfo::ExtensionsWithVersion:
os << "CL_PLATFORM_EXTENSIONS_WITH_VERSION";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
ProfilingInfo FromCLenum<ProfilingInfo>(CLenum from)
{
switch (from)
{
case CL_PROFILING_COMMAND_QUEUED:
return ProfilingInfo::CommandQueued;
case CL_PROFILING_COMMAND_SUBMIT:
return ProfilingInfo::CommandSubmit;
case CL_PROFILING_COMMAND_START:
return ProfilingInfo::CommandStart;
case CL_PROFILING_COMMAND_END:
return ProfilingInfo::CommandEnd;
case CL_PROFILING_COMMAND_COMPLETE:
return ProfilingInfo::CommandComplete;
default:
return ProfilingInfo::InvalidEnum;
}
}
CLenum ToCLenum(ProfilingInfo from)
{
switch (from)
{
case ProfilingInfo::CommandQueued:
return CL_PROFILING_COMMAND_QUEUED;
case ProfilingInfo::CommandSubmit:
return CL_PROFILING_COMMAND_SUBMIT;
case ProfilingInfo::CommandStart:
return CL_PROFILING_COMMAND_START;
case ProfilingInfo::CommandEnd:
return CL_PROFILING_COMMAND_END;
case ProfilingInfo::CommandComplete:
return CL_PROFILING_COMMAND_COMPLETE;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ProfilingInfo value)
{
switch (value)
{
case ProfilingInfo::CommandQueued:
os << "CL_PROFILING_COMMAND_QUEUED";
break;
case ProfilingInfo::CommandSubmit:
os << "CL_PROFILING_COMMAND_SUBMIT";
break;
case ProfilingInfo::CommandStart:
os << "CL_PROFILING_COMMAND_START";
break;
case ProfilingInfo::CommandEnd:
os << "CL_PROFILING_COMMAND_END";
break;
case ProfilingInfo::CommandComplete:
os << "CL_PROFILING_COMMAND_COMPLETE";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
ProgramBuildInfo FromCLenum<ProgramBuildInfo>(CLenum from)
{
switch (from)
{
case CL_PROGRAM_BUILD_STATUS:
return ProgramBuildInfo::Status;
case CL_PROGRAM_BUILD_OPTIONS:
return ProgramBuildInfo::Options;
case CL_PROGRAM_BUILD_LOG:
return ProgramBuildInfo::Log;
case CL_PROGRAM_BINARY_TYPE:
return ProgramBuildInfo::BinaryType;
case CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE:
return ProgramBuildInfo::GlobalVariableTotalSize;
default:
return ProgramBuildInfo::InvalidEnum;
}
}
CLenum ToCLenum(ProgramBuildInfo from)
{
switch (from)
{
case ProgramBuildInfo::Status:
return CL_PROGRAM_BUILD_STATUS;
case ProgramBuildInfo::Options:
return CL_PROGRAM_BUILD_OPTIONS;
case ProgramBuildInfo::Log:
return CL_PROGRAM_BUILD_LOG;
case ProgramBuildInfo::BinaryType:
return CL_PROGRAM_BINARY_TYPE;
case ProgramBuildInfo::GlobalVariableTotalSize:
return CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ProgramBuildInfo value)
{
switch (value)
{
case ProgramBuildInfo::Status:
os << "CL_PROGRAM_BUILD_STATUS";
break;
case ProgramBuildInfo::Options:
os << "CL_PROGRAM_BUILD_OPTIONS";
break;
case ProgramBuildInfo::Log:
os << "CL_PROGRAM_BUILD_LOG";
break;
case ProgramBuildInfo::BinaryType:
os << "CL_PROGRAM_BINARY_TYPE";
break;
case ProgramBuildInfo::GlobalVariableTotalSize:
os << "CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
ProgramInfo FromCLenum<ProgramInfo>(CLenum from)
{
switch (from)
{
case CL_PROGRAM_REFERENCE_COUNT:
return ProgramInfo::ReferenceCount;
case CL_PROGRAM_CONTEXT:
return ProgramInfo::Context;
case CL_PROGRAM_NUM_DEVICES:
return ProgramInfo::NumDevices;
case CL_PROGRAM_DEVICES:
return ProgramInfo::Devices;
case CL_PROGRAM_SOURCE:
return ProgramInfo::Source;
case CL_PROGRAM_BINARY_SIZES:
return ProgramInfo::BinarySizes;
case CL_PROGRAM_BINARIES:
return ProgramInfo::Binaries;
case CL_PROGRAM_NUM_KERNELS:
return ProgramInfo::NumKernels;
case CL_PROGRAM_KERNEL_NAMES:
return ProgramInfo::KernelNames;
case CL_PROGRAM_IL:
return ProgramInfo::IL;
case CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT:
return ProgramInfo::ScopeGlobalCtorsPresent;
case CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT:
return ProgramInfo::ScopeGlobalDtorsPresent;
default:
return ProgramInfo::InvalidEnum;
}
}
CLenum ToCLenum(ProgramInfo from)
{
switch (from)
{
case ProgramInfo::ReferenceCount:
return CL_PROGRAM_REFERENCE_COUNT;
case ProgramInfo::Context:
return CL_PROGRAM_CONTEXT;
case ProgramInfo::NumDevices:
return CL_PROGRAM_NUM_DEVICES;
case ProgramInfo::Devices:
return CL_PROGRAM_DEVICES;
case ProgramInfo::Source:
return CL_PROGRAM_SOURCE;
case ProgramInfo::BinarySizes:
return CL_PROGRAM_BINARY_SIZES;
case ProgramInfo::Binaries:
return CL_PROGRAM_BINARIES;
case ProgramInfo::NumKernels:
return CL_PROGRAM_NUM_KERNELS;
case ProgramInfo::KernelNames:
return CL_PROGRAM_KERNEL_NAMES;
case ProgramInfo::IL:
return CL_PROGRAM_IL;
case ProgramInfo::ScopeGlobalCtorsPresent:
return CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT;
case ProgramInfo::ScopeGlobalDtorsPresent:
return CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, ProgramInfo value)
{
switch (value)
{
case ProgramInfo::ReferenceCount:
os << "CL_PROGRAM_REFERENCE_COUNT";
break;
case ProgramInfo::Context:
os << "CL_PROGRAM_CONTEXT";
break;
case ProgramInfo::NumDevices:
os << "CL_PROGRAM_NUM_DEVICES";
break;
case ProgramInfo::Devices:
os << "CL_PROGRAM_DEVICES";
break;
case ProgramInfo::Source:
os << "CL_PROGRAM_SOURCE";
break;
case ProgramInfo::BinarySizes:
os << "CL_PROGRAM_BINARY_SIZES";
break;
case ProgramInfo::Binaries:
os << "CL_PROGRAM_BINARIES";
break;
case ProgramInfo::NumKernels:
os << "CL_PROGRAM_NUM_KERNELS";
break;
case ProgramInfo::KernelNames:
os << "CL_PROGRAM_KERNEL_NAMES";
break;
case ProgramInfo::IL:
os << "CL_PROGRAM_IL";
break;
case ProgramInfo::ScopeGlobalCtorsPresent:
os << "CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT";
break;
case ProgramInfo::ScopeGlobalDtorsPresent:
os << "CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
template <>
SamplerInfo FromCLenum<SamplerInfo>(CLenum from)
{
switch (from)
{
case CL_SAMPLER_REFERENCE_COUNT:
return SamplerInfo::ReferenceCount;
case CL_SAMPLER_CONTEXT:
return SamplerInfo::Context;
case CL_SAMPLER_NORMALIZED_COORDS:
return SamplerInfo::NormalizedCoords;
case CL_SAMPLER_ADDRESSING_MODE:
return SamplerInfo::AddressingMode;
case CL_SAMPLER_FILTER_MODE:
return SamplerInfo::FilterMode;
case CL_SAMPLER_MIP_FILTER_MODE:
return SamplerInfo::MipFilterMode;
case CL_SAMPLER_LOD_MIN:
return SamplerInfo::LOD_Min;
case CL_SAMPLER_LOD_MAX:
return SamplerInfo::LOD_Max;
case CL_SAMPLER_PROPERTIES:
return SamplerInfo::Properties;
default:
return SamplerInfo::InvalidEnum;
}
}
CLenum ToCLenum(SamplerInfo from)
{
switch (from)
{
case SamplerInfo::ReferenceCount:
return CL_SAMPLER_REFERENCE_COUNT;
case SamplerInfo::Context:
return CL_SAMPLER_CONTEXT;
case SamplerInfo::NormalizedCoords:
return CL_SAMPLER_NORMALIZED_COORDS;
case SamplerInfo::AddressingMode:
return CL_SAMPLER_ADDRESSING_MODE;
case SamplerInfo::FilterMode:
return CL_SAMPLER_FILTER_MODE;
case SamplerInfo::MipFilterMode:
return CL_SAMPLER_MIP_FILTER_MODE;
case SamplerInfo::LOD_Min:
return CL_SAMPLER_LOD_MIN;
case SamplerInfo::LOD_Max:
return CL_SAMPLER_LOD_MAX;
case SamplerInfo::Properties:
return CL_SAMPLER_PROPERTIES;
default:
UNREACHABLE();
return 0;
}
}
std::ostream &operator<<(std::ostream &os, SamplerInfo value)
{
switch (value)
{
case SamplerInfo::ReferenceCount:
os << "CL_SAMPLER_REFERENCE_COUNT";
break;
case SamplerInfo::Context:
os << "CL_SAMPLER_CONTEXT";
break;
case SamplerInfo::NormalizedCoords:
os << "CL_SAMPLER_NORMALIZED_COORDS";
break;
case SamplerInfo::AddressingMode:
os << "CL_SAMPLER_ADDRESSING_MODE";
break;
case SamplerInfo::FilterMode:
os << "CL_SAMPLER_FILTER_MODE";
break;
case SamplerInfo::MipFilterMode:
os << "CL_SAMPLER_MIP_FILTER_MODE";
break;
case SamplerInfo::LOD_Min:
os << "CL_SAMPLER_LOD_MIN";
break;
case SamplerInfo::LOD_Max:
os << "CL_SAMPLER_LOD_MAX";
break;
case SamplerInfo::Properties:
os << "CL_SAMPLER_PROPERTIES";
break;
default:
os << "GL_INVALID_ENUM";
break;
}
return os;
}
} // namespace cl
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_packed_gl_enums.py using data from packed_cl_enums.json.
//
// Copyright 2017 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// PackedCLEnums_autogen.h:
// Declares ANGLE-specific enums classes for CLenums and functions operating
// on them.
#ifndef COMMON_PACKEDCLENUMS_AUTOGEN_H_
#define COMMON_PACKEDCLENUMS_AUTOGEN_H_
#include <angle_cl.h>
typedef cl_uint CLenum;
#include <cstdint>
#include <ostream>
namespace cl
{
template <typename Enum>
Enum FromCLenum(CLenum from);
enum class AddressingMode : uint8_t
{
None = 0,
ClampToEdge = 1,
Clamp = 2,
Repeat = 3,
MirroredRepeat = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
AddressingMode FromCLenum<AddressingMode>(CLenum from);
CLenum ToCLenum(AddressingMode from);
std::ostream &operator<<(std::ostream &os, AddressingMode value);
enum class CommandQueueInfo : uint8_t
{
Context = 0,
Device = 1,
ReferenceCount = 2,
Properties = 3,
Size = 4,
DeviceDefault = 5,
PropertiesArray = 6,
InvalidEnum = 7,
EnumCount = 7,
};
template <>
CommandQueueInfo FromCLenum<CommandQueueInfo>(CLenum from);
CLenum ToCLenum(CommandQueueInfo from);
std::ostream &operator<<(std::ostream &os, CommandQueueInfo value);
enum class ContextInfo : uint8_t
{
ReferenceCount = 0,
Devices = 1,
Properties = 2,
NumDevices = 3,
InvalidEnum = 4,
EnumCount = 4,
};
template <>
ContextInfo FromCLenum<ContextInfo>(CLenum from);
CLenum ToCLenum(ContextInfo from);
std::ostream &operator<<(std::ostream &os, ContextInfo value);
enum class DeviceInfo : uint8_t
{
Type = 0,
VendorID = 1,
MaxComputeUnits = 2,
MaxWorkItemDimensions = 3,
MaxWorkGroupSize = 4,
MaxWorkItemSizes = 5,
PreferredVectorWidthChar = 6,
PreferredVectorWidthShort = 7,
PreferredVectorWidthInt = 8,
PreferredVectorWidthLong = 9,
PreferredVectorWidthFloat = 10,
PreferredVectorWidthDouble = 11,
MaxClockFrequency = 12,
AddressBits = 13,
MaxReadImageArgs = 14,
MaxWriteImageArgs = 15,
MaxMemAllocSize = 16,
Image2D_MaxWidth = 17,
Image2D_MaxHeight = 18,
Image3D_MaxWidth = 19,
Image3D_MaxHeight = 20,
Image3D_MaxDepth = 21,
ImageSupport = 22,
MaxParameterSize = 23,
MaxSamplers = 24,
MemBaseAddrAlign = 25,
MinDataTypeAlignSize = 26,
SingleFpConfig = 27,
GlobalMemCacheType = 28,
GlobalMemCachelineSize = 29,
GlobalMemCacheSize = 30,
GlobalMemSize = 31,
MaxConstantBufferSize = 32,
MaxConstantArgs = 33,
LocalMemType = 34,
LocalMemSize = 35,
ErrorCorrectionSupport = 36,
ProfilingTimerResolution = 37,
EndianLittle = 38,
Available = 39,
CompilerAvailable = 40,
ExecutionCapabilities = 41,
QueueOnHostProperties = 42,
Name = 43,
Vendor = 44,
DriverVersion = 45,
Profile = 46,
Version = 47,
Extensions = 48,
Platform = 49,
DoubleFpConfig = 50,
HalfFpConfig = 51,
PreferredVectorWidthHalf = 52,
HostUnifiedMemory = 53,
NativeVectorWidthChar = 54,
NativeVectorWidthShort = 55,
NativeVectorWidthInt = 56,
NativeVectorWidthLong = 57,
NativeVectorWidthFloat = 58,
NativeVectorWidthDouble = 59,
NativeVectorWidthHalf = 60,
OpenCL_C_Version = 61,
LinkerAvailable = 62,
BuiltInKernels = 63,
ImageMaxBufferSize = 64,
ImageMaxArraySize = 65,
ParentDevice = 66,
PartitionMaxSubDevices = 67,
PartitionProperties = 68,
PartitionAffinityDomain = 69,
PartitionType = 70,
ReferenceCount = 71,
PreferredInteropUserSync = 72,
PrintfBufferSize = 73,
ImagePitchAlignment = 74,
ImageBaseAddressAlignment = 75,
MaxReadWriteImageArgs = 76,
MaxGlobalVariableSize = 77,
QueueOnDeviceProperties = 78,
QueueOnDevicePreferredSize = 79,
QueueOnDeviceMaxSize = 80,
MaxOnDeviceQueues = 81,
MaxOnDeviceEvents = 82,
SVM_Capabilities = 83,
GlobalVariablePreferredTotalSize = 84,
MaxPipeArgs = 85,
PipeMaxActiveReservations = 86,
PipeMaxPacketSize = 87,
PreferredPlatformAtomicAlignment = 88,
PreferredGlobalAtomicAlignment = 89,
PreferredLocalAtomicAlignment = 90,
IL_Version = 91,
MaxNumSubGroups = 92,
SubGroupIndependentForwardProgress = 93,
NumericVersion = 94,
ExtensionsWithVersion = 95,
ILsWithVersion = 96,
BuiltInKernelsWithVersion = 97,
AtomicMemoryCapabilities = 98,
AtomicFenceCapabilities = 99,
NonUniformWorkGroupSupport = 100,
OpenCL_C_AllVersions = 101,
PreferredWorkGroupSizeMultiple = 102,
WorkGroupCollectiveFunctionsSupport = 103,
GenericAddressSpaceSupport = 104,
OpenCL_C_Features = 105,
DeviceEnqueueCapabilities = 106,
PipeSupport = 107,
LatestConformanceVersionPassed = 108,
InvalidEnum = 109,
EnumCount = 109,
};
template <>
DeviceInfo FromCLenum<DeviceInfo>(CLenum from);
CLenum ToCLenum(DeviceInfo from);
std::ostream &operator<<(std::ostream &os, DeviceInfo value);
enum class EventInfo : uint8_t
{
CommandQueue = 0,
CommandType = 1,
ReferenceCount = 2,
CommandExecutionStatus = 3,
Context = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
EventInfo FromCLenum<EventInfo>(CLenum from);
CLenum ToCLenum(EventInfo from);
std::ostream &operator<<(std::ostream &os, EventInfo value);
enum class FilterMode : uint8_t
{
Nearest = 0,
Linear = 1,
InvalidEnum = 2,
EnumCount = 2,
};
template <>
FilterMode FromCLenum<FilterMode>(CLenum from);
CLenum ToCLenum(FilterMode from);
std::ostream &operator<<(std::ostream &os, FilterMode value);
enum class ImageInfo : uint8_t
{
Format = 0,
ElementSize = 1,
RowPitch = 2,
SlicePitch = 3,
Width = 4,
Height = 5,
Depth = 6,
ArraySize = 7,
Buffer = 8,
NumMipLevels = 9,
NumSamples = 10,
InvalidEnum = 11,
EnumCount = 11,
};
template <>
ImageInfo FromCLenum<ImageInfo>(CLenum from);
CLenum ToCLenum(ImageInfo from);
std::ostream &operator<<(std::ostream &os, ImageInfo value);
enum class KernelArgInfo : uint8_t
{
AddressQualifier = 0,
AccessQualifier = 1,
TypeName = 2,
TypeQualifier = 3,
Name = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
KernelArgInfo FromCLenum<KernelArgInfo>(CLenum from);
CLenum ToCLenum(KernelArgInfo from);
std::ostream &operator<<(std::ostream &os, KernelArgInfo value);
enum class KernelExecInfo : uint8_t
{
SVM_Ptrs = 0,
SVM_FineGrainSystem = 1,
InvalidEnum = 2,
EnumCount = 2,
};
template <>
KernelExecInfo FromCLenum<KernelExecInfo>(CLenum from);
CLenum ToCLenum(KernelExecInfo from);
std::ostream &operator<<(std::ostream &os, KernelExecInfo value);
enum class KernelInfo : uint8_t
{
FunctionName = 0,
NumArgs = 1,
ReferenceCount = 2,
Context = 3,
Program = 4,
Attributes = 5,
InvalidEnum = 6,
EnumCount = 6,
};
template <>
KernelInfo FromCLenum<KernelInfo>(CLenum from);
CLenum ToCLenum(KernelInfo from);
std::ostream &operator<<(std::ostream &os, KernelInfo value);
enum class KernelSubGroupInfo : uint8_t
{
MaxSubGroupSizeForNdrange = 0,
SubGroupCountForNdrange = 1,
LocalSizeForSubGroupCount = 2,
MaxNumSubGroups = 3,
CompileNumSubGroups = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
KernelSubGroupInfo FromCLenum<KernelSubGroupInfo>(CLenum from);
CLenum ToCLenum(KernelSubGroupInfo from);
std::ostream &operator<<(std::ostream &os, KernelSubGroupInfo value);
enum class KernelWorkGroupInfo : uint8_t
{
WorkGroupSize = 0,
CompileWorkGroupSize = 1,
LocalMemSize = 2,
PreferredWorkGroupSizeMultiple = 3,
PrivateMemSize = 4,
GlobalWorkSize = 5,
InvalidEnum = 6,
EnumCount = 6,
};
template <>
KernelWorkGroupInfo FromCLenum<KernelWorkGroupInfo>(CLenum from);
CLenum ToCLenum(KernelWorkGroupInfo from);
std::ostream &operator<<(std::ostream &os, KernelWorkGroupInfo value);
enum class MemInfo : uint8_t
{
Type = 0,
Flags = 1,
Size = 2,
HostPtr = 3,
MapCount = 4,
ReferenceCount = 5,
Context = 6,
AssociatedMemObject = 7,
Offset = 8,
UsesSVM_Pointer = 9,
Properties = 10,
InvalidEnum = 11,
EnumCount = 11,
};
template <>
MemInfo FromCLenum<MemInfo>(CLenum from);
CLenum ToCLenum(MemInfo from);
std::ostream &operator<<(std::ostream &os, MemInfo value);
enum class MemObjectType : uint8_t
{
Buffer = 0,
Image2D = 1,
Image3D = 2,
Image2D_Array = 3,
Image1D = 4,
Image1D_Array = 5,
Image1D_Buffer = 6,
Pipe = 7,
InvalidEnum = 8,
EnumCount = 8,
};
template <>
MemObjectType FromCLenum<MemObjectType>(CLenum from);
CLenum ToCLenum(MemObjectType from);
std::ostream &operator<<(std::ostream &os, MemObjectType value);
enum class PipeInfo : uint8_t
{
PacketSize = 0,
MaxPackets = 1,
Properties = 2,
InvalidEnum = 3,
EnumCount = 3,
};
template <>
PipeInfo FromCLenum<PipeInfo>(CLenum from);
CLenum ToCLenum(PipeInfo from);
std::ostream &operator<<(std::ostream &os, PipeInfo value);
enum class PlatformInfo : uint8_t
{
Profile = 0,
Version = 1,
Name = 2,
Vendor = 3,
Extensions = 4,
HostTimerResolution = 5,
NumericVersion = 6,
ExtensionsWithVersion = 7,
InvalidEnum = 8,
EnumCount = 8,
};
template <>
PlatformInfo FromCLenum<PlatformInfo>(CLenum from);
CLenum ToCLenum(PlatformInfo from);
std::ostream &operator<<(std::ostream &os, PlatformInfo value);
enum class ProfilingInfo : uint8_t
{
CommandQueued = 0,
CommandSubmit = 1,
CommandStart = 2,
CommandEnd = 3,
CommandComplete = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
ProfilingInfo FromCLenum<ProfilingInfo>(CLenum from);
CLenum ToCLenum(ProfilingInfo from);
std::ostream &operator<<(std::ostream &os, ProfilingInfo value);
enum class ProgramBuildInfo : uint8_t
{
Status = 0,
Options = 1,
Log = 2,
BinaryType = 3,
GlobalVariableTotalSize = 4,
InvalidEnum = 5,
EnumCount = 5,
};
template <>
ProgramBuildInfo FromCLenum<ProgramBuildInfo>(CLenum from);
CLenum ToCLenum(ProgramBuildInfo from);
std::ostream &operator<<(std::ostream &os, ProgramBuildInfo value);
enum class ProgramInfo : uint8_t
{
ReferenceCount = 0,
Context = 1,
NumDevices = 2,
Devices = 3,
Source = 4,
BinarySizes = 5,
Binaries = 6,
NumKernels = 7,
KernelNames = 8,
IL = 9,
ScopeGlobalCtorsPresent = 10,
ScopeGlobalDtorsPresent = 11,
InvalidEnum = 12,
EnumCount = 12,
};
template <>
ProgramInfo FromCLenum<ProgramInfo>(CLenum from);
CLenum ToCLenum(ProgramInfo from);
std::ostream &operator<<(std::ostream &os, ProgramInfo value);
enum class SamplerInfo : uint8_t
{
ReferenceCount = 0,
Context = 1,
NormalizedCoords = 2,
AddressingMode = 3,
FilterMode = 4,
MipFilterMode = 5,
LOD_Min = 6,
LOD_Max = 7,
Properties = 8,
InvalidEnum = 9,
EnumCount = 9,
};
template <>
SamplerInfo FromCLenum<SamplerInfo>(CLenum from);
CLenum ToCLenum(SamplerInfo from);
std::ostream &operator<<(std::ostream &os, SamplerInfo value);
} // namespace cl
#endif // COMMON_PACKEDCLENUMS_AUTOGEN_H_
......@@ -14,7 +14,6 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <angle_gl.h>
#include <cstdint>
#include <ostream>
......
......@@ -12,8 +12,6 @@
#ifndef COMMON_PACKEDGLENUMS_AUTOGEN_H_
#define COMMON_PACKEDGLENUMS_AUTOGEN_H_
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <angle_gl.h>
#include <cstdint>
......
......@@ -18,15 +18,24 @@ Generators = [
{
'json': 'packed_gl_enums.json',
'output': 'PackedGLEnums',
'includes': '#include <angle_gl.h>',
'namespace': 'gl',
'enum_type': 'GLenum',
},
{
'json': 'packed_egl_enums.json',
'output': 'PackedEGLEnums',
'includes': '#include <EGL/egl.h>\n#include <EGL/eglext.h>',
'namespace': 'egl',
'enum_type': 'EGLenum',
},
{
'json': 'packed_cl_enums.json',
'output': 'PackedCLEnums',
'includes': '#include <angle_cl.h>\ntypedef cl_uint CLenum;',
'namespace': 'cl',
'enum_type': 'CLenum',
},
]
......@@ -73,9 +82,7 @@ header_template = """// GENERATED FILE - DO NOT EDIT.
#ifndef COMMON_{include_guard}_
#define COMMON_{include_guard}_
#include <angle_gl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
{includes}
#include <cstdint>
#include <ostream>
......@@ -107,7 +114,8 @@ std::ostream &operator<<(std::ostream &os, {enum_name} value);
"""
def write_header(enums, path_prefix, file_name, data_source_name, namespace, api_enum_name):
def write_header(enums, path_prefix, file_name, data_source_name, includes, namespace,
api_enum_name):
content = ['']
for enum in enums:
......@@ -128,6 +136,7 @@ def write_header(enums, path_prefix, file_name, data_source_name, namespace, api
script_name=sys.argv[0],
file_name=file_name,
include_guard=generate_include_guard(file_name),
includes=includes,
namespace=namespace,
api_enum_name=api_enum_name)
......@@ -257,11 +266,12 @@ def main():
for generator in Generators:
json_file = generator['json']
output_file = generator['output']
includes = generator['includes']
namespace = generator['namespace']
enum_type = generator['enum_type']
enums = load_enums(path_prefix + json_file)
write_header(enums, path_prefix, output_file + '_autogen.h', json_file, namespace,
enum_type)
write_header(enums, path_prefix, output_file + '_autogen.h', json_file, includes,
namespace, enum_type)
write_cpp(enums, path_prefix, output_file + '_autogen.cpp', json_file, namespace,
enum_type)
return 0
......
{
"PlatformInfo": {
"Profile": "CL_PLATFORM_PROFILE",
"Version": "CL_PLATFORM_VERSION",
"Name": "CL_PLATFORM_NAME",
"Vendor": "CL_PLATFORM_VENDOR",
"Extensions": "CL_PLATFORM_EXTENSIONS",
"HostTimerResolution": "CL_PLATFORM_HOST_TIMER_RESOLUTION",
"NumericVersion": "CL_PLATFORM_NUMERIC_VERSION",
"ExtensionsWithVersion": "CL_PLATFORM_EXTENSIONS_WITH_VERSION"
},
"DeviceInfo": {
"Type": "CL_DEVICE_TYPE",
"VendorID": "CL_DEVICE_VENDOR_ID",
"MaxComputeUnits": "CL_DEVICE_MAX_COMPUTE_UNITS",
"MaxWorkItemDimensions": "CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS",
"MaxWorkGroupSize": "CL_DEVICE_MAX_WORK_GROUP_SIZE",
"MaxWorkItemSizes": "CL_DEVICE_MAX_WORK_ITEM_SIZES",
"PreferredVectorWidthChar": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR",
"PreferredVectorWidthShort": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT",
"PreferredVectorWidthInt": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT",
"PreferredVectorWidthLong": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG",
"PreferredVectorWidthFloat": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT",
"PreferredVectorWidthDouble": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE",
"MaxClockFrequency": "CL_DEVICE_MAX_CLOCK_FREQUENCY",
"AddressBits": "CL_DEVICE_ADDRESS_BITS",
"MaxReadImageArgs": "CL_DEVICE_MAX_READ_IMAGE_ARGS",
"MaxWriteImageArgs": "CL_DEVICE_MAX_WRITE_IMAGE_ARGS",
"MaxMemAllocSize": "CL_DEVICE_MAX_MEM_ALLOC_SIZE",
"Image2D_MaxWidth": "CL_DEVICE_IMAGE2D_MAX_WIDTH",
"Image2D_MaxHeight": "CL_DEVICE_IMAGE2D_MAX_HEIGHT",
"Image3D_MaxWidth": "CL_DEVICE_IMAGE3D_MAX_WIDTH",
"Image3D_MaxHeight": "CL_DEVICE_IMAGE3D_MAX_HEIGHT",
"Image3D_MaxDepth": "CL_DEVICE_IMAGE3D_MAX_DEPTH",
"ImageSupport": "CL_DEVICE_IMAGE_SUPPORT",
"MaxParameterSize": "CL_DEVICE_MAX_PARAMETER_SIZE",
"MaxSamplers": "CL_DEVICE_MAX_SAMPLERS",
"MemBaseAddrAlign": "CL_DEVICE_MEM_BASE_ADDR_ALIGN",
"MinDataTypeAlignSize": "CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE",
"SingleFpConfig": "CL_DEVICE_SINGLE_FP_CONFIG",
"GlobalMemCacheType": "CL_DEVICE_GLOBAL_MEM_CACHE_TYPE",
"GlobalMemCachelineSize": "CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE",
"GlobalMemCacheSize": "CL_DEVICE_GLOBAL_MEM_CACHE_SIZE",
"GlobalMemSize": "CL_DEVICE_GLOBAL_MEM_SIZE",
"MaxConstantBufferSize": "CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE",
"MaxConstantArgs": "CL_DEVICE_MAX_CONSTANT_ARGS",
"LocalMemType": "CL_DEVICE_LOCAL_MEM_TYPE",
"LocalMemSize": "CL_DEVICE_LOCAL_MEM_SIZE",
"ErrorCorrectionSupport": "CL_DEVICE_ERROR_CORRECTION_SUPPORT",
"ProfilingTimerResolution": "CL_DEVICE_PROFILING_TIMER_RESOLUTION",
"EndianLittle": "CL_DEVICE_ENDIAN_LITTLE",
"Available": "CL_DEVICE_AVAILABLE",
"CompilerAvailable": "CL_DEVICE_COMPILER_AVAILABLE",
"ExecutionCapabilities": "CL_DEVICE_EXECUTION_CAPABILITIES",
"QueueOnHostProperties": "CL_DEVICE_QUEUE_ON_HOST_PROPERTIES",
"Name": "CL_DEVICE_NAME",
"Vendor": "CL_DEVICE_VENDOR",
"DriverVersion": "CL_DRIVER_VERSION",
"Profile": "CL_DEVICE_PROFILE",
"Version": "CL_DEVICE_VERSION",
"Extensions": "CL_DEVICE_EXTENSIONS",
"Platform": "CL_DEVICE_PLATFORM",
"DoubleFpConfig": "CL_DEVICE_DOUBLE_FP_CONFIG",
"HalfFpConfig": "CL_DEVICE_HALF_FP_CONFIG",
"PreferredVectorWidthHalf": "CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF",
"HostUnifiedMemory": "CL_DEVICE_HOST_UNIFIED_MEMORY",
"NativeVectorWidthChar": "CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR",
"NativeVectorWidthShort": "CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT",
"NativeVectorWidthInt": "CL_DEVICE_NATIVE_VECTOR_WIDTH_INT",
"NativeVectorWidthLong": "CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG",
"NativeVectorWidthFloat": "CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT",
"NativeVectorWidthDouble": "CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE",
"NativeVectorWidthHalf": "CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF",
"OpenCL_C_Version": "CL_DEVICE_OPENCL_C_VERSION",
"LinkerAvailable": "CL_DEVICE_LINKER_AVAILABLE",
"BuiltInKernels": "CL_DEVICE_BUILT_IN_KERNELS",
"ImageMaxBufferSize": "CL_DEVICE_IMAGE_MAX_BUFFER_SIZE",
"ImageMaxArraySize": "CL_DEVICE_IMAGE_MAX_ARRAY_SIZE",
"ParentDevice": "CL_DEVICE_PARENT_DEVICE",
"PartitionMaxSubDevices": "CL_DEVICE_PARTITION_MAX_SUB_DEVICES",
"PartitionProperties": "CL_DEVICE_PARTITION_PROPERTIES",
"PartitionAffinityDomain": "CL_DEVICE_PARTITION_AFFINITY_DOMAIN",
"PartitionType": "CL_DEVICE_PARTITION_TYPE",
"ReferenceCount": "CL_DEVICE_REFERENCE_COUNT",
"PreferredInteropUserSync": "CL_DEVICE_PREFERRED_INTEROP_USER_SYNC",
"PrintfBufferSize": "CL_DEVICE_PRINTF_BUFFER_SIZE",
"ImagePitchAlignment": "CL_DEVICE_IMAGE_PITCH_ALIGNMENT",
"ImageBaseAddressAlignment": "CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT",
"MaxReadWriteImageArgs": "CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS",
"MaxGlobalVariableSize": "CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE",
"QueueOnDeviceProperties": "CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES",
"QueueOnDevicePreferredSize": "CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE",
"QueueOnDeviceMaxSize": "CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE",
"MaxOnDeviceQueues": "CL_DEVICE_MAX_ON_DEVICE_QUEUES",
"MaxOnDeviceEvents": "CL_DEVICE_MAX_ON_DEVICE_EVENTS",
"SVM_Capabilities": "CL_DEVICE_SVM_CAPABILITIES",
"GlobalVariablePreferredTotalSize": "CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE",
"MaxPipeArgs": "CL_DEVICE_MAX_PIPE_ARGS",
"PipeMaxActiveReservations": "CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS",
"PipeMaxPacketSize": "CL_DEVICE_PIPE_MAX_PACKET_SIZE",
"PreferredPlatformAtomicAlignment": "CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT",
"PreferredGlobalAtomicAlignment": "CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT",
"PreferredLocalAtomicAlignment": "CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT",
"IL_Version": "CL_DEVICE_IL_VERSION",
"MaxNumSubGroups": "CL_DEVICE_MAX_NUM_SUB_GROUPS",
"SubGroupIndependentForwardProgress": "CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS",
"NumericVersion": "CL_DEVICE_NUMERIC_VERSION",
"ExtensionsWithVersion": "CL_DEVICE_EXTENSIONS_WITH_VERSION",
"ILsWithVersion": "CL_DEVICE_ILS_WITH_VERSION",
"BuiltInKernelsWithVersion": "CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION",
"AtomicMemoryCapabilities": "CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES",
"AtomicFenceCapabilities": "CL_DEVICE_ATOMIC_FENCE_CAPABILITIES",
"NonUniformWorkGroupSupport": "CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT",
"OpenCL_C_AllVersions": "CL_DEVICE_OPENCL_C_ALL_VERSIONS",
"PreferredWorkGroupSizeMultiple": "CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE",
"WorkGroupCollectiveFunctionsSupport": "CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT",
"GenericAddressSpaceSupport": "CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT",
"OpenCL_C_Features": "CL_DEVICE_OPENCL_C_FEATURES",
"DeviceEnqueueCapabilities": "CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES",
"PipeSupport": "CL_DEVICE_PIPE_SUPPORT",
"LatestConformanceVersionPassed": "CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED"
},
"ContextInfo": {
"ReferenceCount": "CL_CONTEXT_REFERENCE_COUNT",
"Devices": "CL_CONTEXT_DEVICES",
"Properties": "CL_CONTEXT_PROPERTIES",
"NumDevices": "CL_CONTEXT_NUM_DEVICES"
},
"CommandQueueInfo": {
"Context": "CL_QUEUE_CONTEXT",
"Device": "CL_QUEUE_DEVICE",
"ReferenceCount": "CL_QUEUE_REFERENCE_COUNT",
"Properties": "CL_QUEUE_PROPERTIES",
"Size": "CL_QUEUE_SIZE",
"DeviceDefault": "CL_QUEUE_DEVICE_DEFAULT",
"PropertiesArray": "CL_QUEUE_PROPERTIES_ARRAY"
},
"MemObjectType": {
"Buffer": "CL_MEM_OBJECT_BUFFER",
"Image2D": "CL_MEM_OBJECT_IMAGE2D",
"Image3D": "CL_MEM_OBJECT_IMAGE3D",
"Image2D_Array": "CL_MEM_OBJECT_IMAGE2D_ARRAY",
"Image1D": "CL_MEM_OBJECT_IMAGE1D",
"Image1D_Array": "CL_MEM_OBJECT_IMAGE1D_ARRAY",
"Image1D_Buffer": "CL_MEM_OBJECT_IMAGE1D_BUFFER",
"Pipe": "CL_MEM_OBJECT_PIPE"
},
"MemInfo": {
"Type": "CL_MEM_TYPE",
"Flags": "CL_MEM_FLAGS",
"Size": "CL_MEM_SIZE",
"HostPtr": "CL_MEM_HOST_PTR",
"MapCount": "CL_MEM_MAP_COUNT",
"ReferenceCount": "CL_MEM_REFERENCE_COUNT",
"Context": "CL_MEM_CONTEXT",
"AssociatedMemObject": "CL_MEM_ASSOCIATED_MEMOBJECT",
"Offset": "CL_MEM_OFFSET",
"UsesSVM_Pointer": "CL_MEM_USES_SVM_POINTER",
"Properties": "CL_MEM_PROPERTIES"
},
"ImageInfo": {
"Format": "CL_IMAGE_FORMAT",
"ElementSize": "CL_IMAGE_ELEMENT_SIZE",
"RowPitch": "CL_IMAGE_ROW_PITCH",
"SlicePitch": "CL_IMAGE_SLICE_PITCH",
"Width": "CL_IMAGE_WIDTH",
"Height": "CL_IMAGE_HEIGHT",
"Depth": "CL_IMAGE_DEPTH",
"ArraySize": "CL_IMAGE_ARRAY_SIZE",
"Buffer": "CL_IMAGE_BUFFER",
"NumMipLevels": "CL_IMAGE_NUM_MIP_LEVELS",
"NumSamples": "CL_IMAGE_NUM_SAMPLES"
},
"PipeInfo": {
"PacketSize": "CL_PIPE_PACKET_SIZE",
"MaxPackets": "CL_PIPE_MAX_PACKETS",
"Properties": "CL_PIPE_PROPERTIES"
},
"AddressingMode": {
"None": "CL_ADDRESS_NONE",
"ClampToEdge": "CL_ADDRESS_CLAMP_TO_EDGE",
"Clamp": "CL_ADDRESS_CLAMP",
"Repeat": "CL_ADDRESS_REPEAT",
"MirroredRepeat": "CL_ADDRESS_MIRRORED_REPEAT"
},
"FilterMode": {
"Nearest": "CL_FILTER_NEAREST",
"Linear": "CL_FILTER_LINEAR"
},
"SamplerInfo": {
"ReferenceCount": "CL_SAMPLER_REFERENCE_COUNT",
"Context": "CL_SAMPLER_CONTEXT",
"NormalizedCoords": "CL_SAMPLER_NORMALIZED_COORDS",
"AddressingMode": "CL_SAMPLER_ADDRESSING_MODE",
"FilterMode": "CL_SAMPLER_FILTER_MODE",
"MipFilterMode": "CL_SAMPLER_MIP_FILTER_MODE",
"LOD_Min": "CL_SAMPLER_LOD_MIN",
"LOD_Max": "CL_SAMPLER_LOD_MAX",
"Properties": "CL_SAMPLER_PROPERTIES"
},
"ProgramInfo": {
"ReferenceCount": "CL_PROGRAM_REFERENCE_COUNT",
"Context": "CL_PROGRAM_CONTEXT",
"NumDevices": "CL_PROGRAM_NUM_DEVICES",
"Devices": "CL_PROGRAM_DEVICES",
"Source": "CL_PROGRAM_SOURCE",
"BinarySizes": "CL_PROGRAM_BINARY_SIZES",
"Binaries": "CL_PROGRAM_BINARIES",
"NumKernels": "CL_PROGRAM_NUM_KERNELS",
"KernelNames": "CL_PROGRAM_KERNEL_NAMES",
"IL": "CL_PROGRAM_IL",
"ScopeGlobalCtorsPresent": "CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT",
"ScopeGlobalDtorsPresent": "CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT"
},
"ProgramBuildInfo": {
"Status": "CL_PROGRAM_BUILD_STATUS",
"Options": "CL_PROGRAM_BUILD_OPTIONS",
"Log": "CL_PROGRAM_BUILD_LOG",
"BinaryType": "CL_PROGRAM_BINARY_TYPE",
"GlobalVariableTotalSize": "CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE"
},
"KernelInfo": {
"FunctionName": "CL_KERNEL_FUNCTION_NAME",
"NumArgs": "CL_KERNEL_NUM_ARGS",
"ReferenceCount": "CL_KERNEL_REFERENCE_COUNT",
"Context": "CL_KERNEL_CONTEXT",
"Program": "CL_KERNEL_PROGRAM",
"Attributes": "CL_KERNEL_ATTRIBUTES"
},
"KernelArgInfo": {
"AddressQualifier": "CL_KERNEL_ARG_ADDRESS_QUALIFIER",
"AccessQualifier": "CL_KERNEL_ARG_ACCESS_QUALIFIER",
"TypeName": "CL_KERNEL_ARG_TYPE_NAME",
"TypeQualifier": "CL_KERNEL_ARG_TYPE_QUALIFIER",
"Name": "CL_KERNEL_ARG_NAME"
},
"KernelWorkGroupInfo": {
"WorkGroupSize": "CL_KERNEL_WORK_GROUP_SIZE",
"CompileWorkGroupSize": "CL_KERNEL_COMPILE_WORK_GROUP_SIZE",
"LocalMemSize": "CL_KERNEL_LOCAL_MEM_SIZE",
"PreferredWorkGroupSizeMultiple": "CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE",
"PrivateMemSize": "CL_KERNEL_PRIVATE_MEM_SIZE",
"GlobalWorkSize": "CL_KERNEL_GLOBAL_WORK_SIZE"
},
"KernelSubGroupInfo": {
"MaxSubGroupSizeForNdrange": "CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE",
"SubGroupCountForNdrange": "CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE",
"LocalSizeForSubGroupCount": "CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT",
"MaxNumSubGroups": "CL_KERNEL_MAX_NUM_SUB_GROUPS",
"CompileNumSubGroups": "CL_KERNEL_COMPILE_NUM_SUB_GROUPS"
},
"KernelExecInfo": {
"SVM_Ptrs": "CL_KERNEL_EXEC_INFO_SVM_PTRS",
"SVM_FineGrainSystem": "CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"
},
"EventInfo": {
"CommandQueue": "CL_EVENT_COMMAND_QUEUE",
"CommandType": "CL_EVENT_COMMAND_TYPE",
"ReferenceCount": "CL_EVENT_REFERENCE_COUNT",
"CommandExecutionStatus": "CL_EVENT_COMMAND_EXECUTION_STATUS",
"Context": "CL_EVENT_CONTEXT"
},
"ProfilingInfo": {
"CommandQueued": "CL_PROFILING_COMMAND_QUEUED",
"CommandSubmit": "CL_PROFILING_COMMAND_SUBMIT",
"CommandStart": "CL_PROFILING_COMMAND_START",
"CommandEnd": "CL_PROFILING_COMMAND_END",
"CommandComplete": "CL_PROFILING_COMMAND_COMPLETE"
}
}
......@@ -11,6 +11,8 @@ libangle_common_sources = [
"src/common/MemoryBuffer.cpp",
"src/common/MemoryBuffer.h",
"src/common/Optional.h",
"src/common/PackedCLEnums_autogen.cpp",
"src/common/PackedCLEnums_autogen.h",
"src/common/PackedEGLEnums_autogen.cpp",
"src/common/PackedEGLEnums_autogen.h",
"src/common/PackedEnums.cpp",
......@@ -542,6 +544,7 @@ libglesv2_sources = [
"src/libGLESv2/proc_table_egl.h",
"src/libGLESv2/proc_table_egl_autogen.cpp",
"src/libGLESv2/resource.h",
"src/libGLESv2/validationCL.h",
]
if (is_win) {
......
......@@ -16,7 +16,7 @@ cl_int GetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *n
}
cl_int GetPlatformInfo(cl_platform_id platform,
cl_platform_info param_name,
PlatformInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -34,7 +34,7 @@ cl_int GetDeviceIDs(cl_platform_id platform,
}
cl_int GetDeviceInfo(cl_device_id device,
cl_device_info param_name,
DeviceInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -116,7 +116,7 @@ cl_int ReleaseContext(cl_context context)
}
cl_int GetContextInfo(cl_context context,
cl_context_info param_name,
ContextInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -151,7 +151,7 @@ cl_int ReleaseCommandQueue(cl_command_queue command_queue)
}
cl_int GetCommandQueueInfo(cl_command_queue command_queue,
cl_command_queue_info param_name,
CommandQueueInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -230,7 +230,7 @@ cl_int ReleaseMemObject(cl_mem memobj)
cl_int GetSupportedImageFormats(cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
MemObjectType image_type,
cl_uint num_entries,
cl_image_format *image_formats,
cl_uint *num_image_formats)
......@@ -239,7 +239,7 @@ cl_int GetSupportedImageFormats(cl_context context,
}
cl_int GetMemObjectInfo(cl_mem memobj,
cl_mem_info param_name,
MemInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -248,7 +248,7 @@ cl_int GetMemObjectInfo(cl_mem memobj,
}
cl_int GetImageInfo(cl_mem image,
cl_image_info param_name,
ImageInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -257,7 +257,7 @@ cl_int GetImageInfo(cl_mem image,
}
cl_int GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
PipeInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -297,7 +297,7 @@ cl_int ReleaseSampler(cl_sampler sampler)
}
cl_int GetSamplerInfo(cl_sampler sampler,
cl_sampler_info param_name,
SamplerInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -409,7 +409,7 @@ cl_int UnloadPlatformCompiler(cl_platform_id platform)
}
cl_int GetProgramInfo(cl_program program,
cl_program_info param_name,
ProgramInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -419,7 +419,7 @@ cl_int GetProgramInfo(cl_program program,
cl_int GetProgramBuildInfo(cl_program program,
cl_device_id device,
cl_program_build_info param_name,
ProgramBuildInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -466,7 +466,7 @@ cl_int SetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *a
}
cl_int SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
KernelExecInfo param_name,
size_t param_value_size,
const void *param_value)
{
......@@ -474,7 +474,7 @@ cl_int SetKernelExecInfo(cl_kernel kernel,
}
cl_int GetKernelInfo(cl_kernel kernel,
cl_kernel_info param_name,
KernelInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -484,7 +484,7 @@ cl_int GetKernelInfo(cl_kernel kernel,
cl_int GetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
KernelArgInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -494,7 +494,7 @@ cl_int GetKernelArgInfo(cl_kernel kernel,
cl_int GetKernelWorkGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_work_group_info param_name,
KernelWorkGroupInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -504,7 +504,7 @@ cl_int GetKernelWorkGroupInfo(cl_kernel kernel,
cl_int GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
KernelSubGroupInfo param_name,
size_t input_value_size,
const void *input_value,
size_t param_value_size,
......@@ -520,7 +520,7 @@ cl_int WaitForEvents(cl_uint num_events, const cl_event *event_list)
}
cl_int GetEventInfo(cl_event event,
cl_event_info param_name,
EventInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -559,7 +559,7 @@ cl_int SetEventCallback(cl_event event,
}
cl_int GetEventProfilingInfo(cl_event event,
cl_profiling_info param_name,
ProfilingInfo param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret)
......@@ -1005,8 +1005,8 @@ cl_command_queue CreateCommandQueue(cl_context context,
cl_sampler CreateSampler(cl_context context,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode,
AddressingMode addressing_mode,
FilterMode filter_mode,
cl_int *errcode_ret)
{
return 0;
......
......@@ -12,11 +12,13 @@
#include "angle_cl.h"
#include "common/PackedCLEnums_autogen.h"
namespace cl
{
cl_int GetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
cl_int GetPlatformInfo(cl_platform_id platform,
cl_platform_info param_name,
PlatformInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -26,7 +28,7 @@ cl_int GetDeviceIDs(cl_platform_id platform,
cl_device_id *devices,
cl_uint *num_devices);
cl_int GetDeviceInfo(cl_device_id device,
cl_device_info param_name,
DeviceInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -64,7 +66,7 @@ cl_context CreateContextFromType(const cl_context_properties *properties,
cl_int RetainContext(cl_context context);
cl_int ReleaseContext(cl_context context);
cl_int GetContextInfo(cl_context context,
cl_context_info param_name,
ContextInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -79,7 +81,7 @@ cl_command_queue CreateCommandQueueWithProperties(cl_context context,
cl_int RetainCommandQueue(cl_command_queue command_queue);
cl_int ReleaseCommandQueue(cl_command_queue command_queue);
cl_int GetCommandQueueInfo(cl_command_queue command_queue,
cl_command_queue_info param_name,
CommandQueueInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -122,22 +124,22 @@ cl_int RetainMemObject(cl_mem memobj);
cl_int ReleaseMemObject(cl_mem memobj);
cl_int GetSupportedImageFormats(cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
MemObjectType image_typePacked,
cl_uint num_entries,
cl_image_format *image_formats,
cl_uint *num_image_formats);
cl_int GetMemObjectInfo(cl_mem memobj,
cl_mem_info param_name,
MemInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetImageInfo(cl_mem image,
cl_image_info param_name,
ImageInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
PipeInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -152,7 +154,7 @@ cl_sampler CreateSamplerWithProperties(cl_context context,
cl_int RetainSampler(cl_sampler sampler);
cl_int ReleaseSampler(cl_sampler sampler);
cl_int GetSamplerInfo(cl_sampler sampler,
cl_sampler_info param_name,
SamplerInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -212,13 +214,13 @@ cl_int SetProgramSpecializationConstant(cl_program program,
const void *spec_value);
cl_int UnloadPlatformCompiler(cl_platform_id platform);
cl_int GetProgramInfo(cl_program program,
cl_program_info param_name,
ProgramInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetProgramBuildInfo(cl_program program,
cl_device_id device,
cl_program_build_info param_name,
ProgramBuildInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -233,29 +235,29 @@ cl_int ReleaseKernel(cl_kernel kernel);
cl_int SetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value);
cl_int SetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value);
cl_int SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
KernelExecInfo param_namePacked,
size_t param_value_size,
const void *param_value);
cl_int GetKernelInfo(cl_kernel kernel,
cl_kernel_info param_name,
KernelInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
KernelArgInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetKernelWorkGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_work_group_info param_name,
KernelWorkGroupInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
KernelSubGroupInfo param_namePacked,
size_t input_value_size,
const void *input_value,
size_t param_value_size,
......@@ -263,7 +265,7 @@ cl_int GetKernelSubGroupInfo(cl_kernel kernel,
size_t *param_value_size_ret);
cl_int WaitForEvents(cl_uint num_events, const cl_event *event_list);
cl_int GetEventInfo(cl_event event,
cl_event_info param_name,
EventInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -278,7 +280,7 @@ cl_int SetEventCallback(cl_event event,
void *user_data),
void *user_data);
cl_int GetEventProfilingInfo(cl_event event,
cl_profiling_info param_name,
ProfilingInfo param_namePacked,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
......@@ -564,8 +566,8 @@ cl_command_queue CreateCommandQueue(cl_context context,
cl_int *errcode_ret);
cl_sampler CreateSampler(cl_context context,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode,
AddressingMode addressing_modePacked,
FilterMode filter_modePacked,
cl_int *errcode_ret);
cl_int EnqueueTask(cl_command_queue command_queue,
cl_kernel kernel,
......
......@@ -12,6 +12,9 @@
#include "cl_stubs_autogen.h"
#include "entry_points_cl_utils.h"
#include "validationCL.h"
using namespace cl;
extern "C" {
......@@ -24,7 +27,7 @@ cl_int CL_API_CALL CL_GetPlatformIDs(cl_uint num_entries,
"num_entries = %u, platforms = 0x%016" PRIxPTR ", num_platforms = 0x%016" PRIxPTR "",
num_entries, (uintptr_t)platforms, (uintptr_t)num_platforms);
// TODO: GetPlatformIDs
// TODO: validate
return cl::GetPlatformIDs(num_entries, platforms, num_platforms);
}
......@@ -42,9 +45,11 @@ cl_int CL_API_CALL CL_GetPlatformInfo(cl_platform_id platform,
(uintptr_t)platform, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetPlatformInfo
PlatformInfo param_namePacked = PackParam<PlatformInfo>(param_name);
// TODO: validate
return cl::GetPlatformInfo(platform, param_name, param_value_size, param_value,
return cl::GetPlatformInfo(platform, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -61,7 +66,7 @@ cl_int CL_API_CALL CL_GetDeviceIDs(cl_platform_id platform,
(uintptr_t)platform, device_type, num_entries, (uintptr_t)devices,
(uintptr_t)num_devices);
// TODO: GetDeviceIDs
// TODO: validate
return cl::GetDeviceIDs(platform, device_type, num_entries, devices, num_devices);
}
......@@ -79,9 +84,11 @@ cl_int CL_API_CALL CL_GetDeviceInfo(cl_device_id device,
(uintptr_t)device, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetDeviceInfo
DeviceInfo param_namePacked = PackParam<DeviceInfo>(param_name);
// TODO: validate
return cl::GetDeviceInfo(device, param_name, param_value_size, param_value,
return cl::GetDeviceInfo(device, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -102,7 +109,7 @@ cl_context CL_API_CALL CL_CreateContext(const cl_context_properties *properties,
(uintptr_t)properties, num_devices, (uintptr_t)devices, (uintptr_t)pfn_notify,
(uintptr_t)user_data, (uintptr_t)errcode_ret);
// TODO: CreateContext
// TODO: validate
return cl::CreateContext(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
}
......@@ -123,7 +130,7 @@ CL_CreateContextFromType(const cl_context_properties *properties,
(uintptr_t)properties, device_type, (uintptr_t)pfn_notify, (uintptr_t)user_data,
(uintptr_t)errcode_ret);
// TODO: CreateContextFromType
// TODO: validate
return cl::CreateContextFromType(properties, device_type, pfn_notify, user_data, errcode_ret);
}
......@@ -132,7 +139,7 @@ cl_int CL_API_CALL CL_RetainContext(cl_context context)
{
CL_EVENT(RetainContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
// TODO: RetainContext
// TODO: validate
return cl::RetainContext(context);
}
......@@ -141,7 +148,7 @@ cl_int CL_API_CALL CL_ReleaseContext(cl_context context)
{
CL_EVENT(ReleaseContext, "context = 0x%016" PRIxPTR "", (uintptr_t)context);
// TODO: ReleaseContext
// TODO: validate
return cl::ReleaseContext(context);
}
......@@ -159,9 +166,11 @@ cl_int CL_API_CALL CL_GetContextInfo(cl_context context,
(uintptr_t)context, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetContextInfo
ContextInfo param_namePacked = PackParam<ContextInfo>(param_name);
return cl::GetContextInfo(context, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetContextInfo(context, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -169,7 +178,7 @@ cl_int CL_API_CALL CL_RetainCommandQueue(cl_command_queue command_queue)
{
CL_EVENT(RetainCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: RetainCommandQueue
// TODO: validate
return cl::RetainCommandQueue(command_queue);
}
......@@ -178,7 +187,7 @@ cl_int CL_API_CALL CL_ReleaseCommandQueue(cl_command_queue command_queue)
{
CL_EVENT(ReleaseCommandQueue, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: ReleaseCommandQueue
// TODO: validate
return cl::ReleaseCommandQueue(command_queue);
}
......@@ -196,9 +205,11 @@ cl_int CL_API_CALL CL_GetCommandQueueInfo(cl_command_queue command_queue,
(uintptr_t)command_queue, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetCommandQueueInfo
CommandQueueInfo param_namePacked = PackParam<CommandQueueInfo>(param_name);
// TODO: validate
return cl::GetCommandQueueInfo(command_queue, param_name, param_value_size, param_value,
return cl::GetCommandQueueInfo(command_queue, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -213,7 +224,7 @@ cl_mem CL_API_CALL CL_CreateBuffer(cl_context context,
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, flags, size, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateBuffer
// TODO: validate
return cl::CreateBuffer(context, flags, size, host_ptr, errcode_ret);
}
......@@ -222,7 +233,7 @@ cl_int CL_API_CALL CL_RetainMemObject(cl_mem memobj)
{
CL_EVENT(RetainMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
// TODO: RetainMemObject
// TODO: validate
return cl::RetainMemObject(memobj);
}
......@@ -231,7 +242,7 @@ cl_int CL_API_CALL CL_ReleaseMemObject(cl_mem memobj)
{
CL_EVENT(ReleaseMemObject, "memobj = 0x%016" PRIxPTR "", (uintptr_t)memobj);
// TODO: ReleaseMemObject
// TODO: validate
return cl::ReleaseMemObject(memobj);
}
......@@ -250,10 +261,12 @@ cl_int CL_API_CALL CL_GetSupportedImageFormats(cl_context context,
(uintptr_t)context, flags, image_type, num_entries, (uintptr_t)image_formats,
(uintptr_t)num_image_formats);
// TODO: GetSupportedImageFormats
MemObjectType image_typePacked = PackParam<MemObjectType>(image_type);
// TODO: validate
return cl::GetSupportedImageFormats(context, flags, image_type, num_entries, image_formats,
num_image_formats);
return cl::GetSupportedImageFormats(context, flags, image_typePacked, num_entries,
image_formats, num_image_formats);
}
cl_int CL_API_CALL CL_GetMemObjectInfo(cl_mem memobj,
......@@ -269,9 +282,11 @@ cl_int CL_API_CALL CL_GetMemObjectInfo(cl_mem memobj,
(uintptr_t)memobj, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetMemObjectInfo
MemInfo param_namePacked = PackParam<MemInfo>(param_name);
return cl::GetMemObjectInfo(memobj, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetMemObjectInfo(memobj, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -288,16 +303,19 @@ cl_int CL_API_CALL CL_GetImageInfo(cl_mem image,
(uintptr_t)image, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetImageInfo
ImageInfo param_namePacked = PackParam<ImageInfo>(param_name);
// TODO: validate
return cl::GetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret);
return cl::GetImageInfo(image, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_RetainSampler(cl_sampler sampler)
{
CL_EVENT(RetainSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
// TODO: RetainSampler
// TODO: validate
return cl::RetainSampler(sampler);
}
......@@ -306,7 +324,7 @@ cl_int CL_API_CALL CL_ReleaseSampler(cl_sampler sampler)
{
CL_EVENT(ReleaseSampler, "sampler = 0x%016" PRIxPTR "", (uintptr_t)sampler);
// TODO: ReleaseSampler
// TODO: validate
return cl::ReleaseSampler(sampler);
}
......@@ -324,9 +342,11 @@ cl_int CL_API_CALL CL_GetSamplerInfo(cl_sampler sampler,
(uintptr_t)sampler, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetSamplerInfo
SamplerInfo param_namePacked = PackParam<SamplerInfo>(param_name);
// TODO: validate
return cl::GetSamplerInfo(sampler, param_name, param_value_size, param_value,
return cl::GetSamplerInfo(sampler, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -342,7 +362,7 @@ cl_program CL_API_CALL CL_CreateProgramWithSource(cl_context context,
(uintptr_t)context, count, (uintptr_t)strings, (uintptr_t)lengths,
(uintptr_t)errcode_ret);
// TODO: CreateProgramWithSource
// TODO: validate
return cl::CreateProgramWithSource(context, count, strings, lengths, errcode_ret);
}
......@@ -362,7 +382,7 @@ cl_program CL_API_CALL CL_CreateProgramWithBinary(cl_context context,
(uintptr_t)context, num_devices, (uintptr_t)device_list, (uintptr_t)lengths,
(uintptr_t)binaries, (uintptr_t)binary_status, (uintptr_t)errcode_ret);
// TODO: CreateProgramWithBinary
// TODO: validate
return cl::CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries,
binary_status, errcode_ret);
......@@ -372,7 +392,7 @@ cl_int CL_API_CALL CL_RetainProgram(cl_program program)
{
CL_EVENT(RetainProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
// TODO: RetainProgram
// TODO: validate
return cl::RetainProgram(program);
}
......@@ -381,7 +401,7 @@ cl_int CL_API_CALL CL_ReleaseProgram(cl_program program)
{
CL_EVENT(ReleaseProgram, "program = 0x%016" PRIxPTR "", (uintptr_t)program);
// TODO: ReleaseProgram
// TODO: validate
return cl::ReleaseProgram(program);
}
......@@ -401,7 +421,7 @@ cl_int CL_API_CALL CL_BuildProgram(cl_program program,
(uintptr_t)program, num_devices, (uintptr_t)device_list, (uintptr_t)options,
(uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: BuildProgram
// TODO: validate
return cl::BuildProgram(program, num_devices, device_list, options, pfn_notify, user_data);
}
......@@ -419,9 +439,11 @@ cl_int CL_API_CALL CL_GetProgramInfo(cl_program program,
(uintptr_t)program, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetProgramInfo
ProgramInfo param_namePacked = PackParam<ProgramInfo>(param_name);
return cl::GetProgramInfo(program, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetProgramInfo(program, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -439,9 +461,11 @@ cl_int CL_API_CALL CL_GetProgramBuildInfo(cl_program program,
(uintptr_t)program, (uintptr_t)device, param_name, param_value_size,
(uintptr_t)param_value, (uintptr_t)param_value_size_ret);
// TODO: GetProgramBuildInfo
ProgramBuildInfo param_namePacked = PackParam<ProgramBuildInfo>(param_name);
// TODO: validate
return cl::GetProgramBuildInfo(program, device, param_name, param_value_size, param_value,
return cl::GetProgramBuildInfo(program, device, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -454,7 +478,7 @@ cl_kernel CL_API_CALL CL_CreateKernel(cl_program program,
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)program, (uintptr_t)kernel_name, (uintptr_t)errcode_ret);
// TODO: CreateKernel
// TODO: validate
return cl::CreateKernel(program, kernel_name, errcode_ret);
}
......@@ -469,7 +493,7 @@ cl_int CL_API_CALL CL_CreateKernelsInProgram(cl_program program,
", num_kernels_ret = 0x%016" PRIxPTR "",
(uintptr_t)program, num_kernels, (uintptr_t)kernels, (uintptr_t)num_kernels_ret);
// TODO: CreateKernelsInProgram
// TODO: validate
return cl::CreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret);
}
......@@ -478,7 +502,7 @@ cl_int CL_API_CALL CL_RetainKernel(cl_kernel kernel)
{
CL_EVENT(RetainKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
// TODO: RetainKernel
// TODO: validate
return cl::RetainKernel(kernel);
}
......@@ -487,7 +511,7 @@ cl_int CL_API_CALL CL_ReleaseKernel(cl_kernel kernel)
{
CL_EVENT(ReleaseKernel, "kernel = 0x%016" PRIxPTR "", (uintptr_t)kernel);
// TODO: ReleaseKernel
// TODO: validate
return cl::ReleaseKernel(kernel);
}
......@@ -502,7 +526,7 @@ cl_int CL_API_CALL CL_SetKernelArg(cl_kernel kernel,
", arg_index = %u, arg_size = %zu, arg_value = 0x%016" PRIxPTR "",
(uintptr_t)kernel, arg_index, arg_size, (uintptr_t)arg_value);
// TODO: SetKernelArg
// TODO: validate
return cl::SetKernelArg(kernel, arg_index, arg_size, arg_value);
}
......@@ -520,9 +544,11 @@ cl_int CL_API_CALL CL_GetKernelInfo(cl_kernel kernel,
(uintptr_t)kernel, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetKernelInfo
KernelInfo param_namePacked = PackParam<KernelInfo>(param_name);
return cl::GetKernelInfo(kernel, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetKernelInfo(kernel, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -540,10 +566,12 @@ cl_int CL_API_CALL CL_GetKernelWorkGroupInfo(cl_kernel kernel,
(uintptr_t)kernel, (uintptr_t)device, param_name, param_value_size,
(uintptr_t)param_value, (uintptr_t)param_value_size_ret);
// TODO: GetKernelWorkGroupInfo
KernelWorkGroupInfo param_namePacked = PackParam<KernelWorkGroupInfo>(param_name);
// TODO: validate
return cl::GetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value,
param_value_size_ret);
return cl::GetKernelWorkGroupInfo(kernel, device, param_namePacked, param_value_size,
param_value, param_value_size_ret);
}
cl_int CL_API_CALL CL_WaitForEvents(cl_uint num_events, const cl_event *event_list)
......@@ -551,7 +579,7 @@ cl_int CL_API_CALL CL_WaitForEvents(cl_uint num_events, const cl_event *event_li
CL_EVENT(WaitForEvents, "num_events = %u, event_list = 0x%016" PRIxPTR "", num_events,
(uintptr_t)event_list);
// TODO: WaitForEvents
// TODO: validate
return cl::WaitForEvents(num_events, event_list);
}
......@@ -569,16 +597,19 @@ cl_int CL_API_CALL CL_GetEventInfo(cl_event event,
(uintptr_t)event, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetEventInfo
EventInfo param_namePacked = PackParam<EventInfo>(param_name);
// TODO: validate
return cl::GetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
return cl::GetEventInfo(event, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_RetainEvent(cl_event event)
{
CL_EVENT(RetainEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
// TODO: RetainEvent
// TODO: validate
return cl::RetainEvent(event);
}
......@@ -587,7 +618,7 @@ cl_int CL_API_CALL CL_ReleaseEvent(cl_event event)
{
CL_EVENT(ReleaseEvent, "event = 0x%016" PRIxPTR "", (uintptr_t)event);
// TODO: ReleaseEvent
// TODO: validate
return cl::ReleaseEvent(event);
}
......@@ -605,9 +636,11 @@ cl_int CL_API_CALL CL_GetEventProfilingInfo(cl_event event,
(uintptr_t)event, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetEventProfilingInfo
ProfilingInfo param_namePacked = PackParam<ProfilingInfo>(param_name);
return cl::GetEventProfilingInfo(event, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetEventProfilingInfo(event, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -615,7 +648,7 @@ cl_int CL_API_CALL CL_Flush(cl_command_queue command_queue)
{
CL_EVENT(Flush, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: Flush
// TODO: validate
return cl::Flush(command_queue);
}
......@@ -624,7 +657,7 @@ cl_int CL_API_CALL CL_Finish(cl_command_queue command_queue)
{
CL_EVENT(Finish, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: Finish
// TODO: validate
return cl::Finish(command_queue);
}
......@@ -647,7 +680,7 @@ cl_int CL_API_CALL CL_EnqueueReadBuffer(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)buffer, blocking_read, offset, size,
(uintptr_t)ptr, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadBuffer
// TODO: validate
return cl::EnqueueReadBuffer(command_queue, buffer, blocking_read, offset, size, ptr,
num_events_in_wait_list, event_wait_list, event);
......@@ -671,7 +704,7 @@ cl_int CL_API_CALL CL_EnqueueWriteBuffer(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)buffer, blocking_write, offset, size,
(uintptr_t)ptr, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteBuffer
// TODO: validate
return cl::EnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, size, ptr,
num_events_in_wait_list, event_wait_list, event);
......@@ -696,7 +729,7 @@ cl_int CL_API_CALL CL_EnqueueCopyBuffer(cl_command_queue command_queue,
dst_offset, size, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueCopyBuffer
// TODO: validate
return cl::EnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset,
size, num_events_in_wait_list, event_wait_list, event);
......@@ -724,7 +757,7 @@ cl_int CL_API_CALL CL_EnqueueReadImage(cl_command_queue command_queue,
(uintptr_t)region, row_pitch, slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadImage
// TODO: validate
return cl::EnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch,
slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
......@@ -752,7 +785,7 @@ cl_int CL_API_CALL CL_EnqueueWriteImage(cl_command_queue command_queue,
(uintptr_t)region, input_row_pitch, input_slice_pitch, (uintptr_t)ptr,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteImage
// TODO: validate
return cl::EnqueueWriteImage(command_queue, image, blocking_write, origin, region,
input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list,
......@@ -779,7 +812,7 @@ cl_int CL_API_CALL CL_EnqueueCopyImage(cl_command_queue command_queue,
(uintptr_t)src_origin, (uintptr_t)dst_origin, (uintptr_t)region,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyImage
// TODO: validate
return cl::EnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region,
num_events_in_wait_list, event_wait_list, event);
......@@ -805,7 +838,7 @@ cl_int CL_API_CALL CL_EnqueueCopyImageToBuffer(cl_command_queue command_queue,
(uintptr_t)src_origin, (uintptr_t)region, dst_offset, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyImageToBuffer
// TODO: validate
return cl::EnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region,
dst_offset, num_events_in_wait_list, event_wait_list,
......@@ -832,7 +865,7 @@ cl_int CL_API_CALL CL_EnqueueCopyBufferToImage(cl_command_queue command_queue,
(uintptr_t)dst_origin, (uintptr_t)region, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyBufferToImage
// TODO: validate
return cl::EnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset,
dst_origin, region, num_events_in_wait_list,
......@@ -859,7 +892,7 @@ void *CL_API_CALL CL_EnqueueMapBuffer(cl_command_queue command_queue,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event,
(uintptr_t)errcode_ret);
// TODO: EnqueueMapBuffer
// TODO: validate
return cl::EnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, size,
num_events_in_wait_list, event_wait_list, event, errcode_ret);
......@@ -890,7 +923,7 @@ void *CL_API_CALL CL_EnqueueMapImage(cl_command_queue command_queue,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event,
(uintptr_t)errcode_ret);
// TODO: EnqueueMapImage
// TODO: validate
return cl::EnqueueMapImage(command_queue, image, blocking_map, map_flags, origin, region,
image_row_pitch, image_slice_pitch, num_events_in_wait_list,
......@@ -912,7 +945,7 @@ cl_int CL_API_CALL CL_EnqueueUnmapMemObject(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)memobj, (uintptr_t)mapped_ptr,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueUnmapMemObject
// TODO: validate
return cl::EnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list,
event_wait_list, event);
......@@ -938,7 +971,7 @@ cl_int CL_API_CALL CL_EnqueueNDRangeKernel(cl_command_queue command_queue,
(uintptr_t)global_work_size, (uintptr_t)local_work_size, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueNDRangeKernel
// TODO: validate
return cl::EnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset,
global_work_size, local_work_size, num_events_in_wait_list,
......@@ -967,7 +1000,7 @@ cl_int CL_API_CALL CL_EnqueueNativeKernel(cl_command_queue command_queue,
num_mem_objects, (uintptr_t)mem_list, (uintptr_t)args_mem_loc, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueNativeKernel
// TODO: validate
return cl::EnqueueNativeKernel(command_queue, user_func, args, cb_args, num_mem_objects,
mem_list, args_mem_loc, num_events_in_wait_list, event_wait_list,
......@@ -984,7 +1017,7 @@ cl_int CL_API_CALL CL_SetCommandQueueProperty(cl_command_queue command_queue,
", properties = %lu, enable = %u, old_properties = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, properties, enable, (uintptr_t)old_properties);
// TODO: SetCommandQueueProperty
// TODO: validate
return cl::SetCommandQueueProperty(command_queue, properties, enable, old_properties);
}
......@@ -1006,7 +1039,7 @@ cl_mem CL_API_CALL CL_CreateImage2D(cl_context context,
(uintptr_t)context, flags, (uintptr_t)image_format, image_width, image_height,
image_row_pitch, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage2D
// TODO: validate
return cl::CreateImage2D(context, flags, image_format, image_width, image_height,
image_row_pitch, host_ptr, errcode_ret);
......@@ -1031,7 +1064,7 @@ cl_mem CL_API_CALL CL_CreateImage3D(cl_context context,
(uintptr_t)context, flags, (uintptr_t)image_format, image_width, image_height, image_depth,
image_row_pitch, image_slice_pitch, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage3D
// TODO: validate
return cl::CreateImage3D(context, flags, image_format, image_width, image_height, image_depth,
image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
......@@ -1042,7 +1075,7 @@ cl_int CL_API_CALL CL_EnqueueMarker(cl_command_queue command_queue, cl_event *ev
CL_EVENT(EnqueueMarker, "command_queue = 0x%016" PRIxPTR ", event = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, (uintptr_t)event);
// TODO: EnqueueMarker
// TODO: validate
return cl::EnqueueMarker(command_queue, event);
}
......@@ -1055,7 +1088,7 @@ cl_int CL_API_CALL CL_EnqueueWaitForEvents(cl_command_queue command_queue,
"command_queue = 0x%016" PRIxPTR ", num_events = %u, event_list = 0x%016" PRIxPTR "",
(uintptr_t)command_queue, num_events, (uintptr_t)event_list);
// TODO: EnqueueWaitForEvents
// TODO: validate
return cl::EnqueueWaitForEvents(command_queue, num_events, event_list);
}
......@@ -1064,7 +1097,7 @@ cl_int CL_API_CALL CL_EnqueueBarrier(cl_command_queue command_queue)
{
CL_EVENT(EnqueueBarrier, "command_queue = 0x%016" PRIxPTR "", (uintptr_t)command_queue);
// TODO: EnqueueBarrier
// TODO: validate
return cl::EnqueueBarrier(command_queue);
}
......@@ -1073,7 +1106,7 @@ cl_int CL_API_CALL CL_UnloadCompiler()
{
CL_EVENT(UnloadCompiler, "");
// TODO: UnloadCompiler
// TODO: validate
return cl::UnloadCompiler();
}
......@@ -1082,7 +1115,7 @@ void *CL_API_CALL CL_GetExtensionFunctionAddress(const char *func_name)
{
CL_EVENT(GetExtensionFunctionAddress, "func_name = 0x%016" PRIxPTR "", (uintptr_t)func_name);
// TODO: GetExtensionFunctionAddress
// TODO: validate
return cl::GetExtensionFunctionAddress(func_name);
}
......@@ -1097,7 +1130,7 @@ cl_command_queue CL_API_CALL CL_CreateCommandQueue(cl_context context,
", properties = %lu, errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)device, properties, (uintptr_t)errcode_ret);
// TODO: CreateCommandQueue
// TODO: validate
return cl::CreateCommandQueue(context, device, properties, errcode_ret);
}
......@@ -1115,9 +1148,13 @@ cl_sampler CL_API_CALL CL_CreateSampler(cl_context context,
(uintptr_t)context, normalized_coords, addressing_mode, filter_mode,
(uintptr_t)errcode_ret);
// TODO: CreateSampler
AddressingMode addressing_modePacked = PackParam<AddressingMode>(addressing_mode);
FilterMode filter_modePacked = PackParam<FilterMode>(filter_mode);
// TODO: validate
return cl::CreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
return cl::CreateSampler(context, normalized_coords, addressing_modePacked, filter_modePacked,
errcode_ret);
}
cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
......@@ -1133,7 +1170,7 @@ cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)kernel, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueTask
// TODO: validate
return cl::EnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
}
......@@ -1152,7 +1189,7 @@ cl_mem CL_API_CALL CL_CreateSubBuffer(cl_mem buffer,
(uintptr_t)buffer, flags, buffer_create_type, (uintptr_t)buffer_create_info,
(uintptr_t)errcode_ret);
// TODO: CreateSubBuffer
// TODO: validate
return cl::CreateSubBuffer(buffer, flags, buffer_create_type, buffer_create_info, errcode_ret);
}
......@@ -1167,7 +1204,7 @@ cl_int CL_API_CALL CL_SetMemObjectDestructorCallback(cl_mem memobj,
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)memobj, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetMemObjectDestructorCallback
// TODO: validate
return cl::SetMemObjectDestructorCallback(memobj, pfn_notify, user_data);
}
......@@ -1177,7 +1214,7 @@ cl_event CL_API_CALL CL_CreateUserEvent(cl_context context, cl_int *errcode_ret)
CL_EVENT(CreateUserEvent, "context = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)errcode_ret);
// TODO: CreateUserEvent
// TODO: validate
return cl::CreateUserEvent(context, errcode_ret);
}
......@@ -1187,7 +1224,7 @@ cl_int CL_API_CALL CL_SetUserEventStatus(cl_event event, cl_int execution_status
CL_EVENT(SetUserEventStatus, "event = 0x%016" PRIxPTR ", execution_status = %d",
(uintptr_t)event, execution_status);
// TODO: SetUserEventStatus
// TODO: validate
return cl::SetUserEventStatus(event, execution_status);
}
......@@ -1205,7 +1242,7 @@ cl_int CL_API_CALL CL_SetEventCallback(cl_event event,
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)event, command_exec_callback_type, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetEventCallback
// TODO: validate
return cl::SetEventCallback(event, command_exec_callback_type, pfn_notify, user_data);
}
......@@ -1238,7 +1275,7 @@ cl_int CL_API_CALL CL_EnqueueReadBufferRect(cl_command_queue command_queue,
host_row_pitch, host_slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueReadBufferRect
// TODO: validate
return cl::EnqueueReadBufferRect(command_queue, buffer, blocking_read, buffer_origin,
host_origin, region, buffer_row_pitch, buffer_slice_pitch,
......@@ -1274,7 +1311,7 @@ cl_int CL_API_CALL CL_EnqueueWriteBufferRect(cl_command_queue command_queue,
host_row_pitch, host_slice_pitch, (uintptr_t)ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueWriteBufferRect
// TODO: validate
return cl::EnqueueWriteBufferRect(command_queue, buffer, blocking_write, buffer_origin,
host_origin, region, buffer_row_pitch, buffer_slice_pitch,
......@@ -1308,7 +1345,7 @@ cl_int CL_API_CALL CL_EnqueueCopyBufferRect(cl_command_queue command_queue,
src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueCopyBufferRect
// TODO: validate
return cl::EnqueueCopyBufferRect(command_queue, src_buffer, dst_buffer, src_origin, dst_origin,
region, src_row_pitch, src_slice_pitch, dst_row_pitch,
......@@ -1330,7 +1367,7 @@ cl_int CL_API_CALL CL_CreateSubDevices(cl_device_id in_device,
(uintptr_t)in_device, (uintptr_t)properties, num_devices, (uintptr_t)out_devices,
(uintptr_t)num_devices_ret);
// TODO: CreateSubDevices
// TODO: validate
return cl::CreateSubDevices(in_device, properties, num_devices, out_devices, num_devices_ret);
}
......@@ -1339,7 +1376,7 @@ cl_int CL_API_CALL CL_RetainDevice(cl_device_id device)
{
CL_EVENT(RetainDevice, "device = 0x%016" PRIxPTR "", (uintptr_t)device);
// TODO: RetainDevice
// TODO: validate
return cl::RetainDevice(device);
}
......@@ -1348,7 +1385,7 @@ cl_int CL_API_CALL CL_ReleaseDevice(cl_device_id device)
{
CL_EVENT(ReleaseDevice, "device = 0x%016" PRIxPTR "", (uintptr_t)device);
// TODO: ReleaseDevice
// TODO: validate
return cl::ReleaseDevice(device);
}
......@@ -1367,7 +1404,7 @@ cl_mem CL_API_CALL CL_CreateImage(cl_context context,
(uintptr_t)context, flags, (uintptr_t)image_format, (uintptr_t)image_desc,
(uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImage
// TODO: validate
return cl::CreateImage(context, flags, image_format, image_desc, host_ptr, errcode_ret);
}
......@@ -1384,7 +1421,7 @@ cl_program CL_API_CALL CL_CreateProgramWithBuiltInKernels(cl_context context,
(uintptr_t)context, num_devices, (uintptr_t)device_list, (uintptr_t)kernel_names,
(uintptr_t)errcode_ret);
// TODO: CreateProgramWithBuiltInKernels
// TODO: validate
return cl::CreateProgramWithBuiltInKernels(context, num_devices, device_list, kernel_names,
errcode_ret);
......@@ -1410,7 +1447,7 @@ cl_int CL_API_CALL CL_CompileProgram(cl_program program,
num_input_headers, (uintptr_t)input_headers, (uintptr_t)header_include_names,
(uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: CompileProgram
// TODO: validate
return cl::CompileProgram(program, num_devices, device_list, options, num_input_headers,
input_headers, header_include_names, pfn_notify, user_data);
......@@ -1437,7 +1474,7 @@ cl_program CL_API_CALL CL_LinkProgram(cl_context context,
num_input_programs, (uintptr_t)input_programs, (uintptr_t)pfn_notify,
(uintptr_t)user_data, (uintptr_t)errcode_ret);
// TODO: LinkProgram
// TODO: validate
return cl::LinkProgram(context, num_devices, device_list, options, num_input_programs,
input_programs, pfn_notify, user_data, errcode_ret);
......@@ -1447,7 +1484,7 @@ cl_int CL_API_CALL CL_UnloadPlatformCompiler(cl_platform_id platform)
{
CL_EVENT(UnloadPlatformCompiler, "platform = 0x%016" PRIxPTR "", (uintptr_t)platform);
// TODO: UnloadPlatformCompiler
// TODO: validate
return cl::UnloadPlatformCompiler(platform);
}
......@@ -1467,9 +1504,11 @@ cl_int CL_API_CALL CL_GetKernelArgInfo(cl_kernel kernel,
(uintptr_t)kernel, arg_index, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetKernelArgInfo
KernelArgInfo param_namePacked = PackParam<KernelArgInfo>(param_name);
return cl::GetKernelArgInfo(kernel, arg_index, param_name, param_value_size, param_value,
// TODO: validate
return cl::GetKernelArgInfo(kernel, arg_index, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
......@@ -1491,7 +1530,7 @@ cl_int CL_API_CALL CL_EnqueueFillBuffer(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)buffer, (uintptr_t)pattern, pattern_size, offset,
size, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueFillBuffer
// TODO: validate
return cl::EnqueueFillBuffer(command_queue, buffer, pattern, pattern_size, offset, size,
num_events_in_wait_list, event_wait_list, event);
......@@ -1515,7 +1554,7 @@ cl_int CL_API_CALL CL_EnqueueFillImage(cl_command_queue command_queue,
(uintptr_t)region, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueFillImage
// TODO: validate
return cl::EnqueueFillImage(command_queue, image, fill_color, origin, region,
num_events_in_wait_list, event_wait_list, event);
......@@ -1536,7 +1575,7 @@ cl_int CL_API_CALL CL_EnqueueMigrateMemObjects(cl_command_queue command_queue,
(uintptr_t)command_queue, num_mem_objects, (uintptr_t)mem_objects, flags,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueMigrateMemObjects
// TODO: validate
return cl::EnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects, flags,
num_events_in_wait_list, event_wait_list, event);
......@@ -1554,7 +1593,7 @@ cl_int CL_API_CALL CL_EnqueueMarkerWithWaitList(cl_command_queue command_queue,
(uintptr_t)command_queue, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueMarkerWithWaitList
// TODO: validate
return cl::EnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list, event_wait_list,
event);
......@@ -1572,7 +1611,7 @@ cl_int CL_API_CALL CL_EnqueueBarrierWithWaitList(cl_command_queue command_queue,
(uintptr_t)command_queue, num_events_in_wait_list, (uintptr_t)event_wait_list,
(uintptr_t)event);
// TODO: EnqueueBarrierWithWaitList
// TODO: validate
return cl::EnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list, event_wait_list,
event);
......@@ -1585,7 +1624,7 @@ void *CL_API_CALL CL_GetExtensionFunctionAddressForPlatform(cl_platform_id platf
"platform = 0x%016" PRIxPTR ", func_name = 0x%016" PRIxPTR "", (uintptr_t)platform,
(uintptr_t)func_name);
// TODO: GetExtensionFunctionAddressForPlatform
// TODO: validate
return cl::GetExtensionFunctionAddressForPlatform(platform, func_name);
}
......@@ -1602,7 +1641,7 @@ CL_CreateCommandQueueWithProperties(cl_context context,
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)device, (uintptr_t)properties, (uintptr_t)errcode_ret);
// TODO: CreateCommandQueueWithProperties
// TODO: validate
return cl::CreateCommandQueueWithProperties(context, device, properties, errcode_ret);
}
......@@ -1622,7 +1661,7 @@ cl_mem CL_API_CALL CL_CreatePipe(cl_context context,
(uintptr_t)context, flags, pipe_packet_size, pipe_max_packets, (uintptr_t)properties,
(uintptr_t)errcode_ret);
// TODO: CreatePipe
// TODO: validate
return cl::CreatePipe(context, flags, pipe_packet_size, pipe_max_packets, properties,
errcode_ret);
......@@ -1641,9 +1680,12 @@ cl_int CL_API_CALL CL_GetPipeInfo(cl_mem pipe,
(uintptr_t)pipe, param_name, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetPipeInfo
PipeInfo param_namePacked = PackParam<PipeInfo>(param_name);
// TODO: validate
return cl::GetPipeInfo(pipe, param_name, param_value_size, param_value, param_value_size_ret);
return cl::GetPipeInfo(pipe, param_namePacked, param_value_size, param_value,
param_value_size_ret);
}
void *CL_API_CALL CL_SVMAlloc(cl_context context,
......@@ -1654,7 +1696,7 @@ void *CL_API_CALL CL_SVMAlloc(cl_context context,
CL_EVENT(SVMAlloc, "context = 0x%016" PRIxPTR ", flags = %lu, size = %zu, alignment = %u",
(uintptr_t)context, flags, size, alignment);
// TODO: SVMAlloc
// TODO: validate
return cl::SVMAlloc(context, flags, size, alignment);
}
......@@ -1664,7 +1706,7 @@ void CL_API_CALL CL_SVMFree(cl_context context, void *svm_pointer)
CL_EVENT(SVMFree, "context = 0x%016" PRIxPTR ", svm_pointer = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)svm_pointer);
// TODO: SVMFree
// TODO: validate
cl::SVMFree(context, svm_pointer);
}
......@@ -1679,7 +1721,7 @@ CL_CreateSamplerWithProperties(cl_context context,
", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)sampler_properties, (uintptr_t)errcode_ret);
// TODO: CreateSamplerWithProperties
// TODO: validate
return cl::CreateSamplerWithProperties(context, sampler_properties, errcode_ret);
}
......@@ -1692,7 +1734,7 @@ cl_int CL_API_CALL CL_SetKernelArgSVMPointer(cl_kernel kernel,
"kernel = 0x%016" PRIxPTR ", arg_index = %u, arg_value = 0x%016" PRIxPTR "",
(uintptr_t)kernel, arg_index, (uintptr_t)arg_value);
// TODO: SetKernelArgSVMPointer
// TODO: validate
return cl::SetKernelArgSVMPointer(kernel, arg_index, arg_value);
}
......@@ -1707,9 +1749,11 @@ cl_int CL_API_CALL CL_SetKernelExecInfo(cl_kernel kernel,
", param_name = %u, param_value_size = %zu, param_value = 0x%016" PRIxPTR "",
(uintptr_t)kernel, param_name, param_value_size, (uintptr_t)param_value);
// TODO: SetKernelExecInfo
KernelExecInfo param_namePacked = PackParam<KernelExecInfo>(param_name);
// TODO: validate
return cl::SetKernelExecInfo(kernel, param_name, param_value_size, param_value);
return cl::SetKernelExecInfo(kernel, param_namePacked, param_value_size, param_value);
}
cl_int CL_API_CALL CL_EnqueueSVMFree(cl_command_queue command_queue,
......@@ -1734,7 +1778,7 @@ cl_int CL_API_CALL CL_EnqueueSVMFree(cl_command_queue command_queue,
(uintptr_t)pfn_free_func, (uintptr_t)user_data, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMFree
// TODO: validate
return cl::EnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func,
user_data, num_events_in_wait_list, event_wait_list, event);
......@@ -1757,7 +1801,7 @@ cl_int CL_API_CALL CL_EnqueueSVMMemcpy(cl_command_queue command_queue,
(uintptr_t)command_queue, blocking_copy, (uintptr_t)dst_ptr, (uintptr_t)src_ptr, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMemcpy
// TODO: validate
return cl::EnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr, size,
num_events_in_wait_list, event_wait_list, event);
......@@ -1780,7 +1824,7 @@ cl_int CL_API_CALL CL_EnqueueSVMMemFill(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)svm_ptr, (uintptr_t)pattern, pattern_size, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMemFill
// TODO: validate
return cl::EnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size, size,
num_events_in_wait_list, event_wait_list, event);
......@@ -1803,7 +1847,7 @@ cl_int CL_API_CALL CL_EnqueueSVMMap(cl_command_queue command_queue,
(uintptr_t)command_queue, blocking_map, flags, (uintptr_t)svm_ptr, size,
num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMap
// TODO: validate
return cl::EnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size,
num_events_in_wait_list, event_wait_list, event);
......@@ -1822,7 +1866,7 @@ cl_int CL_API_CALL CL_EnqueueSVMUnmap(cl_command_queue command_queue,
(uintptr_t)command_queue, (uintptr_t)svm_ptr, num_events_in_wait_list,
(uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMUnmap
// TODO: validate
return cl::EnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list,
event);
......@@ -1838,7 +1882,7 @@ cl_int CL_API_CALL CL_SetDefaultDeviceCommandQueue(cl_context context,
", command_queue = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)device, (uintptr_t)command_queue);
// TODO: SetDefaultDeviceCommandQueue
// TODO: validate
return cl::SetDefaultDeviceCommandQueue(context, device, command_queue);
}
......@@ -1852,7 +1896,7 @@ cl_int CL_API_CALL CL_GetDeviceAndHostTimer(cl_device_id device,
", host_timestamp = 0x%016" PRIxPTR "",
(uintptr_t)device, (uintptr_t)device_timestamp, (uintptr_t)host_timestamp);
// TODO: GetDeviceAndHostTimer
// TODO: validate
return cl::GetDeviceAndHostTimer(device, device_timestamp, host_timestamp);
}
......@@ -1862,7 +1906,7 @@ cl_int CL_API_CALL CL_GetHostTimer(cl_device_id device, cl_ulong *host_timestamp
CL_EVENT(GetHostTimer, "device = 0x%016" PRIxPTR ", host_timestamp = 0x%016" PRIxPTR "",
(uintptr_t)device, (uintptr_t)host_timestamp);
// TODO: GetHostTimer
// TODO: validate
return cl::GetHostTimer(device, host_timestamp);
}
......@@ -1877,7 +1921,7 @@ cl_program CL_API_CALL CL_CreateProgramWithIL(cl_context context,
", length = %zu, errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)il, length, (uintptr_t)errcode_ret);
// TODO: CreateProgramWithIL
// TODO: validate
return cl::CreateProgramWithIL(context, il, length, errcode_ret);
}
......@@ -1887,7 +1931,7 @@ cl_kernel CL_API_CALL CL_CloneKernel(cl_kernel source_kernel, cl_int *errcode_re
CL_EVENT(CloneKernel, "source_kernel = 0x%016" PRIxPTR ", errcode_ret = 0x%016" PRIxPTR "",
(uintptr_t)source_kernel, (uintptr_t)errcode_ret);
// TODO: CloneKernel
// TODO: validate
return cl::CloneKernel(source_kernel, errcode_ret);
}
......@@ -1910,10 +1954,13 @@ cl_int CL_API_CALL CL_GetKernelSubGroupInfo(cl_kernel kernel,
(uintptr_t)input_value, param_value_size, (uintptr_t)param_value,
(uintptr_t)param_value_size_ret);
// TODO: GetKernelSubGroupInfo
KernelSubGroupInfo param_namePacked = PackParam<KernelSubGroupInfo>(param_name);
return cl::GetKernelSubGroupInfo(kernel, device, param_name, input_value_size, input_value,
param_value_size, param_value, param_value_size_ret);
// TODO: validate
return cl::GetKernelSubGroupInfo(kernel, device, param_namePacked, input_value_size,
input_value, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
......@@ -1933,7 +1980,7 @@ cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
(uintptr_t)command_queue, num_svm_pointers, (uintptr_t)svm_pointers, (uintptr_t)sizes,
flags, num_events_in_wait_list, (uintptr_t)event_wait_list, (uintptr_t)event);
// TODO: EnqueueSVMMigrateMem
// TODO: validate
return cl::EnqueueSVMMigrateMem(command_queue, num_svm_pointers, svm_pointers, sizes, flags,
num_events_in_wait_list, event_wait_list, event);
......@@ -1950,7 +1997,7 @@ cl_int CL_API_CALL CL_SetProgramReleaseCallback(cl_program program,
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)program, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetProgramReleaseCallback
// TODO: validate
return cl::SetProgramReleaseCallback(program, pfn_notify, user_data);
}
......@@ -1965,7 +2012,7 @@ cl_int CL_API_CALL CL_SetProgramSpecializationConstant(cl_program program,
", spec_id = %u, spec_size = %zu, spec_value = 0x%016" PRIxPTR "",
(uintptr_t)program, spec_id, spec_size, (uintptr_t)spec_value);
// TODO: SetProgramSpecializationConstant
// TODO: validate
return cl::SetProgramSpecializationConstant(program, spec_id, spec_size, spec_value);
}
......@@ -1981,7 +2028,7 @@ cl_int CL_API_CALL CL_SetContextDestructorCallback(cl_context context,
", user_data = 0x%016" PRIxPTR "",
(uintptr_t)context, (uintptr_t)pfn_notify, (uintptr_t)user_data);
// TODO: SetContextDestructorCallback
// TODO: validate
return cl::SetContextDestructorCallback(context, pfn_notify, user_data);
}
......@@ -2000,7 +2047,7 @@ cl_mem CL_API_CALL CL_CreateBufferWithProperties(cl_context context,
(uintptr_t)context, (uintptr_t)properties, flags, size, (uintptr_t)host_ptr,
(uintptr_t)errcode_ret);
// TODO: CreateBufferWithProperties
// TODO: validate
return cl::CreateBufferWithProperties(context, properties, flags, size, host_ptr, errcode_ret);
}
......@@ -2020,7 +2067,7 @@ cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
(uintptr_t)context, (uintptr_t)properties, flags, (uintptr_t)image_format,
(uintptr_t)image_desc, (uintptr_t)host_ptr, (uintptr_t)errcode_ret);
// TODO: CreateImageWithProperties
// TODO: validate
return cl::CreateImageWithProperties(context, properties, flags, image_format, image_desc,
host_ptr, errcode_ret);
......
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// validationCL.h: Validation functions for generic CL entry point parameters
#ifndef LIBGLESV2_VALIDATIONCL_H_
#define LIBGLESV2_VALIDATIONCL_H_
#include "common/PackedCLEnums_autogen.h"
#include <type_traits>
namespace cl
{
// First case: handling packed enums.
template <typename PackedT, typename FromT>
typename std::enable_if<std::is_enum<PackedT>::value, PackedT>::type PackParam(FromT from)
{
return FromCLenum<PackedT>(from);
}
template <typename PackedT, typename FromT>
inline typename std::enable_if<!std::is_enum<PackedT>::value,
typename std::remove_reference<PackedT>::type>::type
PackParam(FromT from)
{
return static_cast<PackedT>(from);
}
} // namespace cl
#endif // LIBGLESV2_VALIDATIONCL_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment