Deep Neural Network Library (DNNL)  1.1.3
Performance library for Deep Learning
Public Member Functions | Protected Member Functions | List of all members
dnnl::primitive_desc_base Struct Reference

The base class for all primitive descriptors. More...

#include <dnnl.hpp>

Inheritance diagram for dnnl::primitive_desc_base:
Inheritance graph
[legend]
Collaboration diagram for dnnl::primitive_desc_base:
Collaboration graph
[legend]

Public Member Functions

engine get_engine () const
 Returns the engine of the primitive descriptor.
 
const char * impl_info_str () const
 Returns implementation name.
 
memory::dim query_s64 (query q) const
 Queries the memory::dim value (same as int64_t).
 
memory::desc query_md (query what, int idx=0) const
 Queries and returns requested memory descriptor.
 
memory::desc scratchpad_desc () const
 Queries scratchpad memory descriptor. More...
 
engine scratchpad_engine () const
 Returns the engine that owns the scratchpad memory.
 
primitive_attr get_primitive_attr () const
 Returns the attributes.
 
- Public Member Functions inherited from dnnl::handle< dnnl_primitive_desc_t >
 handle ()=default
 Empty constructor. More...
 
 handle (dnnl_primitive_desc_t t, bool weak=false)
 Constructs a C handle wrapper from a C handle. More...
 
void reset (dnnl_primitive_desc_t t, bool weak=false)
 Resets the value of a C handle. More...
 
dnnl_primitive_desc_t get (bool allow_emtpy=false) const
 Returns the value of the underlying C handle.
 

Protected Member Functions

 primitive_desc_base (dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind1, dnnl::prop_kind prop_kind2)
 Constructs a primitive_desc from a C counterpart. More...
 

Detailed Description

The base class for all primitive descriptors.

Constructor & Destructor Documentation

◆ primitive_desc_base()

dnnl::primitive_desc_base::primitive_desc_base ( dnnl_primitive_desc_t  pd,
dnnl::primitive::kind  prim_kind,
dnnl::prop_kind  prop_kind1,
dnnl::prop_kind  prop_kind2 
)
inlineprotected

Constructs a primitive_desc from a C counterpart.

Performs certain checks to make sure that the C counterpart refers to a primitive descriptor of a particular primitive kind and propagation kind.

Note: primitive_desc constructed this way does not support next_impl().

Member Function Documentation

◆ scratchpad_desc()

memory::desc dnnl::primitive_desc_base::scratchpad_desc ( ) const
inline

Queries scratchpad memory descriptor.

See also
Primitive Attributes: Scratchpad Returns a zero_md if no scratchpad is required.
Examples:
memory_format_propagation.cpp.

The documentation for this struct was generated from the following file: