StreamContext

public final class StreamContext

A stream context is an object that an execution can be performed upon.

  • Declaration

    Swift

    public enum Concurrency
  • Create a new stream context.

    Declaration

    Swift

    public init(_ kind: DeviceKind)

    Parameters

    kind

    Whether this stream context is on CPU or GPU.

  • Wait until all executions on this stream context to finish.

    Declaration

    Swift

    public func joined()
  • Dispatch a block to be executed when all previous executions prior to this method call are done.

    Declaration

    Swift

    public func async(_ closure: @escaping () -> Void)
  • Set seed for this particular stream context. If not set, it inherits from the global context.

    Declaration

    Swift

    public func setSeed(_ seed: UInt32)