public extern static ComputeErrorCode GetKernelWorkGroupInfo( CLKernelHandle kernel, CLDeviceHandle device, ComputeKernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="clDeviceHandle"></param> public GpuDevice(CLDeviceHandle clDeviceHandle) { CLDeviceHandle = clDeviceHandle; CLDevice = ComputePlatform.Platforms .SelectMany(i => i.Devices) .SingleOrDefault(i => i.Handle.Value == CLDeviceHandle.Value); }
public extern static ComputeErrorCode GetProgramBuildInfo( CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
public ComputeErrorCode GetProgramBuildInfo(CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return StaticGetProgramBuildInfo(program, device, param_name, param_value_size, param_value,out param_value_size_ret); }
public ComputeErrorCode GetDeviceInfo(CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return StaticGetDeviceInfo(device, param_name, param_value_size, param_value, out param_value_size_ret); }
public CLCommandQueueHandle CreateCommandQueueWithProperties(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret) { throw new NotImplementedException(); }
public static void GetKernelWorkGroupInfoWrapper(CLKernelHandle kernel, CLDeviceHandle device, ComputeKernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { ComputeException.ThrowOnError(GetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, out param_value_size_ret)); }
public static extern ComputeErrorCode StaticCreateSubDevices(CLDeviceHandle device, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] properties, System.Int32 num_devices, [Out, MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] devices, out IntPtr num_devices_ret);
public static void GetDeviceInfoWrapper(CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { ComputeException.ThrowOnError(GetDeviceInfo(device, param_name, param_value_size, param_value, out param_value_size_ret)); }
public new CLCommandQueueHandle CreateCommandQueueWithProperties(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret) { return StaticCreateCommandQueueWithProperties(context, device, properties, out errcode_ret); }
ComputeErrorCode ICL10.GetKernelWorkGroupInfo(CLKernelHandle kernel, CLDeviceHandle device, ComputeKernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return(GetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, out param_value_size_ret)); }
ComputeErrorCode ICL10.GetProgramBuildInfo(CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return(GetProgramBuildInfo(program, device, param_name, param_value_size, param_value, out param_value_size_ret)); }
CLCommandQueueHandle ICL10.CreateCommandQueue(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret) { return(CreateCommandQueue(context, device, properties, out errcode_ret)); }
ComputeErrorCode ICL10.GetDeviceInfo(CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return(GetDeviceInfo(device, param_name, param_value_size, param_value, out param_value_size_ret)); }
public static void SetDefaultDeviceCommandQueueWrapper(CLContextHandle context, CLDeviceHandle device, CLCommandQueueHandle command_queue) { ComputeException.ThrowOnError(SetDefaultDeviceCommandQueue(context, device, command_queue)); }
public static extern CLCommandQueueHandle CreateCommandQueue( CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret);
public static extern ComputeErrorCode GetKernelWorkGroupInfo( CLKernelHandle kernel, CLDeviceHandle device, ComputeKernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
new CLCommandQueueHandle CreateCommandQueue(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret) { Trace.WriteLine("WARNING! GetExtensionFunctionAddress has been deprecated in OpenCL 1.2."); return CL12.StaticCreateCommandQueue(context, device, properties, out errcode_ret); }
public extern static ComputeErrorCode GetDeviceInfo( CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
internal static CLDeviceHandle[] ExtractDeviceHandles(ICollection<ComputeDevice> computeObjects, out int handleCount) { if (computeObjects == null || computeObjects.Count == 0) { handleCount = 0; return null; } CLDeviceHandle[] result = new CLDeviceHandle[computeObjects.Count]; int i = 0; foreach (ComputeDevice computeObj in computeObjects) { result[i] = computeObj.Handle; i++; } handleCount = computeObjects.Count; return result; }
public new ComputeErrorCode RetainDevice(CLDeviceHandle device) { return StaticRetainDevice(device); }
CLProgramHandle ICL10.CreateProgramWithBinary(CLContextHandle context, int num_devices, CLDeviceHandle[] device_list, IntPtr[] lengths, IntPtr[] binaries, int[] binary_status, out ComputeErrorCode errcode_ret) { return CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, out errcode_ret); }
public static void GetProgramBuildInfoWrapper(CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { ComputeException.ThrowOnError(GetProgramBuildInfo(program, device, param_name, param_value_size, param_value, out param_value_size_ret)); }
ComputeErrorCode ICL10.BuildProgram(CLProgramHandle program, int num_devices, CLDeviceHandle[] device_list, string options, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data) { return BuildProgram(program, num_devices, device_list, options, pfn_notify, user_data); }
public static CLCommandQueueHandle CreateCommandQueuetWrapper(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties) { var handle = CreateCommandQueue(context, device, properties, out ComputeErrorCode errcode_ret); ComputeException.ThrowOnError(errcode_ret); return(handle); }
ComputeErrorCode ICL10.GetDeviceIDs(CLPlatformHandle platform, ComputeDeviceTypes device_type, int num_entries, CLDeviceHandle[] devices, out int num_devices) { return GetDeviceIDs(platform, device_type, num_entries, devices, out num_devices); }
public ComputeErrorCode CreateSubDevices(CLDeviceHandle device, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] properties, int num_devices, [MarshalAs(UnmanagedType.LPArray), Out] CLDeviceHandle[] devices, out int num_devices_ret) { throw new NotImplementedException(); }
ComputeErrorCode ICL10.GetDeviceInfo(CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return GetDeviceInfo(device, param_name, param_value_size, param_value, out param_value_size_ret); }
public ComputeErrorCode GetKernelWorkGroupInfo(CLKernelHandle kernel, CLDeviceHandle device, ComputeKernelWorkGroupInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return StaticGetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, out param_value_size_ret); }
CLCommandQueueHandle ICL10.CreateCommandQueue(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret) { return CreateCommandQueue(context, device, properties, out errcode_ret); }
public ComputeErrorCode RetainDevice(CLDeviceHandle device) { throw new NotImplementedException(); }
CLContextHandle ICL10.CreateContext(IntPtr[] properties, int num_devices, CLDeviceHandle[] devices, ComputeContextNotifier pfn_notify, IntPtr user_data, out ComputeErrorCode errcode_ret) { return CreateContext(properties, num_devices, devices, pfn_notify, user_data, out errcode_ret); }
public static extern ComputeErrorCode GetDeviceInfo( CLDeviceHandle device, ComputeDeviceInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
public extern static CLCommandQueueHandle CreateCommandQueueWithProperties( CLContextHandle context, CLDeviceHandle device, [MarshalAs(UnmanagedType.LPArray)] ComputeCommandQueueFlags[] properties, out ComputeErrorCode errcode_ret);
public static extern ComputeErrorCode GetProgramBuildInfo( CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
/// <summary> /// Gets a read-only collection of available <see cref="ComputeDevice"/>s on the <see cref="ComputePlatform"/>. /// </summary> /// <returns> A read-only collection of the available <see cref="ComputeDevice"/>s on the <see cref="ComputePlatform"/>. </returns> /// <remarks> This method resets the <c>ComputePlatform.Devices</c>. This is useful if one or more of them become unavailable (<c>ComputeDevice.Available</c> is <c>false</c>) after a <see cref="ComputeContext"/> and <see cref="ComputeCommandQueue"/>s that use the <see cref="ComputeDevice"/> have been created and commands have been queued to them. Further calls will trigger an <c>OutOfResourcesComputeException</c> until this method is executed. You will also need to recreate any <see cref="ComputeResource"/> that was created on the no longer available <see cref="ComputeDevice"/>. </remarks> public ReadOnlyCollection<ComputeDevice> QueryDevices() { int handlesLength = 0; ComputeErrorCode error = CLInterface.CL12.GetDeviceIDs(Handle, ComputeDeviceTypes.All, 0, null, out handlesLength); ComputeException.ThrowOnError(error); CLDeviceHandle[] handles = new CLDeviceHandle[handlesLength]; error = CLInterface.CL12.GetDeviceIDs(Handle, ComputeDeviceTypes.All, handlesLength, handles, out handlesLength); ComputeException.ThrowOnError(error); ComputeDevice[] devices = new ComputeDevice[handlesLength]; for (int i = 0; i < handlesLength; i++) devices[i] = new ComputeDevice(this, handles[i]); this.devices = new ReadOnlyCollection<ComputeDevice>(devices); return this.devices; }
public extern static ComputeErrorCode CreateSubDevices( CLDeviceHandle in_device, UInt32 num_devices, cl_device_partition_property[] properties, [Out, MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] out_devices, out UInt32 num_devices_ret);
public static extern ComputeErrorCode StaticRetainDevice(CLDeviceHandle device);
public extern static CLCommandQueueHandle CreateCommandQueue( CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret);
public extern static ComputeErrorCode SetDefaultDeviceCommandQueue( CLContextHandle context, CLDeviceHandle device, CLCommandQueueHandle command_queue);