00001 #region License
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #endregion
00027 #if EXPERIMENTAL
00028 namespace OpenTK.Compute.CL10
00029 {
00030 using System;
00031 using System.Text;
00032 using System.Runtime.InteropServices;
00033 #pragma warning disable 0649
00034 #pragma warning disable 3019
00035 #pragma warning disable 1591
00036
00037 partial class CL
00038 {
00039 internal static partial class Delegates
00040 {
00041 [System.Security.SuppressUnmanagedCodeSecurity()]
00042 internal unsafe delegate int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, IntPtr user_data);
00043 internal unsafe static BuildProgram clBuildProgram;
00044 [System.Security.SuppressUnmanagedCodeSecurity()]
00045 internal unsafe delegate IntPtr CreateBuffer(IntPtr context, MemFlags flags, IntPtr size, IntPtr host_ptr, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00046 internal unsafe static CreateBuffer clCreateBuffer;
00047 [System.Security.SuppressUnmanagedCodeSecurity()]
00048 internal unsafe delegate IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00049 internal unsafe static CreateCommandQueue clCreateCommandQueue;
00050 [System.Security.SuppressUnmanagedCodeSecurity()]
00051 internal unsafe delegate IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, [OutAttribute] int* errcode_ret);
00052 internal unsafe static CreateContext clCreateContext;
00053 [System.Security.SuppressUnmanagedCodeSecurity()]
00054 internal unsafe delegate IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00055 internal unsafe static CreateContextFromType clCreateContextFromType;
00056 [System.Security.SuppressUnmanagedCodeSecurity()]
00057 internal unsafe delegate IntPtr CreateImage2D(IntPtr context, MemFlags flags, ImageFormat* image_format, IntPtr image_width, IntPtr image_height, IntPtr image_row_pitch, IntPtr host_ptr, [OutAttribute] int* errcode_ret);
00058 internal unsafe static CreateImage2D clCreateImage2D;
00059 [System.Security.SuppressUnmanagedCodeSecurity()]
00060 internal unsafe delegate IntPtr CreateImage3D(IntPtr context, MemFlags flags, ImageFormat* image_format, IntPtr image_width, IntPtr image_height, IntPtr image_depth, IntPtr image_row_pitch, IntPtr image_slice_pitch, IntPtr host_ptr, [OutAttribute] int* errcode_ret);
00061 internal unsafe static CreateImage3D clCreateImage3D;
00062 [System.Security.SuppressUnmanagedCodeSecurity()]
00063 internal unsafe delegate IntPtr CreateKernel(IntPtr program, String kernel_name, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00064 internal unsafe static CreateKernel clCreateKernel;
00065 [System.Security.SuppressUnmanagedCodeSecurity()]
00066 internal unsafe delegate int CreateKernelsInProgram(IntPtr program, uint num_kernels, IntPtr* kernels, [OutAttribute] uint* num_kernels_ret);
00067 internal unsafe static CreateKernelsInProgram clCreateKernelsInProgram;
00068 [System.Security.SuppressUnmanagedCodeSecurity()]
00069 internal unsafe delegate IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, byte** binaries, int* binary_status, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00070 internal unsafe static CreateProgramWithBinary clCreateProgramWithBinary;
00071 [System.Security.SuppressUnmanagedCodeSecurity()]
00072 internal unsafe delegate IntPtr CreateProgramWithSource(IntPtr context, uint count, String[] strings, IntPtr* lengths, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
00073 internal unsafe static CreateProgramWithSource clCreateProgramWithSource;
00074 [System.Security.SuppressUnmanagedCodeSecurity()]
00075 internal unsafe delegate IntPtr CreateSampler(IntPtr context, bool normalized_coords, AddressingMode addressing_mode, FilterMode filter_mode, [OutAttribute] int* errcode_ret);
00076 internal unsafe static CreateSampler clCreateSampler;
00077 [System.Security.SuppressUnmanagedCodeSecurity()]
00078 internal delegate int EnqueueBarrier(IntPtr command_queue);
00079 internal static EnqueueBarrier clEnqueueBarrier;
00080 [System.Security.SuppressUnmanagedCodeSecurity()]
00081 internal unsafe delegate int EnqueueCopyBuffer(IntPtr command_queue, IntPtr src_buffer, IntPtr dst_buffer, IntPtr src_offset, IntPtr dst_offset, IntPtr cb, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00082 internal unsafe static EnqueueCopyBuffer clEnqueueCopyBuffer;
00083 [System.Security.SuppressUnmanagedCodeSecurity()]
00084 internal unsafe delegate int EnqueueCopyBufferToImage(IntPtr command_queue, IntPtr src_buffer, IntPtr dst_image, IntPtr src_offset, IntPtr** dst_origin, IntPtr** region, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00085 internal unsafe static EnqueueCopyBufferToImage clEnqueueCopyBufferToImage;
00086 [System.Security.SuppressUnmanagedCodeSecurity()]
00087 internal unsafe delegate int EnqueueCopyImage(IntPtr command_queue, IntPtr src_image, IntPtr dst_image, IntPtr** src_origin, IntPtr** dst_origin, IntPtr** region, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00088 internal unsafe static EnqueueCopyImage clEnqueueCopyImage;
00089 [System.Security.SuppressUnmanagedCodeSecurity()]
00090 internal unsafe delegate int EnqueueCopyImageToBuffer(IntPtr command_queue, IntPtr src_image, IntPtr dst_buffer, IntPtr** src_origin, IntPtr** region, IntPtr dst_offset, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00091 internal unsafe static EnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer;
00092 [System.Security.SuppressUnmanagedCodeSecurity()]
00093 internal unsafe delegate System.IntPtr EnqueueMapBuffer(IntPtr command_queue, IntPtr buffer, bool blocking_map, MapFlags map_flags, IntPtr offset, IntPtr cb, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event, [OutAttribute] int* errcode_ret);
00094 internal unsafe static EnqueueMapBuffer clEnqueueMapBuffer;
00095 [System.Security.SuppressUnmanagedCodeSecurity()]
00096 internal unsafe delegate System.IntPtr EnqueueMapImage(IntPtr command_queue, IntPtr image, bool blocking_map, MapFlags map_flags, IntPtr** origin, IntPtr** region, IntPtr* image_row_pitch, IntPtr* image_slice_pitch, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event, [OutAttribute] int* errcode_ret);
00097 internal unsafe static EnqueueMapImage clEnqueueMapImage;
00098 [System.Security.SuppressUnmanagedCodeSecurity()]
00099 internal unsafe delegate int EnqueueMarker(IntPtr command_queue, IntPtr* @event);
00100 internal unsafe static EnqueueMarker clEnqueueMarker;
00101 [System.Security.SuppressUnmanagedCodeSecurity()]
00102 internal unsafe delegate int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, IntPtr args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00103 internal unsafe static EnqueueNativeKernel clEnqueueNativeKernel;
00104 [System.Security.SuppressUnmanagedCodeSecurity()]
00105 internal unsafe delegate int EnqueueNDRangeKernel(IntPtr command_queue, IntPtr kernel, uint work_dim, IntPtr* global_work_offset, IntPtr* global_work_size, IntPtr* local_work_size, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00106 internal unsafe static EnqueueNDRangeKernel clEnqueueNDRangeKernel;
00107 [System.Security.SuppressUnmanagedCodeSecurity()]
00108 internal unsafe delegate int EnqueueReadBuffer(IntPtr command_queue, IntPtr buffer, bool blocking_read, IntPtr offset, IntPtr cb, IntPtr ptr, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00109 internal unsafe static EnqueueReadBuffer clEnqueueReadBuffer;
00110 [System.Security.SuppressUnmanagedCodeSecurity()]
00111 internal unsafe delegate int EnqueueReadImage(IntPtr command_queue, IntPtr image, bool blocking_read, IntPtr** origin, IntPtr** region, IntPtr row_pitch, IntPtr slice_pitch, IntPtr ptr, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00112 internal unsafe static EnqueueReadImage clEnqueueReadImage;
00113 [System.Security.SuppressUnmanagedCodeSecurity()]
00114 internal unsafe delegate int EnqueueTask(IntPtr command_queue, IntPtr kernel, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00115 internal unsafe static EnqueueTask clEnqueueTask;
00116 [System.Security.SuppressUnmanagedCodeSecurity()]
00117 internal unsafe delegate int EnqueueUnmapMemObject(IntPtr command_queue, IntPtr memobj, IntPtr mapped_ptr, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00118 internal unsafe static EnqueueUnmapMemObject clEnqueueUnmapMemObject;
00119 [System.Security.SuppressUnmanagedCodeSecurity()]
00120 internal unsafe delegate int EnqueueWaitForEvents(IntPtr command_queue, uint num_events, IntPtr* event_list);
00121 internal unsafe static EnqueueWaitForEvents clEnqueueWaitForEvents;
00122 [System.Security.SuppressUnmanagedCodeSecurity()]
00123 internal unsafe delegate int EnqueueWriteBuffer(IntPtr command_queue, IntPtr buffer, bool blocking_write, IntPtr offset, IntPtr cb, IntPtr ptr, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00124 internal unsafe static EnqueueWriteBuffer clEnqueueWriteBuffer;
00125 [System.Security.SuppressUnmanagedCodeSecurity()]
00126 internal unsafe delegate int EnqueueWriteImage(IntPtr command_queue, IntPtr image, bool blocking_write, IntPtr** origin, IntPtr** region, IntPtr input_row_pitch, IntPtr input_slice_pitch, IntPtr ptr, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event);
00127 internal unsafe static EnqueueWriteImage clEnqueueWriteImage;
00128 [System.Security.SuppressUnmanagedCodeSecurity()]
00129 internal delegate int Finish(IntPtr command_queue);
00130 internal static Finish clFinish;
00131 [System.Security.SuppressUnmanagedCodeSecurity()]
00132 internal delegate int Flush(IntPtr command_queue);
00133 internal static Flush clFlush;
00134 [System.Security.SuppressUnmanagedCodeSecurity()]
00135 internal unsafe delegate int GetCommandQueueInfo(IntPtr command_queue, CommandQueueInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00136 internal unsafe static GetCommandQueueInfo clGetCommandQueueInfo;
00137 [System.Security.SuppressUnmanagedCodeSecurity()]
00138 internal unsafe delegate int GetContextInfo(IntPtr context, ContextInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00139 internal unsafe static GetContextInfo clGetContextInfo;
00140 [System.Security.SuppressUnmanagedCodeSecurity()]
00141 internal unsafe delegate int GetDeviceIDs(IntPtr platform, DeviceTypeFlags device_type, uint num_entries, IntPtr* devices, uint* num_devices);
00142 internal unsafe static GetDeviceIDs clGetDeviceIDs;
00143 [System.Security.SuppressUnmanagedCodeSecurity()]
00144 internal unsafe delegate int GetDeviceInfo(IntPtr device, DeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00145 internal unsafe static GetDeviceInfo clGetDeviceInfo;
00146 [System.Security.SuppressUnmanagedCodeSecurity()]
00147 internal unsafe delegate int GetEventInfo(IntPtr @event, EventInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00148 internal unsafe static GetEventInfo clGetEventInfo;
00149 [System.Security.SuppressUnmanagedCodeSecurity()]
00150 internal unsafe delegate int GetEventProfilingInfo(IntPtr @event, ProfilingInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00151 internal unsafe static GetEventProfilingInfo clGetEventProfilingInfo;
00152 [System.Security.SuppressUnmanagedCodeSecurity()]
00153 internal unsafe delegate int GetImageInfo(IntPtr image, ImageInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00154 internal unsafe static GetImageInfo clGetImageInfo;
00155 [System.Security.SuppressUnmanagedCodeSecurity()]
00156 internal unsafe delegate int GetKernelInfo(IntPtr kernel, KernelInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00157 internal unsafe static GetKernelInfo clGetKernelInfo;
00158 [System.Security.SuppressUnmanagedCodeSecurity()]
00159 internal unsafe delegate int GetKernelWorkGroupInfo(IntPtr kernel, IntPtr device, KernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00160 internal unsafe static GetKernelWorkGroupInfo clGetKernelWorkGroupInfo;
00161 [System.Security.SuppressUnmanagedCodeSecurity()]
00162 internal unsafe delegate int GetMemObjectInfo(IntPtr memobj, MemInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00163 internal unsafe static GetMemObjectInfo clGetMemObjectInfo;
00164 [System.Security.SuppressUnmanagedCodeSecurity()]
00165 internal unsafe delegate int GetPlatformIDs(uint num_entries, IntPtr* platforms, uint* num_platforms);
00166 internal unsafe static GetPlatformIDs clGetPlatformIDs;
00167 [System.Security.SuppressUnmanagedCodeSecurity()]
00168 internal unsafe delegate int GetPlatformInfo(IntPtr platform, PlatformInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00169 internal unsafe static GetPlatformInfo clGetPlatformInfo;
00170 [System.Security.SuppressUnmanagedCodeSecurity()]
00171 internal unsafe delegate int GetProgramBuildInfo(IntPtr program, IntPtr device, ProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00172 internal unsafe static GetProgramBuildInfo clGetProgramBuildInfo;
00173 [System.Security.SuppressUnmanagedCodeSecurity()]
00174 internal unsafe delegate int GetProgramInfo(IntPtr program, ProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00175 internal unsafe static GetProgramInfo clGetProgramInfo;
00176 [System.Security.SuppressUnmanagedCodeSecurity()]
00177 internal unsafe delegate int GetSamplerInfo(IntPtr sampler, SamplerInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
00178 internal unsafe static GetSamplerInfo clGetSamplerInfo;
00179 [System.Security.SuppressUnmanagedCodeSecurity()]
00180 internal unsafe delegate int GetSupportedImageFormats(IntPtr context, MemFlags flags, MemObjectType image_type, uint num_entries, ImageFormat* image_formats, uint* num_image_formats);
00181 internal unsafe static GetSupportedImageFormats clGetSupportedImageFormats;
00182 [System.Security.SuppressUnmanagedCodeSecurity()]
00183 internal delegate int ReleaseCommandQueue(IntPtr command_queue);
00184 internal static ReleaseCommandQueue clReleaseCommandQueue;
00185 [System.Security.SuppressUnmanagedCodeSecurity()]
00186 internal delegate int ReleaseContext(IntPtr context);
00187 internal static ReleaseContext clReleaseContext;
00188 [System.Security.SuppressUnmanagedCodeSecurity()]
00189 internal delegate int ReleaseEvent(IntPtr @event);
00190 internal static ReleaseEvent clReleaseEvent;
00191 [System.Security.SuppressUnmanagedCodeSecurity()]
00192 internal delegate int ReleaseKernel(IntPtr kernel);
00193 internal static ReleaseKernel clReleaseKernel;
00194 [System.Security.SuppressUnmanagedCodeSecurity()]
00195 internal delegate int ReleaseMemObject(IntPtr memobj);
00196 internal static ReleaseMemObject clReleaseMemObject;
00197 [System.Security.SuppressUnmanagedCodeSecurity()]
00198 internal delegate int ReleaseProgram(IntPtr program);
00199 internal static ReleaseProgram clReleaseProgram;
00200 [System.Security.SuppressUnmanagedCodeSecurity()]
00201 internal delegate int ReleaseSampler(IntPtr sampler);
00202 internal static ReleaseSampler clReleaseSampler;
00203 [System.Security.SuppressUnmanagedCodeSecurity()]
00204 internal delegate int RetainCommandQueue(IntPtr command_queue);
00205 internal static RetainCommandQueue clRetainCommandQueue;
00206 [System.Security.SuppressUnmanagedCodeSecurity()]
00207 internal delegate int RetainContext(IntPtr context);
00208 internal static RetainContext clRetainContext;
00209 [System.Security.SuppressUnmanagedCodeSecurity()]
00210 internal delegate int RetainEvent(IntPtr @event);
00211 internal static RetainEvent clRetainEvent;
00212 [System.Security.SuppressUnmanagedCodeSecurity()]
00213 internal delegate int RetainKernel(IntPtr kernel);
00214 internal static RetainKernel clRetainKernel;
00215 [System.Security.SuppressUnmanagedCodeSecurity()]
00216 internal delegate int RetainMemObject(IntPtr memobj);
00217 internal static RetainMemObject clRetainMemObject;
00218 [System.Security.SuppressUnmanagedCodeSecurity()]
00219 internal delegate int RetainProgram(IntPtr program);
00220 internal static RetainProgram clRetainProgram;
00221 [System.Security.SuppressUnmanagedCodeSecurity()]
00222 internal delegate int RetainSampler(IntPtr sampler);
00223 internal static RetainSampler clRetainSampler;
00224 [System.Security.SuppressUnmanagedCodeSecurity()]
00225 internal unsafe delegate int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags* old_properties);
00226 internal unsafe static SetCommandQueueProperty clSetCommandQueueProperty;
00227 [System.Security.SuppressUnmanagedCodeSecurity()]
00228 internal delegate int SetKernelArg(IntPtr kernel, uint arg_index, IntPtr arg_size, IntPtr arg_value);
00229 internal static SetKernelArg clSetKernelArg;
00230 [System.Security.SuppressUnmanagedCodeSecurity()]
00231 internal delegate int UnloadCompiler();
00232 internal static UnloadCompiler clUnloadCompiler;
00233 [System.Security.SuppressUnmanagedCodeSecurity()]
00234 internal unsafe delegate int WaitForEvents(uint num_events, IntPtr* event_list);
00235 internal unsafe static WaitForEvents clWaitForEvents;
00236 }
00237 }
00238 }
00239 #endif