struct dnnl::stream

Overview

An execution stream. More…

#include <dnnl.hpp>

struct stream: public dnnl::handle
{
    // enums

    enum flags;

    // methods

    stream();
    stream(const engine& aengine, flags aflags = flags::default_flags);
    engine get_engine() const;
    stream& wait();
};

Inherited Members

public:
    // methods

    handle();
    handle(const handle<T, traits>&);
    handle<T, traits>& operator = (const handle<T, traits>&);
    handle(handle<T, traits>&&);
    handle<T, traits>& operator = (handle<T, traits>&&);
    handle(T t, bool weak = false);
    void reset(T t, bool weak = false);
    T get(bool allow_empty = false) const;
    operator T () const;
    operator bool () const;
    bool operator == (const handle<T, traits>& other) const;
    bool operator != (const handle& other) const;

Detailed Documentation

An execution stream.

Methods

stream()

Constructs an empty stream.

An empty stream cannot be used in any operations.

stream(const engine& aengine, flags aflags = flags::default_flags)

Constructs a stream for the specified engine and with behavior controlled by the specified flags.

Parameters:

aengine

Engine to create the stream on.

aflags

Flags controlling stream behavior.

engine get_engine() const

Returns the associated engine.

stream& wait()

Waits for all primitives executing in the stream to finish.

Returns:

The stream itself.