A memory descriptor.
More...
#include <dnnl.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 dnnl_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...
|
|
desc | reshape (const dims &adims) |
| Constructs a memory descriptor by reshaping existing one.
|
|
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:
- cnn_inference_f32.cpp, cnn_inference_int8.cpp, cnn_training_f32.cpp, cpu_cnn_training_bf16.cpp, cpu_rnn_inference_f32.cpp, cpu_rnn_inference_int8.cpp, getting_started.cpp, gpu_opencl_interop.cpp, memory_format_propagation.cpp, performance_profiling.cpp, and rnn_training_f32.cpp.
◆ desc() [1/3]
Constructs a memory descriptor.
- Parameters
-
adims | Data dimensions |
adata_type | Data precision/type. |
aformat_tag | Data layout format tag. |
◆ desc() [2/3]
dnnl::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 dnnl::memory::desc::submemory_desc |
( |
const dims & |
adims, |
|
|
const dims & |
offsets |
|
) |
| |
|
inline |
◆ get_size()
size_t dnnl::memory::desc::get_size |
( |
| ) |
const |
|
inline |
The documentation for this struct was generated from the following file: