Visible to Intel only — GUID: GUID-18427DA0-FC66-4BF6-B9E3-DE56BABDA302
Visible to Intel only — GUID: GUID-18427DA0-FC66-4BF6-B9E3-DE56BABDA302
struct dnnl::reorder
Overview
Reorder primitive. More…
#include <dnnl.hpp> struct reorder: public dnnl::primitive { // structs struct primitive_desc; // construction reorder(); reorder(const primitive_desc& pd); reorder(const primitive_desc& pd, const std::vector<uint8_t>& cache_blob); reorder( const memory& src, const memory& dst, const primitive_attr& attr = primitive_attr() ); // methods void execute(const stream& astream, memory& src, memory& dst) const; void execute(); };
Inherited Members
public: // enums enum kind; // methods handle<T, traits>& operator = (const handle<T, traits>&); handle<T, traits>& operator = (handle<T, traits>&&); 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; const_dnnl_primitive_desc_t get_primitive_desc() const; kind get_kind() const; std::vector<uint8_t> get_cache_blob() const; void execute(const stream& astream, const std::unordered_map<int, memory>& args) const; handle(); handle(); handle(); handle();
Detailed Documentation
Reorder primitive.
Construction
reorder()
Default constructor. Produces an empty object.
reorder(const primitive_desc& pd)
Constructs a reorder primitive.
Parameters:
pd |
Primitive descriptor for reorder primitive. |
reorder(const primitive_desc& pd, const std::vector<uint8_t>& cache_blob)
Constructs a reorder primitive from a cache blob.
Parameters:
pd |
Primitive descriptor for reorder primitive. |
cache_blob |
Cache blob. |
reorder( const memory& src, const memory& dst, const primitive_attr& attr = primitive_attr() )
Constructs a reorder primitive that would reorder data between memory objects having the same memory descriptors as memory objects src and dst.
Parameters:
src |
Source memory object. |
dst |
Destination memory object. |
attr |
Primitive attributes to use (optional). |
Methods
void execute(const stream& astream, memory& src, memory& dst) const
Executes the reorder primitive.
Parameters:
astream |
Stream object. The stream must belong to the same engine as the primitive. |
src |
Source memory object. |
dst |
Destination memory object. |
void execute()
Executes computations specified by the primitive in a specified stream.
Arguments are passed via an arguments map containing <index, memory object> pairs. The index must be one of the DNNL_ARG_* values such as DNNL_ARG_SRC, and the memory must have a memory descriptor matching the one returned by primitive_desc::query_md (query::exec_arg_md, index) unless using dynamic shapes (see DNNL_RUNTIME_DIM_VAL).
Parameters:
astream |
Stream object. The stream must belong to the same engine as the primitive. |
args |
Arguments map. |