public void Build(Device[] devices, string options) { UnsafeNativeMethods.ClDeviceID[] deviceIDs = null; if (devices != null) deviceIDs = Array.ConvertAll(devices, device => device.ID); UnsafeNativeMethods.BuildProgram(Handle, deviceIDs, options, null, IntPtr.Zero); }