StreamContext

public final class StreamContext

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

  • 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)