An execution stream. More...
#include <dnnl.hpp>


Public Types | |
| enum class | flags : unsigned |
| Stream flags. Can be combined using the bitwise OR operator. More... | |
Public Member Functions | |
| stream ()=default | |
| Constructs an empty stream. | |
| stream (const engine &engine, flags flags=flags::default_flags, const stream_attr &attr=stream_attr()) | |
| Constructs a stream for the specified engine and with behavior controlled by the specified flags. | |
| stream (const engine &engine, cl_command_queue queue) | |
| Constructs a stream for the specified engine and the OpenCL queue. | |
| cl_command_queue | get_ocl_command_queue () const |
| Returns the underlying OpenCL queue object. | |
| stream & | wait () |
| Waits for all primitives executing in the stream to finish. | |
| handle ()=default | |
| Constructs an empty handle object. | |
| handle (const handle< T, traits > &)=default | |
| Copy constructor. | |
| handle (handle< T, traits > &&)=default | |
| Move constructor. | |
| handle (T t, bool weak=false) | |
| Constructs a handle wrapper object from a C API handle. | |
| Public Member Functions inherited from dnnl::handle< dnnl_stream_t > | |
| handle ()=default | |
| Constructs an empty handle object. | |
| handle< dnnl_stream_t, handle_traits< dnnl_stream_t > > & | operator= (const handle< dnnl_stream_t, handle_traits< dnnl_stream_t > > &)=default |
| Assignment operator. | |
| void | reset (dnnl_stream_t t, bool weak=false) |
| Resets the handle wrapper objects to wrap a new C API handle. | |
| dnnl_stream_t | get (bool allow_empty=false) const |
| Returns the underlying C API handle. | |
| operator dnnl_stream_t () const | |
| Converts a handle to the underlying C API handle type. | |
| operator bool () const | |
| Checks whether the object is empty. | |
An execution stream.
|
strong |
|
default |
Constructs an empty stream.
An empty stream cannot be used in any operations.
|
inline |
Constructs a stream for the specified engine and with behavior controlled by the specified flags.
| engine | Engine to create the stream on. |
| flags | Flags controlling stream behavior. |
| attr | Stream attributes. |
|
inline |
Constructs a stream for the specified engine and the OpenCL queue.
| engine | Engine to create the stream on. |
| queue | OpenCL queue to use for the stream. |
|
inline |
Returns the underlying OpenCL queue object.
|
inline |
Waits for all primitives executing in the stream to finish.
|
default |
Constructs an empty handle object.
|
inlineexplicit |
Constructs a handle wrapper object from a C API handle.
| t | The C API handle to wrap. |
| weak | A flag specifying whether to construct a weak wrapper; defaults to false. |