.. index:: pair: group; Stream .. _doxid-group__dnnl__api__stream: Stream ====== .. toctree:: :hidden: enum_dnnl_stream_flags_t.rst struct_dnnl_stream.rst struct_dnnl_stream-2.rst Overview ~~~~~~~~ An encapsulation of execution context tied to a particular engine. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef struct :ref:`dnnl_stream`* :ref:`dnnl_stream_t`; typedef const struct :ref:`dnnl_stream`* :ref:`const_dnnl_stream_t`; // enums enum :ref:`dnnl_stream_flags_t`; // structs struct :ref:`dnnl_stream`; struct :ref:`dnnl::stream`; // global functions :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_stream_create`( :ref:`dnnl_stream_t`* stream, :ref:`dnnl_engine_t` engine, unsigned flags ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_stream_get_engine`( :ref:`const_dnnl_stream_t` stream, :ref:`dnnl_engine_t`* engine ); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_stream_wait`(:ref:`dnnl_stream_t` stream); :ref:`dnnl_status_t` DNNL_API :ref:`dnnl_stream_destroy`(:ref:`dnnl_stream_t` stream); .. _details-group__dnnl__api__stream: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ An encapsulation of execution context tied to a particular engine. .. rubric:: See also: :ref:`Basic Concepts ` Typedefs -------- .. index:: pair: typedef; dnnl_stream_t .. _doxid-group__dnnl__api__stream_1ga735eb19cfd205c108c468b5657de4eca: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`dnnl_stream`* dnnl_stream_t An execution stream handle. .. index:: pair: typedef; const_dnnl_stream_t .. _doxid-group__dnnl__api__stream_1gaeac91f003af4e2138c84082acc126c36: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef const struct :ref:`dnnl_stream`* const_dnnl_stream_t A constant execution stream handle. Global Functions ---------------- .. index:: pair: function; dnnl_stream_create .. _doxid-group__dnnl__api__stream_1gaefca700bdec59b22c05f248df5bb3354: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_stream_create( :ref:`dnnl_stream_t`* stream, :ref:`dnnl_engine_t` engine, unsigned flags ) Creates an execution stream. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - Output execution stream. * - engine - Engine to create the execution stream on. * - flags - Stream behavior flags ( .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. rubric:: See also: :ref:`dnnl_stream_flags_t `). .. index:: pair: function; dnnl_stream_get_engine .. _doxid-group__dnnl__api__stream_1ga817016eb87a4d87a889f32b52b71a93b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_stream_get_engine( :ref:`const_dnnl_stream_t` stream, :ref:`dnnl_engine_t`* engine ) Returns the engine of a stream object. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - Stream object. * - engine - Output engine on which the stream is created. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_stream_wait .. _doxid-group__dnnl__api__stream_1ga6a8175b9384349b1ee73a78a24b5883f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_stream_wait(:ref:`dnnl_stream_t` stream) Waits for all primitives in the execution stream to finish computations. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - Execution stream. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise. .. index:: pair: function; dnnl_stream_destroy .. _doxid-group__dnnl__api__stream_1gae7fe8b23136cafa62a39301799cd6e44: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`dnnl_status_t` DNNL_API dnnl_stream_destroy(:ref:`dnnl_stream_t` stream) Destroys an execution stream. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - stream - Execution stream to destroy. .. rubric:: Returns: :ref:`dnnl_success ` on success and a status describing the error otherwise.