/// <summary> /// Creates a pending JIT linker invocation. /// </summary> /// <param name="options">Collection of linker and compiler options</param> public CudaLinker(CudaJitOptionCollection options) { _state = new CUlinkState(); if (options == null) res = DriverAPINativeMethods.ModuleManagement.cuLinkCreate(0, null, null, ref _state); else res = DriverAPINativeMethods.ModuleManagement.cuLinkCreate((uint)options.Count, options.Options, options.Values, ref _state); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuLinkCreate", res)); if (res != CUResult.Success) throw new CudaException(res); }
public static extern CUResult cuLinkDestroy(CUlinkState state);
public static extern CUResult cuLinkComplete(CUlinkState state, ref IntPtr cubinOut, ref SizeT sizeOut);
public static extern CUResult cuLinkAddFile(CUlinkState state, CUJITInputType type, string path, uint numOptions, CUJITOption[] options, IntPtr[] optionValues);
public static extern CUResult cuLinkAddData(CUlinkState state, CUJITInputType type, byte[] data, SizeT size, [MarshalAs(UnmanagedType.LPStr)] string name, uint numOptions, CUJITOption[] options, IntPtr[] optionValues);
public static extern CUResult cuLinkCreate(uint numOptions, CUJITOption[] options, [In, Out] IntPtr[] optionValues, ref CUlinkState stateOut);