/// <summary> /// Returns CPU devices. /// </summary> /// <param name="predicate"> /// The predicate to include a given device. /// </param> /// <returns>All CPU devices.</returns> public static ImmutableArray <Device> GetDevices(Predicate <CPUDevice> predicate) { var registry = new DeviceRegistry(); GetDevices(predicate, registry); return(registry.ToImmutable()); }
/// <summary> /// Converts this builder instance into a context instance. /// </summary> /// <returns>The created context instance.</returns> public Context ToContext() => new Context( this, DeviceRegistry.ToImmutable());