Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)  1.0.4
Performance library for Deep Learning
Public Member Functions | Public Attributes | List of all members
mkldnn::memory::desc Struct Reference

A memory descriptor. More...

#include <mkldnn.hpp>

Collaboration diagram for mkldnn::memory::desc:
Collaboration graph
[legend]

Public Member Functions

 desc ()
 Constructs a zero memory descriptor.
 
 desc (const dims &adims, data_type adata_type, format_tag aformat_tag)
 Constructs a memory descriptor. More...
 
 desc (const dims &adims, data_type adata_type, const dims &astrides)
 Constructs a memory descriptor by strides. More...
 
 desc (const mkldnn_memory_desc_t &adata)
 Constructs a memory descriptor from a C API data structure. More...
 
desc submemory_desc (const dims &adims, const dims &offsets)
 Constructs a sub-memory descriptor. More...
 
size_t get_size () const
 Returns the number of bytes required to allocate the memory described including the padding area. More...
 
bool is_zero () const
 Returns true if the memory descriptor describes an empty memory.
 

Public Attributes

mkldnn_memory_desc_t data
 The underlying C API data structure.
 

Detailed Description

A memory descriptor.

Examples:
cpu_cnn_inference_f32.cpp, cpu_cnn_inference_int8.cpp, cpu_cnn_training_bf16.cpp, cpu_cnn_training_f32.cpp, cpu_getting_started.cpp, cpu_memory_format_propagation.cpp, cpu_performance_profiling.cpp, cpu_rnn_inference_f32.cpp, cpu_rnn_inference_int8.cpp, cpu_rnn_training_f32.cpp, and gpu_opencl_interop.cpp.

Constructor & Destructor Documentation

◆ desc() [1/3]

mkldnn::memory::desc::desc ( const dims &  adims,
data_type  adata_type,
format_tag  aformat_tag 
)
inline

Constructs a memory descriptor.

Parameters
adimsData dimensions
adata_typeData precision/type.
aformat_tagData layout format tag.

◆ desc() [2/3]

mkldnn::memory::desc::desc ( const dims &  adims,
data_type  adata_type,
const dims &  astrides 
)
inline

Constructs a memory descriptor by strides.

Parameters
adimsData dimensions
adata_typeData precision/type.
astridesThe strides for dimensions.

◆ desc() [3/3]

mkldnn::memory::desc::desc ( const mkldnn_memory_desc_t adata)
inline

Constructs a memory descriptor from a C API data structure.

Parameters
adataA C API mkldnn_memory_desc_t structure.

Member Function Documentation

◆ submemory_desc()

desc mkldnn::memory::desc::submemory_desc ( const dims &  adims,
const dims &  offsets 
)
inline

Constructs a sub-memory descriptor.

Parameters
adimsSizes of a sub-memory
offsetsOffsets of a sub-memory
Examples:
cpu_rnn_inference_f32.cpp, cpu_rnn_inference_int8.cpp, and cpu_rnn_training_f32.cpp.

◆ get_size()

size_t mkldnn::memory::desc::get_size ( ) const
inline

Returns the number of bytes required to allocate the memory described including the padding area.

Examples:
cpu_performance_profiling.cpp, cpu_rnn_inference_f32.cpp, and cpu_rnn_inference_int8.cpp.

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