public static extern ComputeErrorCode BuildProgram( CLProgramHandle program, Int32 num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, String options, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data);
public extern static ComputeErrorCode BuildProgram( CLProgramHandle program, Int32 num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, String options, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data);
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 static CLKernelHandle CreateKernelWrapper(CLProgramHandle program, String kernel_nam) { var handle = CreateKernel(program, kernel_nam, out ComputeErrorCode errcode_ret); ComputeException.ThrowOnError(errcode_ret); return(handle); }
private void notify(CLProgramHandle programHandle, IntPtr userDataPtr) { log.WriteLine("Program build notification."); byte[] bytes = program.Binaries[0]; log.WriteLine("Beginning of program binary (compiled for the 1st selected device):"); log.WriteLine(BitConverter.ToString(bytes, 0, 24) + "..."); }
public static extern CLKernelHandle CreateKernel( CLProgramHandle program, String kernel_name, out ComputeErrorCode errcode_ret);
public ComputeErrorCode GetProgramInfo(CLProgramHandle program, ComputeProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return StaticGetProgramInfo(program, param_name, param_value_size, param_value, out param_value_size_ret); }
public ComputeErrorCode CompileProgram(CLProgramHandle program, int num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, string options, int num_input_headers, [MarshalAs(UnmanagedType.LPArray)] CLProgramHandle[] input_headers, string[] header_include_names, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data) { throw new NotImplementedException(); }
public static extern ComputeErrorCode StaticGetProgramBuildInfo(CLProgramHandle program, CLDeviceHandle device, ComputeProgramBuildInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
public extern static ComputeErrorCode ReleaseProgram( CLProgramHandle program);
private unsafe void notify(CLProgramHandle programHandle, IntPtr userDataPtr) { uint[] dst = new uint[16]; fixed (uint* dstPtr = dst) { using (var queue = new ComputeCommandQueue(ccontext, device, ComputeCommandQueueFlags.None)) { var buf = new ComputeBuffer<uint>(ccontext, ComputeMemoryFlags.WriteOnly, 16); var kernel = program.CreateKernel("test"); kernel.SetValueArgument(0, 1443351125U); kernel.SetMemoryArgument(1, buf); var eventList = new ComputeEventList(); queue.Execute(kernel, null, new long[] { 16L, 256L, 1048576L }, null, null); queue.Finish(); queue.Read<uint>(buf, true, 0, 16, (IntPtr)dstPtr, null); queue.Finish(); queue.Finish(); } } }
private static void notify(CLProgramHandle programHandle, IntPtr userDataPtr) { Console.WriteLine("Program build notification."); }
ComputeErrorCode ICL10.CreateKernelsInProgram(CLProgramHandle program, int num_kernels, CLKernelHandle[] kernels, out int num_kernels_ret) { return(CreateKernelsInProgram(program, num_kernels, kernels, out num_kernels_ret)); }
CLKernelHandle ICL10.CreateKernel(CLProgramHandle program, string kernel_name, out ComputeErrorCode errcode_ret) { return(CreateKernel(program, kernel_name, out errcode_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)); }
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 extern ComputeErrorCode GetProgramInfo( CLProgramHandle program, ComputeProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
ComputeErrorCode ICL10.CreateKernelsInProgram(CLProgramHandle program, int num_kernels, CLKernelHandle[] kernels, out int num_kernels_ret) { return CreateKernelsInProgram(program, num_kernels, kernels, out num_kernels_ret); }
ComputeErrorCode ICL10.ReleaseProgram(CLProgramHandle program) { return(ReleaseProgram(program)); }
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); }
extern static ComputeErrorCode RetainProgram( CLProgramHandle program);
ComputeErrorCode ICL10.GetProgramInfo(CLProgramHandle program, ComputeProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { return GetProgramInfo(program, param_name, param_value_size, param_value, out param_value_size_ret); }
public static void ReleaseProgramWrapper(CLProgramHandle program) { ComputeException.ThrowOnError(ReleaseProgram(program)); }
ComputeErrorCode ICL10.RetainProgram(CLProgramHandle program) { return RetainProgram(program); }
public ComputeErrorCode UnloadPlatformCompiler(CLProgramHandle program) { throw new NotImplementedException(); }
CLKernelHandle ICL10.CreateKernel(CLProgramHandle program, string kernel_name, out ComputeErrorCode errcode_ret) { return CreateKernel(program, kernel_name, out errcode_ret); }
public static extern ComputeErrorCode StaticReleaseProgram(CLProgramHandle program);
public static extern ComputeErrorCode StaticUnloadPlatformCompiler(CLProgramHandle program);
public CLKernelHandle CreateKernel(CLProgramHandle program, String kernel_name, out ComputeErrorCode errcode_ret) { return StaticCreateKernel(program, kernel_name, out errcode_ret); }
public new ComputeErrorCode UnloadPlatformCompiler(CLProgramHandle program) { return StaticUnloadPlatformCompiler(program); }
public ComputeErrorCode ReleaseProgram(CLProgramHandle program) { return StaticReleaseProgram(program); }
public static extern ComputeErrorCode RetainProgram( CLProgramHandle program);
public static extern ComputeErrorCode CreateKernelsInProgram( CLProgramHandle program, Int32 num_kernels, [Out, MarshalAs(UnmanagedType.LPArray)] CLKernelHandle[] kernels, out Int32 num_kernels_ret);
public static extern ComputeErrorCode StaticCompileProgram(CLProgramHandle program, Int32 num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, String options, Int32 num_input_headers, [MarshalAs(UnmanagedType.LPArray)] CLProgramHandle[] input_headers, String[] header_include_names, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data);
extern static ComputeErrorCode GetProgramInfo( CLProgramHandle program, ComputeProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret);
public extern static ComputeErrorCode CreateKernelsInProgram( CLProgramHandle program, Int32 num_kernels, [Out, MarshalAs(UnmanagedType.LPArray)] CLKernelHandle[] kernels, out Int32 num_kernels_ret);
public static void BuildProgramWrapper(CLProgramHandle program, int num_devices, CLDeviceHandle[] device_list, string options, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data) { ComputeException.ThrowOnError(BuildProgram(program, num_devices, device_list, options, pfn_notify, user_data)); }
public static void CreateKernelsInProgramWrapper(CLProgramHandle program, Int32 num_kernels, CLKernelHandle[] kernels, out Int32 num_kernels_ret) { ComputeException.ThrowOnError(CreateKernelsInProgram(program, num_kernels, kernels, out num_kernels_ret)); }
public static void GetProgramInfoWrapper(CLProgramHandle program, ComputeProgramInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret) { ComputeException.ThrowOnError(GetProgramInfo(program, param_name, param_value_size, param_value, out param_value_size_ret)); }
public extern static CLKernelHandle CreateKernel( CLProgramHandle program, String kernel_name, out ComputeErrorCode errcode_ret);