      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251

    //! FFI bindings for OpenCL.
    //!
    //! For low level API access with Rust's safety and convenience, use the
    //! extremely lightweight functions and types in the [ocl-core] crate.
    //!
    //! See [ocl-core] for usage examples.
    //!
    //! [ocl-core]: https://github.com/cogciprocate/ocl-core

    pub extern crate libc;

    mod platform_h;
    mod glcorearb_h;
    mod cl_gl_h;
    mod cl_egl_h;
    mod cl_gl_ext_h;
    mod cl_dx9_media_sharing_h;
    mod cl_d3d10_h;
    mod cl_d3d11_h;
    mod cl_h;

    pub use libc::{c_void, size_t, c_char, c_double, c_float, c_int, c_longlong, c_short, c_uchar,
        c_uint, c_ulonglong, c_ushort};

    pub use self::platform_h::{cl_GLuint, cl_GLint, cl_GLenum};

    pub use self::glcorearb_h::{GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_BUFFER,
        GL_TEXTURE_2D, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
        GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, GL_TEXTURE_RECTANGLE};

    pub use self::cl_gl_h::{cl_gl_object_type, cl_gl_texture_info,
        cl_gl_platform_info, cl_gl_context_info};

    pub use self::cl_gl_h::{CL_GL_OBJECT_BUFFER, CL_GL_OBJECT_TEXTURE2D, CL_GL_OBJECT_TEXTURE3D,
        CL_GL_OBJECT_RENDERBUFFER, CL_GL_OBJECT_TEXTURE2D_ARRAY, CL_GL_OBJECT_TEXTURE1D,
        CL_GL_OBJECT_TEXTURE1D_ARRAY, CL_GL_OBJECT_TEXTURE_BUFFER, CL_GL_TEXTURE_TARGET,
        CL_GL_MIPMAP_LEVEL, CL_GL_NUM_SAMPLES, CL_KHR_GL_SHARING, CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR,
        CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR, CL_DEVICES_FOR_GL_CONTEXT_KHR, CL_GL_CONTEXT_KHR,
        CL_EGL_DISPLAY_KHR, CL_GLX_DISPLAY_KHR, CL_WGL_HDC_KHR, CL_CGL_SHAREGROUP_KHR};

    #[cfg(not(feature = "opencl_vendor_mesa"))]
    pub use self::cl_gl_h::{clGetGLContextInfoKHR_fn, clCreateFromGLBuffer, clCreateFromGLTexture,
        clGetGLObjectInfo, clGetGLTextureInfo, clCreateFromGLRenderbuffer,
        clEnqueueAcquireGLObjects, clEnqueueReleaseGLObjects, clCreateFromGLTexture2D,
        clCreateFromGLTexture3D, clGetGLContextInfoKHR};

    pub use self::cl_egl_h::{CLeglImageKHR, CLeglDisplayKHR, CLeglSyncKHR, cl_egl_image_properties_khr};

    pub use self::cl_gl_ext_h::{CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE};

    pub use self::cl_d3d10_h::{CL_CONTEXT_D3D10_DEVICE_KHR, cl_d3d10_device_source_khr,
        cl_d3d10_device_set_khr};

    pub use self::cl_dx9_media_sharing_h::{CL_CONTEXT_ADAPTER_D3D9_KHR, CL_CONTEXT_ADAPTER_D3D9EX_KHR,
        CL_CONTEXT_ADAPTER_DXVA_KHR};

    pub use self::cl_d3d11_h::CL_CONTEXT_D3D11_DEVICE_KHR;

    // Types:
    pub use self::cl_h::{cl_platform_id, cl_device_id, cl_context, cl_command_queue, cl_mem,
        cl_program, cl_kernel, cl_event, cl_sampler, cl_char, cl_uchar, cl_short, cl_ushort, cl_int,
        cl_uint, cl_long, cl_ulong, cl_half, cl_float, cl_double, cl_bool, cl_bitfield, cl_device_type,
        cl_platform_info, cl_device_info, cl_device_fp_config, cl_device_mem_cache_type,
        cl_device_local_mem_type, cl_device_exec_capabilities, cl_device_svm_capabilities,
        cl_command_queue_properties, cl_device_partition_property, cl_device_affinity_domain,
        cl_context_properties, cl_context_info, cl_queue_properties, cl_command_queue_info,
        cl_channel_order, cl_channel_type, cl_mem_flags, cl_svm_mem_flags, cl_mem_object_type,
        cl_mem_info, cl_mem_migration_flags, cl_image_info, cl_buffer_create_type, cl_addressing_mode,
        cl_filter_mode, cl_sampler_info, cl_map_flags, cl_pipe_properties, cl_pipe_info,
        cl_program_info, cl_program_build_info, cl_program_binary_type, cl_build_status,
        cl_kernel_info, cl_kernel_arg_info, cl_kernel_arg_address_qualifier,
        cl_kernel_arg_access_qualifier, cl_kernel_arg_type_qualifier, cl_kernel_work_group_info,
        cl_kernel_sub_group_info, cl_event_info, cl_command_type, cl_profiling_info,
        cl_sampler_properties, cl_kernel_exec_info};

    // Structs:
    pub use self::cl_h::{cl_image_format, cl_image_desc, cl_buffer_region};

    // Consts:
    pub use self::cl_h::{CL_SUCCESS, CL_DEVICE_NOT_FOUND, CL_DEVICE_NOT_AVAILABLE,
        CL_COMPILER_NOT_AVAILABLE, CL_MEM_OBJECT_ALLOCATION_FAILURE, CL_OUT_OF_RESOURCES,
        CL_OUT_OF_HOST_MEMORY, CL_PROFILING_INFO_NOT_AVAILABLE, CL_MEM_COPY_OVERLAP,
        CL_IMAGE_FORMAT_MISMATCH, CL_IMAGE_FORMAT_NOT_SUPPORTED, CL_BUILD_PROGRAM_FAILURE,
        CL_MAP_FAILURE, CL_MISALIGNED_SUB_BUFFER_OFFSET, CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST,
        CL_COMPILE_PROGRAM_FAILURE, CL_LINKER_NOT_AVAILABLE, CL_LINK_PROGRAM_FAILURE,
        CL_DEVICE_PARTITION_FAILED, CL_KERNEL_ARG_INFO_NOT_AVAILABLE, CL_INVALID_VALUE,
        CL_INVALID_DEVICE_TYPE, CL_INVALID_PLATFORM, CL_INVALID_DEVICE, CL_INVALID_CONTEXT,
        CL_INVALID_QUEUE_PROPERTIES, CL_INVALID_COMMAND_QUEUE, CL_INVALID_HOST_PTR,
        CL_INVALID_MEM_OBJECT, CL_INVALID_IMAGE_FORMAT_DESCRIPTOR, CL_INVALID_IMAGE_SIZE,
        CL_INVALID_SAMPLER, CL_INVALID_BINARY, CL_INVALID_BUILD_OPTIONS, CL_INVALID_PROGRAM,
        CL_INVALID_PROGRAM_EXECUTABLE, CL_INVALID_KERNEL_NAME, CL_INVALID_KERNEL_DEFINITION,
        CL_INVALID_KERNEL, CL_INVALID_ARG_INDEX, CL_INVALID_ARG_VALUE, CL_INVALID_ARG_SIZE,
        CL_INVALID_KERNEL_ARGS, CL_INVALID_WORK_DIMENSION, CL_INVALID_WORK_GROUP_SIZE,
        CL_INVALID_WORK_ITEM_SIZE, CL_INVALID_GLOBAL_OFFSET, CL_INVALID_EVENT_WAIT_LIST,
        CL_INVALID_EVENT, CL_INVALID_OPERATION, CL_INVALID_GL_OBJECT, CL_INVALID_BUFFER_SIZE,
        CL_INVALID_MIP_LEVEL, CL_INVALID_GLOBAL_WORK_SIZE, CL_INVALID_PROPERTY,
        CL_INVALID_IMAGE_DESCRIPTOR, CL_INVALID_COMPILER_OPTIONS, CL_INVALID_LINKER_OPTIONS,
        CL_INVALID_DEVICE_PARTITION_COUNT, CL_INVALID_PIPE_SIZE, CL_INVALID_DEVICE_QUEUE,
        CL_PLATFORM_NOT_FOUND_KHR,};

    pub use self::cl_h::{CL_VERSION_1_0, CL_VERSION_1_1, CL_VERSION_1_2, CL_VERSION_2_0,
        CL_VERSION_2_1, CL_FALSE, CL_TRUE, CL_BLOCKING, CL_NON_BLOCKING, CL_PLATFORM_PROFILE,
        CL_PLATFORM_VERSION, CL_PLATFORM_NAME, CL_PLATFORM_VENDOR, CL_PLATFORM_EXTENSIONS,
        CL_PLATFORM_HOST_TIMER_RESOLUTION, CL_DEVICE_TYPE_DEFAULT, CL_DEVICE_TYPE_CPU,
        CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR, CL_DEVICE_TYPE_CUSTOM, CL_DEVICE_TYPE_ALL,
        CL_DEVICE_TYPE, CL_DEVICE_VENDOR_ID, CL_DEVICE_MAX_COMPUTE_UNITS,
        CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, CL_DEVICE_MAX_WORK_GROUP_SIZE,
        CL_DEVICE_MAX_WORK_ITEM_SIZES, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR,
        CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT,
        CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT,
        CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, CL_DEVICE_MAX_CLOCK_FREQUENCY, CL_DEVICE_ADDRESS_BITS,
        CL_DEVICE_MAX_READ_IMAGE_ARGS, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, CL_DEVICE_MAX_MEM_ALLOC_SIZE,
        CL_DEVICE_IMAGE2D_MAX_WIDTH, CL_DEVICE_IMAGE2D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_WIDTH,
        CL_DEVICE_IMAGE3D_MAX_HEIGHT, CL_DEVICE_IMAGE3D_MAX_DEPTH, CL_DEVICE_IMAGE_SUPPORT,
        CL_DEVICE_MAX_PARAMETER_SIZE, CL_DEVICE_MAX_SAMPLERS, CL_DEVICE_MEM_BASE_ADDR_ALIGN,
        CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, CL_DEVICE_SINGLE_FP_CONFIG,
        CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE,
        CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, CL_DEVICE_GLOBAL_MEM_SIZE, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE,
        CL_DEVICE_MAX_CONSTANT_ARGS, CL_DEVICE_LOCAL_MEM_TYPE, CL_DEVICE_LOCAL_MEM_SIZE,
        CL_DEVICE_ERROR_CORRECTION_SUPPORT, CL_DEVICE_PROFILING_TIMER_RESOLUTION,
        CL_DEVICE_ENDIAN_LITTLE, CL_DEVICE_AVAILABLE, CL_DEVICE_COMPILER_AVAILABLE,
        CL_DEVICE_EXECUTION_CAPABILITIES, CL_DEVICE_QUEUE_PROPERTIES,
        CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, CL_DEVICE_NAME, CL_DEVICE_VENDOR, CL_DRIVER_VERSION,
        CL_DEVICE_PROFILE, CL_DEVICE_VERSION, CL_DEVICE_EXTENSIONS, CL_DEVICE_PLATFORM,
        CL_DEVICE_DOUBLE_FP_CONFIG, CL_DEVICE_HALF_FP_CONFIG, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF,
        CL_DEVICE_HOST_UNIFIED_MEMORY, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR,
        CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT,
        CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT,
        CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF,
        CL_DEVICE_OPENCL_C_VERSION, CL_DEVICE_LINKER_AVAILABLE, CL_DEVICE_BUILT_IN_KERNELS,
        CL_DEVICE_IMAGE_MAX_BUFFER_SIZE, CL_DEVICE_IMAGE_MAX_ARRAY_SIZE, CL_DEVICE_PARENT_DEVICE,
        CL_DEVICE_PARTITION_MAX_SUB_DEVICES, CL_DEVICE_PARTITION_PROPERTIES,
        CL_DEVICE_PARTITION_AFFINITY_DOMAIN, CL_DEVICE_PARTITION_TYPE, CL_DEVICE_REFERENCE_COUNT,
        CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, CL_DEVICE_PRINTF_BUFFER_SIZE,
        CL_DEVICE_IMAGE_PITCH_ALIGNMENT, CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT,
        CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE,
        CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE,
        CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, CL_DEVICE_MAX_ON_DEVICE_QUEUES,
        CL_DEVICE_MAX_ON_DEVICE_EVENTS, CL_DEVICE_SVM_CAPABILITIES,
        CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, CL_DEVICE_MAX_PIPE_ARGS,
        CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, CL_DEVICE_PIPE_MAX_PACKET_SIZE,
        CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT,
        CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, CL_DEVICE_IL_VERSION, CL_DEVICE_MAX_NUM_SUB_GROUPS,
        CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, CL_FP_DENORM, CL_FP_INF_NAN,
        CL_FP_ROUND_TO_NEAREST, CL_FP_ROUND_TO_ZERO, CL_FP_ROUND_TO_INF, CL_FP_FMA, CL_FP_SOFT_FLOAT,
        CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT, CL_NONE, CL_READ_ONLY_CACHE, CL_READ_WRITE_CACHE,
        CL_LOCAL, CL_GLOBAL, CL_EXEC_KERNEL, CL_EXEC_NATIVE_KERNEL,
        CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, CL_QUEUE_PROFILING_ENABLE, CL_QUEUE_ON_DEVICE,
        CL_QUEUE_ON_DEVICE_DEFAULT, CL_CONTEXT_REFERENCE_COUNT, CL_CONTEXT_DEVICES,
        CL_CONTEXT_PROPERTIES, CL_CONTEXT_NUM_DEVICES, CL_CONTEXT_PLATFORM,
        CL_CONTEXT_INTEROP_USER_SYNC, CL_DEVICE_PARTITION_EQUALLY, CL_DEVICE_PARTITION_BY_COUNTS,
        CL_DEVICE_PARTITION_BY_COUNTS_LIST_END, CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN,
        CL_DEVICE_AFFINITY_DOMAIN_NUMA, CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE,
        CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE, CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE,
        CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE, CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE,
        CL_DEVICE_SVM_COARSE_GRAIN_BUFFER, CL_DEVICE_SVM_FINE_GRAIN_BUFFER,
        CL_DEVICE_SVM_FINE_GRAIN_SYSTEM, CL_DEVICE_SVM_ATOMICS, CL_QUEUE_CONTEXT, CL_QUEUE_DEVICE,
        CL_QUEUE_REFERENCE_COUNT, CL_QUEUE_PROPERTIES, CL_QUEUE_SIZE, CL_QUEUE_DEVICE_DEFAULT,
        CL_MEM_READ_WRITE, CL_MEM_WRITE_ONLY, CL_MEM_READ_ONLY, CL_MEM_USE_HOST_PTR,
        CL_MEM_ALLOC_HOST_PTR, CL_MEM_COPY_HOST_PTR, CL_MEM_HOST_WRITE_ONLY, CL_MEM_HOST_READ_ONLY,
        CL_MEM_HOST_NO_ACCESS, CL_MEM_SVM_FINE_GRAIN_BUFFER, CL_MEM_SVM_ATOMICS,
        CL_MEM_KERNEL_READ_AND_WRITE, CL_MIGRATE_MEM_OBJECT_HOST,
        CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED, CL_R, CL_A, CL_RG, CL_RA, CL_RGB, CL_RGBA, CL_BGRA,
        CL_ARGB, CL_INTENSITY, CL_LUMINANCE, CL_Rx, CL_RGx, CL_RGBx, CL_DEPTH, CL_DEPTH_STENCIL,
        CL_sRGB, CL_sRGBx, CL_sRGBA, CL_sBGRA, CL_ABGR, CL_SNORM_INT8, CL_SNORM_INT16, CL_UNORM_INT8,
        CL_UNORM_INT16, CL_UNORM_SHORT_565, CL_UNORM_SHORT_555, CL_UNORM_INT_101010, CL_SIGNED_INT8,
        CL_SIGNED_INT16, CL_SIGNED_INT32, CL_UNSIGNED_INT8, CL_UNSIGNED_INT16, CL_UNSIGNED_INT32,
        CL_HALF_FLOAT, CL_FLOAT, CL_UNORM_INT24, CL_UNORM_INT_101010_2, CL_MEM_OBJECT_BUFFER,
        CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D, CL_MEM_OBJECT_IMAGE2D_ARRAY,
        CL_MEM_OBJECT_IMAGE1D, CL_MEM_OBJECT_IMAGE1D_ARRAY, CL_MEM_OBJECT_IMAGE1D_BUFFER,
        CL_MEM_OBJECT_PIPE, CL_MEM_TYPE, CL_MEM_FLAGS, CL_MEM_SIZE, CL_MEM_HOST_PTR, CL_MEM_MAP_COUNT,
        CL_MEM_REFERENCE_COUNT, CL_MEM_CONTEXT, CL_MEM_ASSOCIATED_MEMOBJECT, CL_MEM_OFFSET,
        CL_MEM_USES_SVM_POINTER, CL_IMAGE_FORMAT, CL_IMAGE_ELEMENT_SIZE, CL_IMAGE_ROW_PITCH,
        CL_IMAGE_SLICE_PITCH, CL_IMAGE_WIDTH, CL_IMAGE_HEIGHT, CL_IMAGE_DEPTH, CL_IMAGE_ARRAY_SIZE,
        CL_IMAGE_BUFFER, CL_IMAGE_NUM_MIP_LEVELS, CL_IMAGE_NUM_SAMPLES, CL_PIPE_PACKET_SIZE,
        CL_PIPE_MAX_PACKETS, CL_ADDRESS_NONE, CL_ADDRESS_CLAMP_TO_EDGE, CL_ADDRESS_CLAMP,
        CL_ADDRESS_REPEAT, CL_ADDRESS_MIRRORED_REPEAT, CL_FILTER_NEAREST, CL_FILTER_LINEAR,
        CL_SAMPLER_REFERENCE_COUNT, CL_SAMPLER_CONTEXT, CL_SAMPLER_NORMALIZED_COORDS,
        CL_SAMPLER_ADDRESSING_MODE, CL_SAMPLER_FILTER_MODE, CL_SAMPLER_MIP_FILTER_MODE,
        CL_SAMPLER_LOD_MIN, CL_SAMPLER_LOD_MAX, CL_MAP_READ, CL_MAP_WRITE,
        CL_MAP_WRITE_INVALIDATE_REGION, CL_PROGRAM_REFERENCE_COUNT, CL_PROGRAM_CONTEXT,
        CL_PROGRAM_NUM_DEVICES, CL_PROGRAM_DEVICES, CL_PROGRAM_SOURCE, CL_PROGRAM_BINARY_SIZES,
        CL_PROGRAM_BINARIES, CL_PROGRAM_NUM_KERNELS, CL_PROGRAM_KERNEL_NAMES, CL_PROGRAM_IL,
        CL_PROGRAM_BUILD_STATUS, CL_PROGRAM_BUILD_OPTIONS, CL_PROGRAM_BUILD_LOG,
        CL_PROGRAM_BINARY_TYPE, CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE,
        CL_PROGRAM_BINARY_TYPE_NONE, CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT,
        CL_PROGRAM_BINARY_TYPE_LIBRARY, CL_PROGRAM_BINARY_TYPE_EXECUTABLE, CL_BUILD_SUCCESS,
        CL_BUILD_NONE, CL_BUILD_ERROR, CL_BUILD_IN_PROGRESS, CL_KERNEL_FUNCTION_NAME,
        CL_KERNEL_NUM_ARGS, CL_KERNEL_REFERENCE_COUNT, CL_KERNEL_CONTEXT, CL_KERNEL_PROGRAM,
        CL_KERNEL_ATTRIBUTES, CL_KERNEL_MAX_NUM_SUB_GROUPS, CL_KERNEL_COMPILE_NUM_SUB_GROUPS,
        CL_KERNEL_ARG_ADDRESS_QUALIFIER, CL_KERNEL_ARG_ACCESS_QUALIFIER, CL_KERNEL_ARG_TYPE_NAME,
        CL_KERNEL_ARG_TYPE_QUALIFIER, CL_KERNEL_ARG_NAME, CL_KERNEL_ARG_ADDRESS_GLOBAL,
        CL_KERNEL_ARG_ADDRESS_LOCAL, CL_KERNEL_ARG_ADDRESS_CONSTANT, CL_KERNEL_ARG_ADDRESS_PRIVATE,
        CL_KERNEL_ARG_ACCESS_READ_ONLY, CL_KERNEL_ARG_ACCESS_WRITE_ONLY,
        CL_KERNEL_ARG_ACCESS_READ_WRITE, CL_KERNEL_ARG_ACCESS_NONE, CL_KERNEL_ARG_TYPE_NONE,
        CL_KERNEL_ARG_TYPE_CONST, CL_KERNEL_ARG_TYPE_RESTRICT, CL_KERNEL_ARG_TYPE_VOLATILE,
        CL_KERNEL_ARG_TYPE_PIPE, CL_KERNEL_WORK_GROUP_SIZE, CL_KERNEL_COMPILE_WORK_GROUP_SIZE,
        CL_KERNEL_LOCAL_MEM_SIZE, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
        CL_KERNEL_PRIVATE_MEM_SIZE, CL_KERNEL_GLOBAL_WORK_SIZE,
        CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE, CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE,
        CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT, CL_KERNEL_EXEC_INFO_SVM_PTRS,
        CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, CL_EVENT_COMMAND_QUEUE, CL_EVENT_COMMAND_TYPE,
        CL_EVENT_REFERENCE_COUNT, CL_EVENT_COMMAND_EXECUTION_STATUS, CL_EVENT_CONTEXT,
        CL_COMMAND_NDRANGE_KERNEL, CL_COMMAND_TASK, CL_COMMAND_NATIVE_KERNEL, CL_COMMAND_READ_BUFFER,
        CL_COMMAND_WRITE_BUFFER, CL_COMMAND_COPY_BUFFER, CL_COMMAND_READ_IMAGE, CL_COMMAND_WRITE_IMAGE,
        CL_COMMAND_COPY_IMAGE, CL_COMMAND_COPY_IMAGE_TO_BUFFER, CL_COMMAND_COPY_BUFFER_TO_IMAGE,
        CL_COMMAND_MAP_BUFFER, CL_COMMAND_MAP_IMAGE, CL_COMMAND_UNMAP_MEM_OBJECT, CL_COMMAND_MARKER,
        CL_COMMAND_ACQUIRE_GL_OBJECTS, CL_COMMAND_RELEASE_GL_OBJECTS, CL_COMMAND_READ_BUFFER_RECT,
        CL_COMMAND_WRITE_BUFFER_RECT, CL_COMMAND_COPY_BUFFER_RECT, CL_COMMAND_USER, CL_COMMAND_BARRIER,
        CL_COMMAND_MIGRATE_MEM_OBJECTS, CL_COMMAND_FILL_BUFFER, CL_COMMAND_FILL_IMAGE,
        CL_COMMAND_SVM_FREE, CL_COMMAND_SVM_MEMCPY, CL_COMMAND_SVM_MEMFILL, CL_COMMAND_SVM_MAP,
        CL_COMMAND_SVM_UNMAP, CL_COMPLETE, CL_RUNNING, CL_SUBMITTED, CL_QUEUED,
        CL_BUFFER_CREATE_TYPE_REGION, CL_PROFILING_COMMAND_QUEUED, CL_PROFILING_COMMAND_SUBMIT,
        CL_PROFILING_COMMAND_START, CL_PROFILING_COMMAND_END, CL_PROFILING_COMMAND_COMPLETE};

    // Functions:
    pub use self::cl_h::{clGetPlatformIDs, clGetPlatformInfo, clGetDeviceIDs, clGetDeviceInfo,
        clCreateContext, clCreateContextFromType, clRetainContext, clReleaseContext, clGetContextInfo,
        clCreateCommandQueue, clRetainCommandQueue, clReleaseCommandQueue, clGetCommandQueueInfo,
        clCreateBuffer, clCreateSubBuffer, clCreateImage2D, clCreateImage3D, clRetainMemObject,
        clReleaseMemObject, clGetSupportedImageFormats, clGetMemObjectInfo, clGetImageInfo,
        clSetMemObjectDestructorCallback, clCreateSampler, clRetainSampler, clReleaseSampler,
        clGetSamplerInfo, clCreateProgramWithSource, clCreateProgramWithBinary, clRetainProgram,
        clReleaseProgram, clBuildProgram, clUnloadCompiler, clGetProgramInfo, clGetProgramBuildInfo,
        clCreateKernel, clCreateKernelsInProgram,  clRetainKernel, clReleaseKernel, clSetKernelArg,
        clGetKernelInfo, clGetKernelWorkGroupInfo, clWaitForEvents, clGetEventInfo, clCreateUserEvent,
        clRetainEvent, clReleaseEvent, clSetUserEventStatus, clSetEventCallback,
        clGetEventProfilingInfo, clFlush, clFinish, clEnqueueReadBuffer, clEnqueueReadBufferRect,
        clEnqueueWriteBuffer, clEnqueueWriteBufferRect, clEnqueueCopyBuffer, clEnqueueCopyBufferRect,
        clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer,
        clEnqueueCopyBufferToImage, clEnqueueMapBuffer, clEnqueueMapImage, clEnqueueUnmapMemObject,
        clEnqueueNDRangeKernel, clEnqueueTask, clEnqueueNativeKernel, clEnqueueMarker,
        clEnqueueWaitForEvents, clEnqueueBarrier, clGetExtensionFunctionAddress};

    #[cfg(feature = "opencl_version_1_2")]
    pub use self::cl_h::{clCreateSubDevices, clRetainDevice, clReleaseDevice, clCreateImage,
        clCreateProgramWithBuiltInKernels, clCompileProgram, clLinkProgram, clGetKernelArgInfo,
        clEnqueueFillBuffer, clEnqueueFillImage, clEnqueueMigrateMemObjects,
        clEnqueueMarkerWithWaitList, clEnqueueBarrierWithWaitList,
        clGetExtensionFunctionAddressForPlatform};

    #[cfg(feature = "opencl_version_2_0")]
    pub use self::cl_h::{clCreateCommandQueueWithProperties, clCreatePipe, clGetPipeInfo, clSVMAlloc,
        clSVMFree, clCreateSamplerWithProperties, clSetKernelArgSVMPointer, clSetKernelExecInfo,
        clEnqueueSVMFree, clEnqueueSVMMemcpy, clEnqueueSVMMemFill, clEnqueueSVMMap, clEnqueueSVMUnmap};

    #[cfg(feature = "opencl_version_2_1")]
    pub use self::cl_h::{clSetDefaultDeviceCommandQueue, clGetDeviceAndHostTimer, clGetHostTimer,
        clCreateProgramWithIL, clCloneKernel, clGetKernelSubGroupInfo, clEnqueueSVMMigrateMem};

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)