From ff4af08d2cf784b7d36a21fce16b087683f59f6a Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 11 Aug 2009 19:26:27 +0000 Subject: [PATCH] Generated OpenCL bindings with fixed function pointers. --- Source/OpenTK/Compute/CL10/CL.cs | 1447 ++++++++++++++++++++- Source/OpenTK/Compute/CL10/Core.cs | 14 +- Source/OpenTK/Compute/CL10/Delegates.cs | 16 +- Source/OpenTK/Compute/CL10/Enums.cs | 12 +- Source/OpenTK/Compute/CL10/ErrorHelper.cs | 29 +- Source/OpenTK/Compute/CL10/ImageFormat.cs | 45 + 6 files changed, 1501 insertions(+), 62 deletions(-) create mode 100644 Source/OpenTK/Compute/CL10/ImageFormat.cs diff --git a/Source/OpenTK/Compute/CL10/CL.cs b/Source/OpenTK/Compute/CL10/CL.cs index dc02365d..f44dbfdf 100644 --- a/Source/OpenTK/Compute/CL10/CL.cs +++ b/Source/OpenTK/Compute/CL10/CL.cs @@ -40,33 +40,277 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] public static - unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options) + unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, [In, Out] ref T5 user_data) + where T5 : struct { - return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, [In, Out] T5[,,] user_data) + where T5 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, [In, Out] T5[,] user_data) + where T5 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, [In, Out] T5[] user_data) + where T5 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, IntPtr user_data) + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] public static - int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options) + int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options, IntPtr pfn_notify, [In, Out] ref T5 user_data) + where T5 : struct { unsafe { fixed (IntPtr* device_list_ptr = device_list) { - return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] public static - int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options) + int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options, IntPtr pfn_notify, [In, Out] T5[,,] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options, IntPtr pfn_notify, [In, Out] T5[,] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options, IntPtr pfn_notify, [In, Out] T5[] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, IntPtr[] device_list, String options, IntPtr pfn_notify, IntPtr user_data) + { + unsafe + { + fixed (IntPtr* device_list_ptr = device_list) + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data); + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options, IntPtr pfn_notify, [In, Out] ref T5 user_data) + where T5 : struct { unsafe { fixed (IntPtr* device_list_ptr = &device_list) { - return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options, IntPtr pfn_notify, [In, Out] T5[,,] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = &device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options, IntPtr pfn_notify, [In, Out] T5[,] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = &device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options, IntPtr pfn_notify, [In, Out] T5[] user_data) + where T5 : struct + { + unsafe + { + fixed (IntPtr* device_list_ptr = &device_list) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject()); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glBuildProgram")] + public static + int BuildProgram(IntPtr program, uint num_devices, ref IntPtr device_list, String options, IntPtr pfn_notify, IntPtr user_data) + { + unsafe + { + fixed (IntPtr* device_list_ptr = &device_list) + { + return Delegates.clBuildProgram((IntPtr)program, (uint)num_devices, (IntPtr*)device_list_ptr, (String)options, (IntPtr)pfn_notify, (IntPtr)user_data); } } } @@ -362,33 +606,33 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateCommandQueue")] public static - unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueProperties properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) { - return Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueProperties)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + return Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueFlags)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateCommandQueue")] public static - IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueProperties properties, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) { unsafe { fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) { - return Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueProperties)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + return Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueFlags)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateCommandQueue")] public static - IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueProperties properties, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) { unsafe { fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) { - IntPtr retval = Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueProperties)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + IntPtr retval = Delegates.clCreateCommandQueue((IntPtr)context, (IntPtr)device, (CommandQueueFlags)properties, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); errcode_ret = *errcode_ret_ptr; return retval; } @@ -398,35 +642,307 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] public static - unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices) + unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, [In, Out] ref T4 user_data, [Out] int* errcode_ret) + where T4 : struct { - return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, [In, Out] T4[,,] user_data, [Out] int* errcode_ret) + where T4 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, [In, Out] T4[,] user_data, [Out] int* errcode_ret) + where T4 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, [In, Out] T4[] user_data, [Out] int* errcode_ret) + where T4 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, [Out] int* errcode_ret) + { + return Delegates.clCreateContext((ContextProperties*)properties, (uint)num_devices, (IntPtr*)devices, (IntPtr)pfn_notify, (IntPtr)user_data, (int*)errcode_ret); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] public static - IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices) + IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices, IntPtr pfn_notify, [In, Out] ref T4 user_data, [Out] int[] errcode_ret) + where T4 : struct { unsafe { fixed (ContextProperties* properties_ptr = properties) fixed (IntPtr* devices_ptr = devices) + fixed (int* errcode_ret_ptr = errcode_ret) { - return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] public static - IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices) + IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices, IntPtr pfn_notify, [In, Out] T4[,,] user_data, [Out] int[] errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (IntPtr* devices_ptr = devices) + fixed (int* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices, IntPtr pfn_notify, [In, Out] T4[,] user_data, [Out] int[] errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (IntPtr* devices_ptr = devices) + fixed (int* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices, IntPtr pfn_notify, [In, Out] T4[] user_data, [Out] int[] errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (IntPtr* devices_ptr = devices) + fixed (int* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ContextProperties[] properties, uint num_devices, IntPtr[] devices, IntPtr pfn_notify, IntPtr user_data, [Out] int[] errcode_ret) + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (IntPtr* devices_ptr = devices) + fixed (int* errcode_ret_ptr = errcode_ret) + { + return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data, (int*)errcode_ret_ptr); + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices, IntPtr pfn_notify, [In, Out] ref T4 user_data, [Out] out int errcode_ret) + where T4 : struct { unsafe { fixed (ContextProperties* properties_ptr = &properties) fixed (IntPtr* devices_ptr = &devices) + fixed (int* errcode_ret_ptr = &errcode_ret) { - return Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices, IntPtr pfn_notify, [In, Out] T4[,,] user_data, [Out] out int errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (IntPtr* devices_ptr = &devices) + fixed (int* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices, IntPtr pfn_notify, [In, Out] T4[,] user_data, [Out] out int errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (IntPtr* devices_ptr = &devices) + fixed (int* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices, IntPtr pfn_notify, [In, Out] T4[] user_data, [Out] out int errcode_ret) + where T4 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (IntPtr* devices_ptr = &devices) + fixed (int* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (int*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContext")] + public static + IntPtr CreateContext(ref ContextProperties properties, uint num_devices, ref IntPtr devices, IntPtr pfn_notify, IntPtr user_data, [Out] out int errcode_ret) + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (IntPtr* devices_ptr = &devices) + fixed (int* errcode_ret_ptr = &errcode_ret) + { + IntPtr retval = Delegates.clCreateContext((ContextProperties*)properties_ptr, (uint)num_devices, (IntPtr*)devices_ptr, (IntPtr)pfn_notify, (IntPtr)user_data, (int*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; } } } @@ -434,33 +950,297 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] public static - unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type) + unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] ref T3 user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + where T3 : struct { - return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,,] user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + where T3 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,] user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + where T3 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[] user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + where T3 : struct + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + } + finally + { + user_data_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + { + return Delegates.clCreateContextFromType((ContextProperties*)properties, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] public static - IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type) + IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] ref T3 user_data, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + where T3 : struct { unsafe { fixed (ContextProperties* properties_ptr = properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) { - return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] public static - IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type) + IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,,] user_data, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,] user_data, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[] user_data, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ContextProperties[] properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + { + unsafe + { + fixed (ContextProperties* properties_ptr = properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) + { + return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] ref T3 user_data, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + where T3 : struct { unsafe { fixed (ContextProperties* properties_ptr = &properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) { - return Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type); + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,,] user_data, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[,] user_data, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type, IntPtr pfn_notify, [In, Out] T3[] user_data, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + where T3 : struct + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) + { + GCHandle user_data_ptr = GCHandle.Alloc(user_data, GCHandleType.Pinned); + try + { + IntPtr retval = Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data_ptr.AddrOfPinnedObject(), (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; + } + finally + { + user_data_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateContextFromType")] + public static + IntPtr CreateContextFromType(ref ContextProperties properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + { + unsafe + { + fixed (ContextProperties* properties_ptr = &properties) + fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) + { + IntPtr retval = Delegates.clCreateContextFromType((ContextProperties*)properties_ptr, (DeviceTypeFlags)device_type, (IntPtr)pfn_notify, (IntPtr)user_data, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + errcode_ret = *errcode_ret_ptr; + return retval; } } } @@ -1146,14 +1926,14 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateProgramWithBinary")] public static - unsafe IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, String binaries, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) + unsafe IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, byte @char, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret) { - return Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list, (IntPtr*)lengths, (String)binaries, (int*)binary_status, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); + return Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list, (IntPtr*)lengths, (byte)@char, (int*)binary_status, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateProgramWithBinary")] public static - IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr[] device_list, IntPtr[] lengths, String binaries, int[] binary_status, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) + IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr[] device_list, IntPtr[] lengths, byte @char, int[] binary_status, [Out] OpenTK.Compute.CL10.ErrorCode[] errcode_ret) { unsafe { @@ -1162,14 +1942,14 @@ namespace OpenTK.Compute.CL10 fixed (int* binary_status_ptr = binary_status) fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = errcode_ret) { - return Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list_ptr, (IntPtr*)lengths_ptr, (String)binaries, (int*)binary_status_ptr, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + return Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list_ptr, (IntPtr*)lengths_ptr, (byte)@char, (int*)binary_status_ptr, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glCreateProgramWithBinary")] public static - IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, ref IntPtr device_list, ref IntPtr lengths, String binaries, ref int binary_status, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) + IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, ref IntPtr device_list, ref IntPtr lengths, byte @char, ref int binary_status, [Out] out OpenTK.Compute.CL10.ErrorCode errcode_ret) { unsafe { @@ -1178,7 +1958,7 @@ namespace OpenTK.Compute.CL10 fixed (int* binary_status_ptr = &binary_status) fixed (OpenTK.Compute.CL10.ErrorCode* errcode_ret_ptr = &errcode_ret) { - IntPtr retval = Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list_ptr, (IntPtr*)lengths_ptr, (String)binaries, (int*)binary_status_ptr, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); + IntPtr retval = Delegates.clCreateProgramWithBinary((IntPtr)context, (uint)num_devices, (IntPtr*)device_list_ptr, (IntPtr*)lengths_ptr, (byte)@char, (int*)binary_status_ptr, (OpenTK.Compute.CL10.ErrorCode*)errcode_ret_ptr); errcode_ret = *errcode_ret_ptr; return retval; } @@ -1526,11 +2306,598 @@ namespace OpenTK.Compute.CL10 } } + [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] public static - int EnqueueNativeKernel(IntPtr command_queue) + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] ref T2 args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T2 : struct + where T6 : struct { - return Delegates.clEnqueueNativeKernel((IntPtr)command_queue); + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] ref T2 args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] ref T2 args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,,] args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T2 : struct + where T6 : struct + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,,] args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,,] args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,] args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T2 : struct + where T6 : struct + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,] args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[,] args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[] args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T2 : struct + where T6 : struct + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[] args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, [In, Out] T2[] args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T2 : struct + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_ptr = GCHandle.Alloc(args, GCHandleType.Pinned); + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args_ptr.AddrOfPinnedObject(), (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_ptr.Free(); + args_mem_loc_ptr.Free(); + } + } + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] ref T6 args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T6 : struct + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T6 : struct + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[,] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T6 : struct + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr* mem_list, [In, Out] T6[] args_mem_loc, uint num_events_in_wait_list, IntPtr* event_wait_list, IntPtr* @event) + where T6 : struct + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list, (IntPtr*)@event); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + + [System.CLSCompliant(false)] + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + unsafe 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) + { + return Delegates.clEnqueueNativeKernel((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); + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] ref T6 args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[,] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, IntPtr[] mem_list, [In, Out] T6[] args_mem_loc, uint num_events_in_wait_list, IntPtr[] event_wait_list, IntPtr[] @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + 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) + { + unsafe + { + fixed (IntPtr* mem_list_ptr = mem_list) + fixed (IntPtr* event_wait_list_ptr = event_wait_list) + fixed (IntPtr* @event_ptr = @event) + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc, (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] ref T6 args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[,] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, [In, Out] T6[] args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + where T6 : struct + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + GCHandle args_mem_loc_ptr = GCHandle.Alloc(args_mem_loc, GCHandleType.Pinned); + try + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc_ptr.AddrOfPinnedObject(), (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + finally + { + args_mem_loc_ptr.Free(); + } + } + } + } + + [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glEnqueueNativeKernel")] + public static + int EnqueueNativeKernel(IntPtr command_queue, IntPtr user_func, IntPtr args, IntPtr cb_args, uint num_mem_objects, ref IntPtr mem_list, IntPtr args_mem_loc, uint num_events_in_wait_list, ref IntPtr event_wait_list, ref IntPtr @event) + { + unsafe + { + fixed (IntPtr* mem_list_ptr = &mem_list) + fixed (IntPtr* event_wait_list_ptr = &event_wait_list) + fixed (IntPtr* @event_ptr = &@event) + { + return Delegates.clEnqueueNativeKernel((IntPtr)command_queue, (IntPtr)user_func, (IntPtr)args, (IntPtr)cb_args, (uint)num_mem_objects, (IntPtr*)mem_list_ptr, (IntPtr)args_mem_loc, (uint)num_events_in_wait_list, (IntPtr*)event_wait_list_ptr, (IntPtr*)@event_ptr); + } + } } [System.CLSCompliant(false)] @@ -7084,33 +8451,33 @@ namespace OpenTK.Compute.CL10 [System.CLSCompliant(false)] [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glSetCommandQueueProperty")] public static - unsafe int SetCommandQueueProperty(IntPtr command_queue, CommandQueueProperties properties, bool enable, CommandQueueProperties* old_properties) + unsafe int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags* old_properties) { - return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueProperties)properties, (bool)enable, (CommandQueueProperties*)old_properties); + return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueFlags)properties, (bool)enable, (CommandQueueFlags*)old_properties); } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glSetCommandQueueProperty")] public static - int SetCommandQueueProperty(IntPtr command_queue, CommandQueueProperties properties, bool enable, CommandQueueProperties[] old_properties) + int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags[] old_properties) { unsafe { - fixed (CommandQueueProperties* old_properties_ptr = old_properties) + fixed (CommandQueueFlags* old_properties_ptr = old_properties) { - return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueProperties)properties, (bool)enable, (CommandQueueProperties*)old_properties_ptr); + return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueFlags)properties, (bool)enable, (CommandQueueFlags*)old_properties_ptr); } } } [AutoGenerated(Category = "1.0", Version = "1.0", EntryPoint = "glSetCommandQueueProperty")] public static - int SetCommandQueueProperty(IntPtr command_queue, CommandQueueProperties properties, bool enable, ref CommandQueueProperties old_properties) + int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, ref CommandQueueFlags old_properties) { unsafe { - fixed (CommandQueueProperties* old_properties_ptr = &old_properties) + fixed (CommandQueueFlags* old_properties_ptr = &old_properties) { - return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueProperties)properties, (bool)enable, (CommandQueueProperties*)old_properties_ptr); + return Delegates.clSetCommandQueueProperty((IntPtr)command_queue, (CommandQueueFlags)properties, (bool)enable, (CommandQueueFlags*)old_properties_ptr); } } } diff --git a/Source/OpenTK/Compute/CL10/Core.cs b/Source/OpenTK/Compute/CL10/Core.cs index d37b799e..98882585 100644 --- a/Source/OpenTK/Compute/CL10/Core.cs +++ b/Source/OpenTK/Compute/CL10/Core.cs @@ -40,19 +40,19 @@ namespace OpenTK.Compute.CL10 [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clBuildProgram", ExactSpelling = true)] - internal extern static unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options); + internal extern static unsafe int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, IntPtr user_data); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateBuffer", ExactSpelling = true)] internal extern static unsafe IntPtr CreateBuffer(IntPtr context, MemFlags flags, IntPtr size, IntPtr host_ptr, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateCommandQueue", ExactSpelling = true)] - internal extern static unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueProperties properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); + internal extern static unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateContext", ExactSpelling = true)] - internal extern static unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices); + internal extern static unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, [Out] int* errcode_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateContextFromType", ExactSpelling = true)] - internal extern static unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type); + internal extern static unsafe IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateImage2D", ExactSpelling = true)] internal extern static unsafe IntPtr CreateImage2D(IntPtr context, MemFlags flags, ImageFormat* image_format, IntPtr image_width, IntPtr image_height, IntPtr image_row_pitch, IntPtr host_ptr, [Out] int* errcode_ret); @@ -67,7 +67,7 @@ namespace OpenTK.Compute.CL10 internal extern static unsafe int CreateKernelsInProgram(IntPtr program, uint num_kernels, IntPtr* kernels, [Out] uint* num_kernels_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateProgramWithBinary", ExactSpelling = true)] - internal extern static unsafe IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, String binaries, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); + internal extern static unsafe IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, byte @char, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clCreateProgramWithSource", ExactSpelling = true)] internal extern static unsafe IntPtr CreateProgramWithSource(IntPtr context, uint count, String[] strings, IntPtr* lengths, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); @@ -100,7 +100,7 @@ namespace OpenTK.Compute.CL10 internal extern static unsafe int EnqueueMarker(IntPtr command_queue, IntPtr* @event); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clEnqueueNativeKernel", ExactSpelling = true)] - internal extern static int EnqueueNativeKernel(IntPtr command_queue); + internal extern static unsafe 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); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clEnqueueNDRangeKernel", ExactSpelling = true)] internal extern static unsafe 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); @@ -223,7 +223,7 @@ namespace OpenTK.Compute.CL10 internal extern static int RetainSampler(IntPtr sampler); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clSetCommandQueueProperty", ExactSpelling = true)] - internal extern static unsafe int SetCommandQueueProperty(IntPtr command_queue, CommandQueueProperties properties, bool enable, CommandQueueProperties* old_properties); + internal extern static unsafe int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags* old_properties); [System.Security.SuppressUnmanagedCodeSecurity()] [System.Runtime.InteropServices.DllImport(CL.Library, EntryPoint = "clSetKernelArg", ExactSpelling = true)] internal extern static int SetKernelArg(IntPtr kernel, uint arg_index, IntPtr arg_size, IntPtr arg_value); diff --git a/Source/OpenTK/Compute/CL10/Delegates.cs b/Source/OpenTK/Compute/CL10/Delegates.cs index 0c813517..0a70a876 100644 --- a/Source/OpenTK/Compute/CL10/Delegates.cs +++ b/Source/OpenTK/Compute/CL10/Delegates.cs @@ -38,19 +38,19 @@ namespace OpenTK.Compute.CL10 internal static partial class Delegates { [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options); + internal unsafe delegate int BuildProgram(IntPtr program, uint num_devices, IntPtr* device_list, String options, IntPtr pfn_notify, IntPtr user_data); internal unsafe static BuildProgram clBuildProgram; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate IntPtr CreateBuffer(IntPtr context, MemFlags flags, IntPtr size, IntPtr host_ptr, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); internal unsafe static CreateBuffer clCreateBuffer; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueProperties properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); + internal unsafe delegate IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); internal unsafe static CreateCommandQueue clCreateCommandQueue; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices); + internal unsafe delegate IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, [Out] int* errcode_ret); internal unsafe static CreateContext clCreateContext; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type); + internal unsafe delegate IntPtr CreateContextFromType(ContextProperties* properties, DeviceTypeFlags device_type, IntPtr pfn_notify, IntPtr user_data, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); internal unsafe static CreateContextFromType clCreateContextFromType; [System.Security.SuppressUnmanagedCodeSecurity()] 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, [Out] int* errcode_ret); @@ -65,7 +65,7 @@ namespace OpenTK.Compute.CL10 internal unsafe delegate int CreateKernelsInProgram(IntPtr program, uint num_kernels, IntPtr* kernels, [Out] uint* num_kernels_ret); internal unsafe static CreateKernelsInProgram clCreateKernelsInProgram; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, String binaries, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); + internal unsafe delegate IntPtr CreateProgramWithBinary(IntPtr context, uint num_devices, IntPtr* device_list, IntPtr* lengths, byte @char, int* binary_status, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); internal unsafe static CreateProgramWithBinary clCreateProgramWithBinary; [System.Security.SuppressUnmanagedCodeSecurity()] internal unsafe delegate IntPtr CreateProgramWithSource(IntPtr context, uint count, String[] strings, IntPtr* lengths, [Out] OpenTK.Compute.CL10.ErrorCode* errcode_ret); @@ -98,8 +98,8 @@ namespace OpenTK.Compute.CL10 internal unsafe delegate int EnqueueMarker(IntPtr command_queue, IntPtr* @event); internal unsafe static EnqueueMarker clEnqueueMarker; [System.Security.SuppressUnmanagedCodeSecurity()] - internal delegate int EnqueueNativeKernel(IntPtr command_queue); - internal static EnqueueNativeKernel clEnqueueNativeKernel; + 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); + internal unsafe static EnqueueNativeKernel clEnqueueNativeKernel; [System.Security.SuppressUnmanagedCodeSecurity()] 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); internal unsafe static EnqueueNDRangeKernel clEnqueueNDRangeKernel; @@ -221,7 +221,7 @@ namespace OpenTK.Compute.CL10 internal delegate int RetainSampler(IntPtr sampler); internal static RetainSampler clRetainSampler; [System.Security.SuppressUnmanagedCodeSecurity()] - internal unsafe delegate int SetCommandQueueProperty(IntPtr command_queue, CommandQueueProperties properties, bool enable, CommandQueueProperties* old_properties); + internal unsafe delegate int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags* old_properties); internal unsafe static SetCommandQueueProperty clSetCommandQueueProperty; [System.Security.SuppressUnmanagedCodeSecurity()] internal delegate int SetKernelArg(IntPtr kernel, uint arg_index, IntPtr arg_size, IntPtr arg_value); diff --git a/Source/OpenTK/Compute/CL10/Enums.cs b/Source/OpenTK/Compute/CL10/Enums.cs index 5b9c652f..3c2d4f85 100644 --- a/Source/OpenTK/Compute/CL10/Enums.cs +++ b/Source/OpenTK/Compute/CL10/Enums.cs @@ -362,6 +362,12 @@ namespace OpenTK.Compute.CL10 Queued = ((int)0X3), } + public enum CommandQueueFlags + { + QueueOutOfOrderExecModeEnable = ((int)(1 << 0)), + QueueProfilingEnable = ((int)(1 << 1)), + } + public enum CommandQueueInfo { QueueContext = ((int)0X1090), @@ -370,12 +376,6 @@ namespace OpenTK.Compute.CL10 QueueProperties = ((int)0X1093), } - public enum CommandQueuePropertiesFlags - { - QueueOutOfOrderExecModeEnable = ((int)(1 << 0)), - QueueProfilingEnable = ((int)(1 << 1)), - } - public enum CommandType { CommandNdrangeKernel = ((int)0X11f0), diff --git a/Source/OpenTK/Compute/CL10/ErrorHelper.cs b/Source/OpenTK/Compute/CL10/ErrorHelper.cs index 8a469957..0ff40889 100644 --- a/Source/OpenTK/Compute/CL10/ErrorHelper.cs +++ b/Source/OpenTK/Compute/CL10/ErrorHelper.cs @@ -1,4 +1,31 @@ -using System; +#region License +// +// The Open Toolkit Library License +// +// Copyright (c) 2006 - 2009 the Open Toolkit library. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is 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 Software. +// +// THE SOFTWARE IS 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 SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Compute/CL10/ImageFormat.cs b/Source/OpenTK/Compute/CL10/ImageFormat.cs new file mode 100644 index 00000000..981f678e --- /dev/null +++ b/Source/OpenTK/Compute/CL10/ImageFormat.cs @@ -0,0 +1,45 @@ +#region License +// +// The Open Toolkit Library License +// +// Copyright (c) 2006 - 2009 the Open Toolkit library. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is 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 Software. +// +// THE SOFTWARE IS 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 SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.InteropServices; + +namespace OpenTK.Compute.CL10 +{ + [StructLayout(LayoutKind.Sequential)] + public struct ImageFormat + { + ChannelOrder image_channel_order; + ChannelType image_channel_data_type; + + public ChannelOrder ChannelOrder { get { return image_channel_order; } set { image_channel_order = value; } } + + public ChannelType ChannelType { get { return image_channel_data_type; } set { image_channel_data_type = value; } } + } +}