A memory descriptor.
More...
#include <mkldnn.hpp>
|
| 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.
|
|
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.
◆ desc() [1/3]
mkldnn::memory::desc::desc |
( |
const dims & |
adims, |
|
|
data_type |
adata_type, |
|
|
format_tag |
aformat_tag |
|
) |
| |
|
inline |
Constructs a memory descriptor.
- Parameters
-
adims | Data dimensions |
adata_type | Data precision/type. |
aformat_tag | Data 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
-
adims | Data dimensions |
adata_type | Data precision/type. |
astrides | The strides for dimensions. |
◆ desc() [3/3]
Constructs a memory descriptor from a C API data structure.
- Parameters
-
◆ submemory_desc()
desc mkldnn::memory::desc::submemory_desc |
( |
const dims & |
adims, |
|
|
const dims & |
offsets |
|
) |
| |
|
inline |
◆ get_size()
size_t mkldnn::memory::desc::get_size |
( |
| ) |
const |
|
inline |
The documentation for this struct was generated from the following file: