'/*******************************************************************************
' * Copyright (c) 2008-2009 The Khronos Group Inc.
' *
' * Permission is hereby granted, free of charge, to any person obtaining a
' * copy of this software and/or associated documentation files (the
' * "Materials"), to deal in the Materials without restriction, including
' * without limitation the rights to use, copy, modify, merge, publish,
' * distribute, sublicense, and/or sell copies of the Materials, and to
' * permit persons to whom the Materials are furnished to do so, subject to
' * the following conditions:
' *
' * The above copyright notice and this permission notice shall be included
' * in all copies or substantial portions of the Materials.
' *
' * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
' * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
' * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
' * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
' * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
' * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
' * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
' ******************************************************************************/
'/* $Revision: 9283 $ on $Date: 2009-10-14 10:18:57 -0700 (Wed, 14 Oct 2009) $ */
#IF NOT %DEF(PBX_cl_PBI)
#DEFINE PBX_cl_PBI
%EQUATE `CL_INC = 1
#INCLUDE ONCE "Legacy/System/cl_platform.inc"
'/******************************************************************************/
'typedef struct _cl_platform_id * cl_platform_id;
'typedef struct _cl_device_id * cl_device_id;
'typedef struct _cl_context * cl_context;
'typedef struct _cl_command_queue * cl_command_queue;
'typedef struct _cl_mem * cl_mem;
'typedef struct _cl_program * cl_program;
'typedef struct _cl_kernel * cl_kernel;
'typedef struct _cl_event * cl_event;
'typedef struct _cl_sampler * cl_sampler;
'typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
'typedef cl_ulong cl_bitfield;
'typedef cl_bitfield cl_device_type;
'typedef cl_uint cl_platform_info;
'typedef cl_uint cl_device_info;
'typedef cl_bitfield cl_device_address_info;
'typedef cl_bitfield cl_device_fp_config;
'typedef cl_uint cl_device_mem_cache_type;
'typedef cl_uint cl_device_local_mem_type;
'typedef cl_bitfield cl_device_exec_capabilities;
'typedef cl_bitfield cl_command_queue_properties;
'typedef intptr_t cl_context_properties;
'typedef cl_uint cl_context_info;
'typedef cl_uint cl_command_queue_info;
'typedef cl_uint cl_channel_order;
'typedef cl_uint cl_channel_type;
'typedef cl_bitfield cl_mem_flags;
'typedef cl_uint cl_mem_object_type;
'typedef cl_uint cl_mem_info;
'typedef cl_uint cl_image_info;
'typedef cl_uint cl_addressing_mode;
'typedef cl_uint cl_filter_mode;
'typedef cl_uint cl_sampler_info;
'typedef cl_bitfield cl_map_flags;
'typedef cl_uint cl_program_info;
'typedef cl_uint cl_program_build_info;
'typedef cl_int cl_build_status;
'typedef cl_uint cl_kernel_info;
'typedef cl_uint cl_kernel_work_group_info;
'typedef cl_uint cl_event_info;
'typedef cl_uint cl_command_type;
'typedef cl_uint cl_profiling_info;
' // Size = 8 bytes
TYPE cl_image_format DWORD
 image_channel_order AS DWORD ' cl_channel_order
 image_channel_data_type AS DWORD ' cl_channel_type
END TYPE
'/******************************************************************************/
'// Error Codes
%EQUATE `CL_SUCCESS = 0&
%EQUATE `CL_DEVICE_NOT_FOUND = -1&
%EQUATE `CL_DEVICE_NOT_AVAILABLE = -2&
%EQUATE `CL_COMPILER_NOT_AVAILABLE = -3&
%EQUATE `CL_MEM_OBJECT_ALLOCATION_FAILURE = -4&
%EQUATE `CL_OUT_OF_RESOURCES = -5&
%EQUATE `CL_OUT_OF_HOST_MEMORY = -6&
%EQUATE `CL_PROFILING_INFO_NOT_AVAILABLE = -7&
%EQUATE `CL_MEM_COPY_OVERLAP = -8&
%EQUATE `CL_IMAGE_FORMAT_MISMATCH = -9&
%EQUATE `CL_IMAGE_FORMAT_NOT_SUPPORTED = -10&
%EQUATE `CL_BUILD_PROGRAM_FAILURE = -11&
%EQUATE `CL_MAP_FAILURE = -12&
%EQUATE `CL_INVALID_VALUE = -30&
%EQUATE `CL_INVALID_DEVICE_TYPE = -31&
%EQUATE `CL_INVALID_PLATFORM = -32&
%EQUATE `CL_INVALID_DEVICE = -33&
%EQUATE `CL_INVALID_CONTEXT = -34&
%EQUATE `CL_INVALID_QUEUE_PROPERTIES = -35&
%EQUATE `CL_INVALID_COMMAND_QUEUE = -36&
%EQUATE `CL_INVALID_HOST_PTR = -37&
%EQUATE `CL_INVALID_MEM_OBJECT = -38&
%EQUATE `CL_INVALID_IMAGE_FORMAT_DESCRIPTOR = -39&
%EQUATE `CL_INVALID_IMAGE_SIZE = -40&
%EQUATE `CL_INVALID_SAMPLER = -41&
%EQUATE `CL_INVALID_BINARY = -42&
%EQUATE `CL_INVALID_BUILD_OPTIONS = -43&
%EQUATE `CL_INVALID_PROGRAM = -44&
%EQUATE `CL_INVALID_PROGRAM_EXECUTABLE = -45&
%EQUATE `CL_INVALID_KERNEL_NAME = -46&
%EQUATE `CL_INVALID_KERNEL_DEFINITION = -47&
%EQUATE `CL_INVALID_KERNEL = -48&
%EQUATE `CL_INVALID_ARG_INDEX = -49&
%EQUATE `CL_INVALID_ARG_VALUE = -50&
%EQUATE `CL_INVALID_ARG_SIZE = -51&
%EQUATE `CL_INVALID_KERNEL_ARGS = -52&
%EQUATE `CL_INVALID_WORK_DIMENSION = -53&
%EQUATE `CL_INVALID_WORK_GROUP_SIZE = -54&
%EQUATE `CL_INVALID_WORK_ITEM_SIZE = -55&
%EQUATE `CL_INVALID_GLOBAL_OFFSET = -56&
%EQUATE `CL_INVALID_EVENT_WAIT_LIST = -57&
%EQUATE `CL_INVALID_EVENT = -58&
%EQUATE `CL_INVALID_OPERATION = -59&
%EQUATE `CL_INVALID_GL_OBJECT = -60&
%EQUATE `CL_INVALID_BUFFER_SIZE = -61&
%EQUATE `CL_INVALID_MIP_LEVEL = -62&
%EQUATE `CL_INVALID_GLOBAL_WORK_SIZE = -63&
'// OpenCL Version
%EQUATE `CL_VERSION_1_0 = 1
'// cl_bool
%EQUATE `CL_FALSE = 0
%EQUATE `CL_TRUE = 1
'// cl_platform_info
%EQUATE `CL_PLATFORM_PROFILE = &H0900
%EQUATE `CL_PLATFORM_VERSION = &H0901
%EQUATE `CL_PLATFORM_NAME = &H0902
%EQUATE `CL_PLATFORM_VENDOR = &H0903
%EQUATE `CL_PLATFORM_EXTENSIONS = &H0904
'// cl_device_type - bitfield
%EQUATE `CL_DEVICE_TYPE_DEFAULT = 1&& ' (1 << 0)
%EQUATE `CL_DEVICE_TYPE_CPU = 2&& ' (1 << 1)
%EQUATE `CL_DEVICE_TYPE_GPU = 4&& ' (1 << 2)
%EQUATE `CL_DEVICE_TYPE_ACCELERATOR = 8&& ' (1 << 3)
%EQUATE `CL_DEVICE_TYPE_ALL = &HFFFFFFFF&&
'// cl_device_info
%EQUATE `CL_DEVICE_TYPE = &H1000
%EQUATE `CL_DEVICE_VENDOR_ID = &H1001
%EQUATE `CL_DEVICE_MAX_COMPUTE_UNITS = &H1002
%EQUATE `CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = &H1003
%EQUATE `CL_DEVICE_MAX_WORK_GROUP_SIZE = &H1004
%EQUATE `CL_DEVICE_MAX_WORK_ITEM_SIZES = &H1005
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = &H1006
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = &H1007
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = &H1008
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = &H1009
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = &H100A
%EQUATE `CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = &H100B
%EQUATE `CL_DEVICE_MAX_CLOCK_FREQUENCY = &H100C
%EQUATE `CL_DEVICE_ADDRESS_BITS = &H100D
%EQUATE `CL_DEVICE_MAX_READ_IMAGE_ARGS = &H100E
%EQUATE `CL_DEVICE_MAX_WRITE_IMAGE_ARGS = &H100F
%EQUATE `CL_DEVICE_MAX_MEM_ALLOC_SIZE = &H1010
%EQUATE `CL_DEVICE_IMAGE2D_MAX_WIDTH = &H1011
%EQUATE `CL_DEVICE_IMAGE2D_MAX_HEIGHT = &H1012
%EQUATE `CL_DEVICE_IMAGE3D_MAX_WIDTH = &H1013
%EQUATE `CL_DEVICE_IMAGE3D_MAX_HEIGHT = &H1014
%EQUATE `CL_DEVICE_IMAGE3D_MAX_DEPTH = &H1015
%EQUATE `CL_DEVICE_IMAGE_SUPPORT = &H1016
%EQUATE `CL_DEVICE_MAX_PARAMETER_SIZE = &H1017
%EQUATE `CL_DEVICE_MAX_SAMPLERS = &H1018
%EQUATE `CL_DEVICE_MEM_BASE_ADDR_ALIGN = &H1019
%EQUATE `CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = &H101A
%EQUATE `CL_DEVICE_SINGLE_FP_CONFIG = &H101B
%EQUATE `CL_DEVICE_GLOBAL_MEM_CACHE_TYPE = &H101C
%EQUATE `CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = &H101D
%EQUATE `CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = &H101E
%EQUATE `CL_DEVICE_GLOBAL_MEM_SIZE = &H101F
%EQUATE `CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = &H1020
%EQUATE `CL_DEVICE_MAX_CONSTANT_ARGS = &H1021
%EQUATE `CL_DEVICE_LOCAL_MEM_TYPE = &H1022
%EQUATE `CL_DEVICE_LOCAL_MEM_SIZE = &H1023
%EQUATE `CL_DEVICE_ERROR_CORRECTION_SUPPORT = &H1024
%EQUATE `CL_DEVICE_PROFILING_TIMER_RESOLUTION = &H1025
%EQUATE `CL_DEVICE_ENDIAN_LITTLE = &H1026
%EQUATE `CL_DEVICE_AVAILABLE = &H1027
%EQUATE `CL_DEVICE_COMPILER_AVAILABLE = &H1028
%EQUATE `CL_DEVICE_EXECUTION_CAPABILITIES = &H1029
%EQUATE `CL_DEVICE_QUEUE_PROPERTIES = &H102A
%EQUATE `CL_DEVICE_NAME = &H102B
%EQUATE `CL_DEVICE_VENDOR = &H102C
%EQUATE `CL_DRIVER_VERSION = &H102D
%EQUATE `CL_DEVICE_PROFILE = &H102E
%EQUATE `CL_DEVICE_VERSION = &H102F
%EQUATE `CL_DEVICE_EXTENSIONS = &H1030
%EQUATE `CL_DEVICE_PLATFORM = &H1031
'// cl_device_fp_config - bitfield
%EQUATE `CL_FP_DENORM = 1&& ' (1 << 0)
%EQUATE `CL_FP_INF_NAN = 2&& ' (1 << 1)
%EQUATE `CL_FP_ROUND_TO_NEAREST = 4&& ' (1 << 2)
%EQUATE `CL_FP_ROUND_TO_ZERO = 8&& ' (1 << 3)
%EQUATE `CL_FP_ROUND_TO_INF = 16&& ' (1 << 4)
%EQUATE `CL_FP_FMA = 32&& ' (1 << 5)
'// cl_device_mem_cache_type
%EQUATE `CL_NONE = &H0
%EQUATE `CL_READ_ONLY_CACHE = &H1
%EQUATE `CL_READ_WRITE_CACHE = &H2
'// cl_device_local_mem_type
%EQUATE `CL_LOCAL = &H1
%EQUATE `CL_GLOBAL = &H2
'// cl_device_exec_capabilities - bitfield
%EQUATE `CL_EXEC_KERNEL = 1&& ' (1 << 0)
%EQUATE `CL_EXEC_NATIVE_KERNEL = 2&& ' (1 << 1)
'// cl_command_queue_properties - bitfield
%EQUATE `CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE = 1&& ' (1 << 0)
%EQUATE `CL_QUEUE_PROFILING_ENABLE = 2&& ' (1 << 1)
'// cl_context_info
%EQUATE `CL_CONTEXT_REFERENCE_COUNT = &H1080
%EQUATE `CL_CONTEXT_DEVICES = &H1081
%EQUATE `CL_CONTEXT_PROPERTIES = &H1082
'// cl_context_properties
%EQUATE `CL_CONTEXT_PLATFORM = &H1084
'// cl_command_queue_info
%EQUATE `CL_QUEUE_CONTEXT = &H1090
%EQUATE `CL_QUEUE_DEVICE = &H1091
%EQUATE `CL_QUEUE_REFERENCE_COUNT = &H1092
%EQUATE `CL_QUEUE_PROPERTIES = &H1093
'// cl_mem_flags - bitfield
%EQUATE `CL_MEM_READ_WRITE = &H1&& ' (1 << 0)
%EQUATE `CL_MEM_WRITE_ONLY = &H2&& ' (1 << 1)
%EQUATE `CL_MEM_READ_ONLY = &H4&& ' (1 << 2)
%EQUATE `CL_MEM_USE_HOST_PTR = &H8&& ' (1 << 3)
%EQUATE `CL_MEM_ALLOC_HOST_PTR = &H16&& ' (1 << 4)
%EQUATE `CL_MEM_COPY_HOST_PTR = &H32&& ' (1 << 5)
'// cl_channel_order
%EQUATE `CL_R = &H10B0
%EQUATE `CL_A = &H10B1
%EQUATE `CL_RG = &H10B2
%EQUATE `CL_RA = &H10B3
%EQUATE `CL_RGB = &H10B4
%EQUATE `CL_RGBA = &H10B5
%EQUATE `CL_BGRA = &H10B6
%EQUATE `CL_ARGB = &H10B7
%EQUATE `CL_INTENSITY = &H10B8
%EQUATE `CL_LUMINANCE = &H10B9
'// cl_channel_type
%EQUATE `CL_SNORM_INT8 = &H10D0
%EQUATE `CL_SNORM_INT16 = &H10D1
%EQUATE `CL_UNORM_INT8 = &H10D2
%EQUATE `CL_UNORM_INT16 = &H10D3
%EQUATE `CL_UNORM_SHORT_565 = &H10D4
%EQUATE `CL_UNORM_SHORT_555 = &H10D5
%EQUATE `CL_UNORM_INT_101010 = &H10D6
%EQUATE `CL_SIGNED_INT8 = &H10D7
%EQUATE `CL_SIGNED_INT16 = &H10D8
%EQUATE `CL_SIGNED_INT32 = &H10D9
%EQUATE `CL_UNSIGNED_INT8 = &H10DA
%EQUATE `CL_UNSIGNED_INT16 = &H10DB
%EQUATE `CL_UNSIGNED_INT32 = &H10DC
%EQUATE `CL_HALF_FLOAT = &H10DD
%EQUATE `CL_FLOAT = &H10DE
'// cl_mem_object_type
%EQUATE `CL_MEM_OBJECT_BUFFER = &H10F0
%EQUATE `CL_MEM_OBJECT_IMAGE2D = &H10F1
%EQUATE `CL_MEM_OBJECT_IMAGE3D = &H10F2
'// cl_mem_info
%EQUATE `CL_MEM_TYPE = &H1100
%EQUATE `CL_MEM_FLAGS = &H1101
%EQUATE `CL_MEM_SIZE = &H1102
%EQUATE `CL_MEM_HOST_PTR = &H1103
%EQUATE `CL_MEM_MAP_COUNT = &H1104
%EQUATE `CL_MEM_REFERENCE_COUNT = &H1105
%EQUATE `CL_MEM_CONTEXT = &H1106
'// cl_image_info
%EQUATE `CL_IMAGE_FORMAT = &H1110
%EQUATE `CL_IMAGE_ELEMENT_SIZE = &H1111
%EQUATE `CL_IMAGE_ROW_PITCH = &H1112
%EQUATE `CL_IMAGE_SLICE_PITCH = &H1113
%EQUATE `CL_IMAGE_WIDTH = &H1114
%EQUATE `CL_IMAGE_HEIGHT = &H1115
%EQUATE `CL_IMAGE_DEPTH = &H1116
'// cl_addressing_mode
%EQUATE `CL_ADDRESS_NONE = &H1130
%EQUATE `CL_ADDRESS_CLAMP_TO_EDGE = &H1131
%EQUATE `CL_ADDRESS_CLAMP = &H1132
%EQUATE `CL_ADDRESS_REPEAT = &H1133
'// cl_filter_mode
%EQUATE `CL_FILTER_NEAREST = &H1140
%EQUATE `CL_FILTER_LINEAR = &H1141
'// cl_sampler_info
%EQUATE `CL_SAMPLER_REFERENCE_COUNT = &H1150
%EQUATE `CL_SAMPLER_CONTEXT = &H1151
%EQUATE `CL_SAMPLER_NORMALIZED_COORDS = &H1152
%EQUATE `CL_SAMPLER_ADDRESSING_MODE = &H1153
%EQUATE `CL_SAMPLER_FILTER_MODE = &H1154
'// cl_map_flags - bitfield
%EQUATE `CL_MAP_READ = &H1&& ' (1 << 0)
%EQUATE `CL_MAP_WRITE = &H2&& ' (1 << 1)
'// cl_program_info
%EQUATE `CL_PROGRAM_REFERENCE_COUNT = &H1160
%EQUATE `CL_PROGRAM_CONTEXT = &H1161
%EQUATE `CL_PROGRAM_NUM_DEVICES = &H1162
%EQUATE `CL_PROGRAM_DEVICES = &H1163
%EQUATE `CL_PROGRAM_SOURCE = &H1164
%EQUATE `CL_PROGRAM_BINARY_SIZES = &H1165
%EQUATE `CL_PROGRAM_BINARIES = &H1166
'// cl_program_build_info
%EQUATE `CL_PROGRAM_BUILD_STATUS = &H1181
%EQUATE `CL_PROGRAM_BUILD_OPTIONS = &H1182
%EQUATE `CL_PROGRAM_BUILD_LOG = &H1183
'// cl_build_status
%EQUATE `CL_BUILD_SUCCESS = 0&
%EQUATE `CL_BUILD_NONE = -1&
%EQUATE `CL_BUILD_ERROR = -2&
%EQUATE `CL_BUILD_IN_PROGRESS = -3&
'// cl_kernel_info
%EQUATE `CL_KERNEL_FUNCTION_NAME = &H1190
%EQUATE `CL_KERNEL_NUM_ARGS = &H1191
%EQUATE `CL_KERNEL_REFERENCE_COUNT = &H1192
%EQUATE `CL_KERNEL_CONTEXT = &H1193
%EQUATE `CL_KERNEL_PROGRAM = &H1194
'// cl_kernel_work_group_info
%EQUATE `CL_KERNEL_WORK_GROUP_SIZE = &H11B0
%EQUATE `CL_KERNEL_COMPILE_WORK_GROUP_SIZE = &H11B1
%EQUATE `CL_KERNEL_LOCAL_MEM_SIZE = &H11B2
'// cl_event_info
%EQUATE `CL_EVENT_COMMAND_QUEUE = &H11D0
%EQUATE `CL_EVENT_COMMAND_TYPE = &H11D1
%EQUATE `CL_EVENT_REFERENCE_COUNT = &H11D2
%EQUATE `CL_EVENT_COMMAND_EXECUTION_STATUS = &H11D3
'// cl_command_type
%EQUATE `CL_COMMAND_NDRANGE_KERNEL = &H11F0
%EQUATE `CL_COMMAND_TASK = &H11F1
%EQUATE `CL_COMMAND_NATIVE_KERNEL = &H11F2
%EQUATE `CL_COMMAND_READ_BUFFER = &H11F3
%EQUATE `CL_COMMAND_WRITE_BUFFER = &H11F4
%EQUATE `CL_COMMAND_COPY_BUFFER = &H11F5
%EQUATE `CL_COMMAND_READ_IMAGE = &H11F6
%EQUATE `CL_COMMAND_WRITE_IMAGE = &H11F7
%EQUATE `CL_COMMAND_COPY_IMAGE = &H11F8
%EQUATE `CL_COMMAND_COPY_IMAGE_TO_BUFFER = &H11F9
%EQUATE `CL_COMMAND_COPY_BUFFER_TO_IMAGE = &H11FA
%EQUATE `CL_COMMAND_MAP_BUFFER = &H11FB
%EQUATE `CL_COMMAND_MAP_IMAGE = &H11FC
%EQUATE `CL_COMMAND_UNMAP_MEM_OBJECT = &H11FD
%EQUATE `CL_COMMAND_MARKER = &H11FE
%EQUATE `CL_COMMAND_ACQUIRE_GL_OBJECTS = &H11FF
%EQUATE `CL_COMMAND_RELEASE_GL_OBJECTS = &H1200
'// command execution status
%EQUATE `CL_COMPLETE = &H0&
%EQUATE `CL_RUNNING = &H1&
%EQUATE `CL_SUBMITTED = &H2&
%EQUATE `CL_QUEUED = &H3&
'// cl_profiling_info
%EQUATE `CL_PROFILING_COMMAND_QUEUED = &H1280
%EQUATE `CL_PROFILING_COMMAND_SUBMIT = &H1281
%EQUATE `CL_PROFILING_COMMAND_START = &H1282
%EQUATE `CL_PROFILING_COMMAND_END = &H1283
'/********************************************************************************************************/
'// Platform API
DECLARE FUNCTION clGetPlatformIDs LIB "opencl.dll" ALIAS "clGetPlatformIDs" ( BYVAL num_entries AS QUAD ' cl_uint /* num_entries */ , BYREF platforms AS QUAD ' cl_platform_id * /* platforms */ , BYREF num_platforms AS QUAD ' cl_uint * /* num_platforms */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetPlatformInfo LIB "opencl.dll" ALIAS "clGetPlatformInfo" ( BYVAL platform AS QUAD ' cl_platform_id /* platform */ , BYVAL param_name AS QUAD ' cl_platform_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Device APIs
DECLARE FUNCTION clGetDeviceIDs LIB "opencl.dll" ALIAS "clGetDeviceIDs" ( BYVAL platform AS QUAD ' cl_platform_id /* platform */ , BYVAL cl_device_type AS QUAD ' cl_device_type /* device_type */ , BYVAL num_entries AS QUAD ' cl_uint /* num_entries */ , BYREF devices AS QUAD ' cl_device_id * /* devices */ , BYREF num_devices AS QUAD ' cl_uint * /* num_devices */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetDeviceInfo LIB "opencl.dll" ALIAS "clGetDeviceInfo" ( BYVAL device AS QUAD ' cl_device_id /* device */ , BYVAL param_name AS QUAD ' cl_device_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Context APIs
DECLARE FUNCTION clCreateContext LIB "opencl.dll" ALIAS "clCreateContext" ( BYVAL properties AS QUAD ' const cl_context_properties * /* properties */ , BYVAL num_devices AS QUAD ' cl_uint /* num_devices */ , BYREF devices AS QUAD ' const cl_device_id * /* devices */ , BYVAL pfn_notify AS QUAD ' void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */ , BYREF user_data AS ANY ' void * /* user_data */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_context
DECLARE FUNCTION clCreateContextFromType LIB "opencl.dll" ALIAS "clCreateContextFromType" ( BYVAL properties AS QUAD ' const cl_context_properties * /* properties */ , BYVAL device_type AS QUAD ' cl_device_type /* device_type */ , BYVAL pfn_notify AS QUAD ' void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */ , BYREF user_data AS ANY ' void * /* user_data */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_context
DECLARE FUNCTION clRetainContext LIB "opencl.dll" ALIAS "clRetainContext" ( BYVAL context AS QUAD ' cl_context /* context */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseContext LIB "opencl.dll" ALIAS "clReleaseContext" ( BYVAL context AS QUAD ' cl_context /* context */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetContextInfo LIB "opencl.dll" ALIAS "clGetContextInfo" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL param_name AS QUAD ' cl_context_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Command Queue APIs
DECLARE FUNCTION clCreateCommandQueue LIB "opencl.dll" ALIAS "clCreateCommandQueue" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL device AS QUAD ' cl_device_id /* device */ , BYVAL properties AS QUAD ' cl_command_queue_properties /* properties */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_command_queue
DECLARE FUNCTION clRetainCommandQueue LIB "opencl.dll" ALIAS "clRetainCommandQueue" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseCommandQueue LIB "opencl.dll" ALIAS "clReleaseCommandQueue" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetCommandQueueInfo LIB "opencl.dll" ALIAS "clGetCommandQueueInfo" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL param_name AS QUAD ' cl_command_queue_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clSetCommandQueueProperty LIB "opencl.dll" ALIAS "clSetCommandQueueProperty" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL properties AS QUAD ' cl_command_queue_properties /* properties */ , BYVAL enable AS QUAD ' cl_bool /* enable */ , BYREF old_properties AS QUAD ' cl_command_queue_properties * /* old_properties */ ) AS LONG ' cl_int
'// Memory Object APIs
DECLARE FUNCTION clCreateBuffer LIB "opencl.dll" ALIAS "clCreateBuffer" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL flags AS QUAD ' cl_mem_flags /* flags */ , BYVAL size AS QUAD ' size_t /* size */ , BYREF host_ptr AS ANY ' void * /* host_ptr */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clCreateImage2D LIB "opencl.dll" ALIAS "clCreateImage2D" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL flags AS QUAD ' cl_mem_flags /* flags */ , BYREF image_format AS cl_image_format ' const cl_image_format * /* image_format */ , BYVAL image_width AS QUAD ' size_t /* image_width */ , BYVAL image_height AS QUAD ' size_t /* image_height */ , BYVAL image_row_pitch AS QUAD ' size_t /* image_row_pitch */ , BYREF host_ptr AS ANY ' void * /* host_ptr */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clCreateImage3D LIB "opencl.dll" ALIAS "clCreateImage3D" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL flags AS QUAD ' cl_mem_flags /* flags */ , BYREF image_format AS cl_image_format ' const cl_image_format * /* image_format */ , BYVAL image_width AS QUAD ' size_t /* image_width */ , BYVAL image_height AS QUAD ' size_t /* image_height */ , BYVAL image_depth AS QUAD ' size_t /* image_depth */ , BYVAL image_row_pitch AS QUAD ' size_t /* image_row_pitch */ , BYVAL image_slice_pitch AS QUAD ' size_t /* image_slice_pitch */ , BYREF host_ptr AS ANY ' void * /* host_ptr */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_mem
DECLARE FUNCTION clRetainMemObject LIB "opencl.dll" ALIAS "clRetainMemObject" ( BYVAL memobj AS QUAD ' cl_mem /* memobj */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseMemObject LIB "opencl.dll" ALIAS "clReleaseMemObject" ( BYVAL memobj AS QUAD ' cl_mem /* memobj */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetSupportedImageFormats LIB "opencl.dll" ALIAS "clGetSupportedImageFormats" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL flags AS QUAD ' cl_mem_flags /* flags */ , BYVAL image_type AS QUAD ' cl_mem_object_type /* image_type */ , BYVAL num_entries AS QUAD ' cl_uint /* num_entries */ , BYREF image_formats AS cl_image_format ' cl_image_format * /* image_formats */ , BYREF num_image_formats AS QUAD ' cl_uint * /* num_image_formats */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetMemObjectInfo LIB "opencl.dll" ALIAS "clGetMemObjectInfo" ( BYVAL memobj AS QUAD ' cl_mem /* memobj */ , BYVAL param_name AS QUAD ' cl_mem_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetImageInfo LIB "opencl.dll" ALIAS "clGetImageInfo" ( BYVAL image AS QUAD ' cl_mem /* image */ , BYVAL param_name AS QUAD ' cl_image_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Sampler APIs
DECLARE FUNCTION clCreateSampler LIB "opencl.dll" ALIAS "clCreateSampler" ( BYVAL context AS QUAD ' cl_context /* context */, , BYVAL normalized_coords AS QUAD ' cl_bool /* normalized_coords */, , BYVAL addressing_mode AS QUAD ' cl_addressing_mode /* addressing_mode */, , BYVAL filter_mode AS QUAD ' cl_filter_mode /* filter_mode */, , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_sampler
DECLARE FUNCTION clRetainSampler LIB "opencl.dll" ALIAS "clRetainSampler" ( BYVAL samples AS QUAD ' cl_sampler /* sampler */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseSampler LIB "opencl.dll" ALIAS "clReleaseSampler" ( BYVAL sampler AS QUAD ' cl_sampler /* sampler */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetSamplerInfo LIB "opencl.dll" ALIAS "clGetSamplerInfo" ( BYVAL sampler AS QUAD ' cl_sampler /* sampler */ , BYVAL param_name AS QUAD ' cl_sampler_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Program Object APIs
DECLARE FUNCTION clCreateProgramWithSource LIB "opencl.dll" ALIAS "clCreateProgramWithSource" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL count AS QUAD ' cl_uint /* count */ , BYREF strings AS STRING ' const char ** /* strings */ , BYREF lengths AS QUAD ' const size_t * /* lengths */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_program
DECLARE FUNCTION clCreateProgramWithBinary LIB "opencl.dll" ALIAS "clCreateProgramWithBinary" ( BYVAL context AS QUAD ' cl_context /* context */ , BYVAL num_devices AS QUAD ' cl_uint /* num_devices */ , BYREF device_list AS QUAD ' const cl_device_id * /* device_list */ , BYREF lengths AS QUAD ' const size_t * /* lengths */ , BYREF binaries AS STRING ' const unsigned char ** /* binaries */ , BYREF binary_status AS LONG ' cl_int * /* binary_status */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_program
DECLARE FUNCTION clRetainProgram LIB "opencl.dll" ALIAS "clRetainProgram" ( BYVAL program AS QUAD ' cl_program /* program */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseProgram LIB "opencl.dll" ALIAS "clReleaseProgram" ( BYVAL program AS QUAD ' cl_program /* program */ ) AS LONG ' cl_int
DECLARE FUNCTION clBuildProgram LIB "opencl.dll" ALIAS "clBuildProgram" ( BYVAL program AS QUAD ' cl_program /* program */ , BYVAL num_devices AS QUAD ' cl_uint /* num_devices */, , BYREF device_list AS QUAD ' const cl_device_id * /* device_list */, , BYREF options AS ASCIIZ ' const char * /* options */, , BYVAL pfn_notify AS QUAD ' void (*pfn_notify)(cl_program /* program */, void * /* user_data */), , BYREF user_data AS ANY ' void * /* user_data */ ) AS LONG ' cl_int
DECLARE FUNCTION clUnloadCompiler LIB "opencl.dll" ALIAS "clUnloadCompiler" ( ) AS LONG ' cl_int
DECLARE FUNCTION clGetProgramInfo LIB "opencl.dll" ALIAS "clGetProgramInfo" ( BYVAL program AS QUAD ' cl_program /* program */ , BYVAL param_name AS QUAD ' cl_program_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetProgramBuildInfo LIB "opencl.dll" ALIAS "clGetProgramBuildInfo" ( BYVAL program AS QUAD ' cl_program /* program */ , BYVAL device AS QUAD ' cl_device_id /* device */ , BYVAL param_name AS QUAD ' cl_program_build_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Kernel Object APIs
DECLARE FUNCTION clCreateKernel LIB "opencl.dll" ALIAS "clCreateKernel" ( BYVAL program AS QUAD ' cl_program /* program */ , BYREF kernel_name AS ASCIIZ ' const char * /* kernel_name */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' cl_kernel
DECLARE FUNCTION clCreateKernelsInProgram LIB "opencl.dll" ALIAS "clCreateKernelsInProgram" ( BYVAL program AS QUAD ' cl_program /* program */ , BYVAL num_kernels AS QUAD ' cl_uint /* num_kernels */ , BYREF kernels AS QUAD ' cl_kernel * /* kernels */ , BYREF num_kernels_ret AS QUAD ' cl_uint * /* num_kernels_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clRetainKernel LIB "opencl.dll" ALIAS "clRetainKernel" ( BYVAL kernel AS QUAD ' cl_kernel /* kernel */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseKernel LIB "opencl.dll" ALIAS "clReleaseKernel" ( BYVAL kernel AS QUAD ' cl_kernel /* kernel */ ) AS LONG ' cl_int
DECLARE FUNCTION clSetKernelArg LIB "opencl.dll" ALIAS "clSetKernelArg" ( BYVAL kernel AS QUAD ' cl_kernel /* kernel */ , BYVAL arg_index AS QUAD ' cl_uint /* arg_index */ , BYVAL arg_size AS QUAD ' size_t /* arg_size */ , BYREF arg_value AS ANY ' const void * /* arg_value */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetKernelInfo LIB "opencl.dll" ALIAS "clGetKernelInfo" ( BYVAL kernel AS QUAD ' cl_kernel /* kernel */ , BYVAL param_name AS QUAD ' cl_kernel_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetKernelWorkGroupInfo LIB "opencl.dll" ALIAS "clGetKernelWorkGroupInfo" ( BYVAL kernel AS QUAD ' cl_kernel /* kernel */ , BYVAL device AS QUAD ' cl_device_id /* device */ , BYVAL param_name AS QUAD ' cl_kernel_work_group_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Event Object APIs
DECLARE FUNCTION clWaitForEvents LIB "opencl.dll" ALIAS "clWaitForEvents" ( BYVAL num_events AS QUAD ' cl_uint /* num_events */, , BYREF event_list AS QUAD ' const cl_event * /* event_list */ ) AS LONG ' cl_int
DECLARE FUNCTION clGetEventInfo LIB "opencl.dll" ALIAS "clGetEventInfo" ( BYVAL event AS QUAD ' cl_event /* event */ , BYVAL param_name AS QUAD ' cl_event_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
DECLARE FUNCTION clRetainEvent LIB "opencl.dll" ALIAS "clRetainEvent" ( BYVAL event AS QUAD ' cl_event /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clReleaseEvent LIB "opencl.dll" ALIAS "clReleaseEvent" ( BYVAL event AS QUAD ' cl_event /* event */ ) AS LONG ' cl_int
'// Profiling APIs
DECLARE FUNCTION clGetEventProfilingInfo LIB "opencl.dll" ALIAS "clGetEventProfilingInfo" ( BYVAL event AS QUAD ' cl_event /* event */ , BYVAL param_name AS QUAD ' cl_profiling_info /* param_name */ , BYVAL param_value_size AS QUAD ' size_t /* param_value_size */ , BYREF param_value AS ANY ' void * /* param_value */ , BYREF param_value_size_ret AS QUAD ' size_t * /* param_value_size_ret */ ) AS LONG ' cl_int
'// Flush and Finish APIs
DECLARE FUNCTION clFlush LIB "opencl.dll" ALIAS "clFlush" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ ) AS LONG ' cl_int
DECLARE FUNCTION clFinish LIB "opencl.dll" ALIAS "clFinish" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ ) AS LONG ' cl_int
'// Enqueued Commands APIs
DECLARE FUNCTION clEnqueueReadBuffer LIB "opencl.dll" ALIAS "clEnqueueReadBuffer" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL buffer AS QUAD ' cl_mem /* buffer */ , BYVAL blocking_read AS QUAD ' cl_bool /* blocking_read */ , BYVAL offset AS QUAD ' size_t /* offset */ , BYVAL cb AS QUAD ' size_t /* cb */ , BYREF ptr AS ANY ' void * /* ptr */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueWriteBuffer LIB "opencl.dll" ALIAS "clEnqueueWriteBuffer" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL buffer AS QUAD ' cl_mem /* buffer */ , BYVAL blocking_write AS QUAD ' cl_bool /* blocking_write */ , BYVAL offset AS QUAD ' size_t /* offset */ , BYVAL cb AS QUAD ' size_t /* cb */ , BYREF ptr AS ANY ' const void * /* ptr */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueCopyBuffer LIB "opencl.dll" ALIAS "clEnqueueCopyBuffer" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL src_buffer AS QUAD ' cl_mem /* src_buffer */ , BYVAL dst_buffer AS QUAD ' cl_mem /* dst_buffer */ , BYVAL src_offset AS QUAD ' size_t /* src_offset */ , BYVAL dst_offset AS QUAD ' size_t /* dst_offset */ , BYVAL cb AS QUAD ' size_t /* cb */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueReadImage LIB "opencl.dll" ALIAS "clEnqueueReadImage" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL image AS QUAD ' cl_mem /* image */ , BYVAL blocking_read AS QUAD ' cl_bool /* blocking_read */ , BYREF origin AS QUAD ' const size_t * /* origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYVAL row_pitch AS QUAD ' size_t /* row_pitch */ , BYVAL slice_pitch AS QUAD ' size_t /* slice_pitch */ , BYREF ptr AS ANY ' void * /* ptr */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueWriteImage LIB "opencl.dll" ALIAS "clEnqueueWriteImage" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL image AS QUAD ' cl_mem /* image */ , BYVAL blocking_write AS QUAD ' cl_bool /* blocking_write */ , BYREF origin AS QUAD ' const size_t * /* origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYVAL input_row_pitch AS QUAD ' size_t /* input_row_pitch */ , BYVAL input_slice_pitch AS QUAD ' size_t /* input_slice_pitch */ , BYREF ptr AS ANY ' void * /* ptr */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueCopyImage LIB "opencl.dll" ALIAS "clEnqueueCopyImage" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL src_image AS QUAD ' cl_mem /* src_image */ , BYVAL dst_image AS QUAD ' cl_mem /* dst_image */ , BYREF src_origin AS QUAD ' const size_t * /* src_origin[3] */ , BYREF dst_origin AS QUAD ' const size_t * /* dst_origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueCopyImageToBuffer LIB "opencl.dll" ALIAS "clEnqueueCopyImageToBuffer" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL src_image AS QUAD ' cl_mem /* src_image */ , BYVAL dst_buffer AS QUAD ' cl_mem /* dst_buffer */ , BYREF src_origin AS QUAD ' const size_t * /* src_origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYVAL dst_offset AS QUAD ' size_t /* dst_offset */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueCopyBufferToImage LIB "opencl.dll" ALIAS "clEnqueueCopyBufferToImage" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL src_buffer AS QUAD ' cl_mem /* src_buffer */ , BYVAL dst_image AS QUAD ' cl_mem /* dst_image */ , BYVAL src_offset AS QUAD ' size_t /* src_offset */ , BYREF dst_origin AS QUAD ' const size_t * /* dst_origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueMapBuffer LIB "opencl.dll" ALIAS "clEnqueueMapBuffer" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL buffer AS QUAD ' cl_mem /* buffer */ , BYVAL blocking_map AS QUAD ' cl_bool /* blocking_map */ , BYVAL map_flags AS QUAD ' cl_map_flags /* map_flags */ , BYVAL offset AS QUAD ' size_t /* offset */ , BYVAL cb AS QUAD ' size_t /* cb */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' void *
DECLARE FUNCTION clEnqueueMapImage LIB "opencl.dll" ALIAS "clEnqueueMapImage" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL image AS QUAD ' cl_mem /* image */ , BYVAL blocking_map AS QUAD ' cl_bool /* blocking_map */ , BYVAL map_flags AS QUAD ' cl_map_flags /* map_flags */ , BYREF origin AS QUAD ' const size_t * /* origin[3] */ , BYREF region AS QUAD ' const size_t * /* region[3] */ , BYREF image_row_pitch AS QUAD ' size_t * /* image_row_pitch */ , BYREF image_slice_pitch AS QUAD ' size_t * /* image_slice_pitch */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ , BYREF errcode_ret AS LONG ' cl_int * /* errcode_ret */ ) AS QUAD ' void *
DECLARE FUNCTION clEnqueueUnmapMemObject LIB "opencl.dll" ALIAS "clEnqueueUnmapMemObject" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL memobj AS QUAD ' cl_mem /* memobj */ , BYREF mapped_ptr AS ANY ' void * /* mapped_ptr */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueNDRangeKernel LIB "opencl.dll" ALIAS "clEnqueueNDRangeKernel" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL kernel AS QUAD ' cl_kernel /* kernel */ , BYVAL work_dim AS QUAD ' cl_uint /* work_dim */ , BYREF global_work_offset AS QUAD ' const size_t * /* global_work_offset */ , BYREF global_work_size AS QUAD ' const size_t * /* global_work_size */ , BYREF local_work_size AS QUAD ' const size_t * /* local_work_size */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueTask LIB "opencl.dll" ALIAS "clEnqueueTask" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL kernel AS QUAD ' cl_kernel /* kernel */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueNativeKernel LIB "opencl.dll" ALIAS "clEnqueueNativeKernel" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL user_func AS QUAD ' void (*user_func)(void *) , BYREF args AS ANY ' void * /* args */ , BYVAL cb_args AS QUAD ' size_t /* cb_args */ , BYVAL num_mem_objects AS QUAD ' cl_uint /* num_mem_objects */ , BYREF mem_list AS QUAD ' const cl_mem * /* mem_list */ , BYREF args_mem_loc AS QUAD ' const void ** /* args_mem_loc */ , BYVAL num_events_in_wait_list AS QUAD ' cl_uint /* num_events_in_wait_list */ , BYREF event_wait_list AS QUAD ' const cl_event * /* event_wait_list */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueMarker LIB "opencl.dll" ALIAS "clEnqueueMarker" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYREF event AS QUAD ' cl_event * /* event */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueWaitForEvents LIB "opencl.dll" ALIAS "clEnqueueWaitForEvents" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ , BYVAL num_events AS QUAD ' cl_uint /* num_events */ , BYREF event_list AS QUAD ' const cl_event * /* event_list */ ) AS LONG ' cl_int
DECLARE FUNCTION clEnqueueBarrier LIB "opencl.dll" ALIAS "clEnqueueBarrier" ( BYVAL command_queue AS QUAD ' cl_command_queue /* command_queue */ ) AS LONG ' cl_int
'// Extension function access
'//
'// Returns the extension function address for the given function name,
'// or NULL if a valid function can not be found. The client must
'// check to make sure the address is not NULL, before using or
'// calling the returned function address.
'//
DECLARE FUNCTION clGetExtensionFunctionAddress LIB "opencl.dll" ALIAS "clGetExtensionFunctionAddress" ( BYREF func_name AS ASCIIZ ' const char * /* func_name */ ) AS QUAD ' void *
#ENDIF
