.. index:: pair: struct; dnnl::stream .. _doxid-structdnnl_1_1stream: struct dnnl::stream =================== .. toctree:: :hidden: enum_dnnl_stream_flags.rst Overview ~~~~~~~~ An execution stream. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct stream: public :ref:`dnnl::handle` { // enums enum :ref:`flags`; // construction :ref:`stream`(); :ref:`stream`(const :ref:`engine`& aengine, :ref:`flags` aflags = :ref:`flags::default_flags`); // methods :ref:`engine` :ref:`get_engine`() const; stream& :ref:`wait`(); :ref:`handle`(); :ref:`handle`(); :ref:`handle`(); :ref:`handle`(); }; Inherited Members ----------------- .. ref-code-block:: cpp :class: doxyrest-overview-inherited-code-block public: // methods :ref:`handle`& :ref:`operator =` (const :ref:`handle`&); :ref:`handle`& :ref:`operator =` (:ref:`handle`&&); void :ref:`reset`(T t, bool weak = false); T :ref:`get`(bool allow_empty = false) const; :ref:`operator T` () const; :ref:`operator bool` () const; bool :ref:`operator ==` (const :ref:`handle`& other) const; bool :ref:`operator !=` (const :ref:`handle`& other) const; .. _details-structdnnl_1_1stream: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An execution stream. Construction ------------ .. index:: pair: function; stream .. _doxid-structdnnl_1_1stream_1ad264b142d2f7c728fe8c84aa65d62b13: .. ref-code-block:: cpp :class: doxyrest-title-code-block stream() Constructs an empty stream. An empty stream cannot be used in any operations. .. index:: pair: function; stream .. _doxid-structdnnl_1_1stream_1a91cddfb27bc0d7577f8f9ff0327ca598: .. ref-code-block:: cpp :class: doxyrest-title-code-block stream(const :ref:`engine`& aengine, :ref:`flags` aflags = :ref:`flags::default_flags`) Constructs a stream for the specified engine and with behavior controlled by the specified flags. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - aengine - Engine to create the stream on. * - aflags - Flags controlling stream behavior. Methods ------- .. index:: pair: function; get_engine .. _doxid-structdnnl_1_1stream_1a1f00b7d78e3de80b5e1d62dd26b986bc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`engine` get_engine() const Returns the associated engine. .. index:: pair: function; wait .. _doxid-structdnnl_1_1stream_1a59985fa8746436057cf51a820ef8929c: .. ref-code-block:: cpp :class: doxyrest-title-code-block stream& wait() Waits for all primitives executing in the stream to finish. .. rubric:: Returns: The stream itself. .. index:: pair: function; handle .. _doxid-structdnnl_1_1stream_1a5c631f7e5e4c92a13edb8e3422d3a973: .. ref-code-block:: cpp :class: doxyrest-title-code-block handle() Constructs an empty handle object. .. warning:: Uninitialized object cannot be used in most library calls and is equivalent to a null pointer. Any attempt to use its methods, or passing it to the other library function, will cause an exception to be thrown. .. index:: pair: function; handle .. _doxid-structdnnl_1_1stream_1a022001b5b9c8940a1326a02b61fc4860: .. ref-code-block:: cpp :class: doxyrest-title-code-block handle() Copy constructor. .. index:: pair: function; handle .. _doxid-structdnnl_1_1stream_1aa13f3ecf4db240717074814412c7e70c: .. ref-code-block:: cpp :class: doxyrest-title-code-block handle() Move constructor. .. index:: pair: function; handle .. _doxid-structdnnl_1_1stream_1a9c408c09fce1278f5cb0d1fa9818fc86: .. ref-code-block:: cpp :class: doxyrest-title-code-block handle() Constructs a handle wrapper object from a C API handle. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - The C API handle to wrap. * - weak - A flag specifying whether to construct a weak wrapper; defaults to ``false``.