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

Memory primitive that describes the data. More...

#include <mkldnn.hpp>

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

Classes

struct  desc
 A memory descriptor. More...
 
struct  primitive_desc
 A memory primitive descriptor. More...
 

Public Types

enum  data_type {
  data_undef = mkldnn_data_type_undef, f32 = mkldnn_f32, s32 = mkldnn_s32, bf16 = mkldnn_bf16,
  s16 = mkldnn_s16, s8 = mkldnn_s8, u8 = mkldnn_u8
}
 Data type specification. See mkldnn_data_type_t for a detailed description. More...
 
enum  format {
  format_undef = mkldnn_format_undef, any = mkldnn_any, blocked = mkldnn_blocked, x = mkldnn_x,
  nc = mkldnn_nc, ncw = mkldnn_ncw, nwc = mkldnn_nwc, nCw16c = mkldnn_nCw16c,
  nchw = mkldnn_nchw, nhwc = mkldnn_nhwc, chwn = mkldnn_chwn, nCw4c = mkldnn_nCw4c,
  nCw8c = mkldnn_nCw8c, nChw4c = mkldnn_nChw4c, nChw8c = mkldnn_nChw8c, nChw16c = mkldnn_nChw16c,
  ncdhw = mkldnn_ncdhw, ndhwc = mkldnn_ndhwc, nCdhw4c = mkldnn_nCdhw4c, nCdhw8c = mkldnn_nCdhw8c,
  nCdhw16c = mkldnn_nCdhw16c, oi = mkldnn_oi, io = mkldnn_io, oiw = mkldnn_oiw,
  wio = mkldnn_wio, Owi4o = mkldnn_Owi4o, OIw4i4o = mkldnn_OIw4i4o, Owi8o = mkldnn_Owi8o,
  OIw8o8i = mkldnn_OIw8o8i, OIw8i8o = mkldnn_OIw8i8o, OIw16i16o = mkldnn_OIw16i16o, OIw16o16i = mkldnn_OIw16o16i,
  Oiw4o = mkldnn_Oiw4o, Oiw16o = mkldnn_Oiw16o, Owi16o = mkldnn_Owi16o, OIw8i16o2i = mkldnn_OIw8i16o2i,
  OIw8o16i2o = mkldnn_OIw8o16i2o, IOw8o16i2o = mkldnn_IOw8o16i2o, IOw16o16i = mkldnn_IOw16o16i, OIw4i16o4i = mkldnn_OIw4i16o4i,
  OIw4i16o4i_s8s8 = mkldnn_OIw4i16o4i_s8s8, oihw = mkldnn_oihw, ihwo = mkldnn_ihwo, hwio = mkldnn_hwio,
  iohw = mkldnn_iohw, hwio_s8s8 = mkldnn_hwio_s8s8, dhwio = mkldnn_dhwio, oidhw = mkldnn_oidhw,
  OIdhw4i4o = mkldnn_OIdhw4i4o, Odhwi4o = mkldnn_Odhwi4o, OIdhw8i8o = mkldnn_OIdhw8i8o, OIdhw8o8i = mkldnn_OIdhw8o8i,
  Odhwi8o = mkldnn_Odhwi8o, OIdhw16i16o = mkldnn_OIdhw16i16o, OIdhw16o16i = mkldnn_OIdhw16o16i, Oidhw4o = mkldnn_Oidhw4o,
  Oidhw16o = mkldnn_Oidhw16o, Odhwi16o = mkldnn_Odhwi16o, oIhw8i = mkldnn_oIhw8i, oIhw16i = mkldnn_oIhw16i,
  oIdhw8i = mkldnn_oIdhw8i, oIdhw16i = mkldnn_oIdhw16i, OIhw4i4o = mkldnn_OIhw4i4o, OIhw8i8o = mkldnn_OIhw8i8o,
  OIhw16i16o = mkldnn_OIhw16i16o, OIhw8o8i = mkldnn_OIhw8o8i, OIhw16o16i = mkldnn_OIhw16o16i, IOhw16o16i = mkldnn_IOhw16o16i,
  OIhw8i16o2i = mkldnn_OIhw8i16o2i, IOhw8i16o2i = mkldnn_IOhw8i16o2i, OIhw8o16i2o = mkldnn_OIhw8o16i2o, IOhw8o16i2o = mkldnn_IOhw8o16i2o,
  OIdhw8i16o2i = mkldnn_OIdhw8i16o2i, OIdhw8o16i2o = mkldnn_OIdhw8o16i2o, IOdhw8o16i2o = mkldnn_IOdhw8o16i2o, OIhw4i16o4i = mkldnn_OIhw4i16o4i,
  OIhw4i16o4i_s8s8 = mkldnn_OIhw4i16o4i_s8s8, Oihw8o = mkldnn_Oihw8o, Oihw4o = mkldnn_Oihw4o, Oihw16o = mkldnn_Oihw16o,
  Ohwi8o = mkldnn_Ohwi8o, Ohwi4o = mkldnn_Ohwi4o, Ohwi16o = mkldnn_Ohwi16o, OhIw16o4i = mkldnn_OhIw16o4i,
  goiw = mkldnn_goiw, gOwi4o = mkldnn_gOwi4o, gOIw4i4o = mkldnn_gOIw4i4o, gOwi8o = mkldnn_gOwi8o,
  gOIw8o8i = mkldnn_gOIw8o8i, gOIw8i8o = mkldnn_gOIw8i8o, gOIw16i16o = mkldnn_gOIw16i16o, gOIw16o16i = mkldnn_gOIw16o16i,
  gOiw4o = mkldnn_gOiw4o, gOiw16o = mkldnn_gOiw16o, gOwi16o = mkldnn_gOwi16o, gIOw16o16i = mkldnn_gIOw16o16i,
  gOIw8i16o2i = mkldnn_gOIw8i16o2i, gOIw8o16i2o = mkldnn_gOIw8o16i2o, gIOw8o16i2o = mkldnn_gIOw8o16i2o, gOIw4i16o4i = mkldnn_gOIw4i16o4i,
  gOIw4i16o4i_s8s8 = mkldnn_gOIw4i16o4i_s8s8, goihw = mkldnn_goihw, hwigo = mkldnn_hwigo, giohw = mkldnn_giohw,
  hwigo_s8s8 = mkldnn_hwigo_s8s8, gOIdhw4i4o = mkldnn_gOIdhw4i4o, gOdhwi4o = mkldnn_gOdhwi4o, gOIdhw8i8o = mkldnn_gOIdhw8i8o,
  gOIdhw8o8i = mkldnn_gOIdhw8o8i, gOdhwi8o = mkldnn_gOdhwi8o, gOIhw4i4o = mkldnn_gOIhw4i4o, gOIhw8i8o = mkldnn_gOIhw8i8o,
  gOIhw16i16o = mkldnn_gOIhw16i16o, gOIhw8i16o2i = mkldnn_gOIhw8i16o2i, gIOhw8i16o2i = mkldnn_gIOhw8i16o2i, gOIhw8o16i2o = mkldnn_gOIhw8o16i2o,
  gIOhw8o16i2o = mkldnn_gIOhw8o16i2o, gOIdhw8i16o2i = mkldnn_gOIdhw8i16o2i, gOIdhw8o16i2o = mkldnn_gOIdhw8o16i2o, gIOdhw8o16i2o = mkldnn_gIOdhw8o16i2o,
  gOIhw4i16o4i = mkldnn_gOIhw4i16o4i, gOIhw4i16o4i_s8s8 = mkldnn_gOIhw4i16o4i_s8s8, gOIhw2i8o4i = mkldnn_gOIhw2i8o4i, gOIhw2i8o4i_s8s8 = mkldnn_gOIhw2i8o4i_s8s8,
  gOihw8o = mkldnn_gOihw8o, gOihw4o = mkldnn_gOihw4o, gOihw16o = mkldnn_gOihw16o, gOhwi4o = mkldnn_gOhwi4o,
  gOhwi8o = mkldnn_gOhwi8o, gOhwi16o = mkldnn_gOhwi16o, Goihw8g = mkldnn_Goihw8g, Goiw16g = mkldnn_Goiw16g,
  Goiw16g_s8s8 = mkldnn_Goiw16g_s8s8, Goihw16g = mkldnn_Goihw16g, Goihw16g_s8s8 = mkldnn_Goihw16g_s8s8, gOIhw4o4i = mkldnn_gOIhw4o4i,
  gOIhw4o4i_s8s8 = mkldnn_gOIhw4o4i_s8s8, gOIhw8o8i = mkldnn_gOIhw8o8i, gOIhw16o16i = mkldnn_gOIhw16o16i, gIOhw16o16i = mkldnn_gIOhw16o16i,
  gOhIw16o4i = mkldnn_gOhIw16o4i, goidhw = mkldnn_goidhw, gOIdhw16i16o = mkldnn_gOIdhw16i16o, gOIdhw16o16i = mkldnn_gOIdhw16o16i,
  gOidhw4o = mkldnn_gOidhw4o, gOidhw16o = mkldnn_gOidhw16o, gOdhwi16o = mkldnn_gOdhwi16o, ntc = mkldnn_ntc,
  tnc = mkldnn_tnc, ldsnc = mkldnn_ldsnc, ldigo = mkldnn_ldigo, ldgoi = mkldnn_ldgoi,
  ldgo = mkldnn_ldgo, rnn_packed = mkldnn_rnn_packed, wino_fmt = mkldnn_wino_fmt, format_last = mkldnn_format_last
}
 Memory format specification. See mkldnn_memory_format_t for a detailed description. More...
 
typedef std::vector< std::remove_extent< mkldnn_dims_t >::type > dims
 
- Public Types inherited from mkldnn::primitive
enum  kind {
  kind::undefined_primitive = mkldnn_undefined_primitive, kind::memory = mkldnn_memory, kind::view = mkldnn_view, kind::reorder = mkldnn_reorder,
  kind::concat = mkldnn_concat, kind::concat_inplace = mkldnn_concat_inplace, kind::sum = mkldnn_sum, kind::convolution = mkldnn_convolution,
  kind::deconvolution = mkldnn_deconvolution, kind::shuffle = mkldnn_shuffle, kind::eltwise = mkldnn_eltwise, kind::softmax = mkldnn_softmax,
  kind::pooling = mkldnn_pooling, kind::lrn = mkldnn_lrn, kind::batch_normalization = mkldnn_batch_normalization, kind::inner_product = mkldnn_inner_product,
  kind::rnn = mkldnn_rnn
}
 A proxy to C primitive kind enum. More...
 

Public Member Functions

 memory (const primitive &aprimitive)
 Constructs a memory primitive from a generic primitive. More...
 
 memory (const primitive_desc &adesc)
 Constructs a memory primitive. More...
 
 memory (const primitive_desc &adesc, void *ahandle)
 
primitive_desc get_primitive_desc () const
 Returns the descriptor of the memory primitive. More...
 
void * get_data_handle () const
 Returns a handle of the data contained in the memory primitive. On the CPU engine, this is a pointer to the allocated memory. More...
 
void set_data_handle (void *handle) const
 
- Public Member Functions inherited from mkldnn::primitive
const_mkldnn_primitive_desc_t get_primitive_desc () const
 Returns the descriptor of the underlying C API primitive. More...
 
- Public Member Functions inherited from mkldnn::handle< mkldnn_primitive_t >
 handle (mkldnn_primitive_t t=0, bool weak=false)
 Constructs a C handle wrapper. More...
 
 handle (const handle &other)
 
handleoperator= (const handle &other)
 
bool operator== (const handle &other) const
 
bool operator!= (const handle &other) const
 
void reset (mkldnn_primitive_t t, bool weak=false)
 Resets the value of a C handle. More...
 
mkldnn_primitive_t get () const
 Returns the value of the underlying C handle. More...
 

Static Public Member Functions

template<typename T >
static void validate_dims (std::vector< T > v)
 
static mkldnn_data_type_t convert_to_c (data_type adata_type)
 
static mkldnn_memory_format_t convert_to_c (format aformat)
 

Additional Inherited Members

- Protected Member Functions inherited from mkldnn::handle< mkldnn_primitive_t >
bool operator== (const mkldnn_primitive_t other) const
 
bool operator!= (const mkldnn_primitive_t other) const
 

Detailed Description

Memory primitive that describes the data.

Member Typedef Documentation

◆ dims

typedef std::vector<std::remove_extent<mkldnn_dims_t>::type> mkldnn::memory::dims

Member Enumeration Documentation

◆ data_type

Data type specification. See mkldnn_data_type_t for a detailed description.

Enumerator
data_undef 
f32 
s32 
bf16 
s16 
s8 
u8 

◆ format

Memory format specification. See mkldnn_memory_format_t for a detailed description.

Enumerator
format_undef 
any 
blocked 
nc 
ncw 
nwc 
nCw16c 
nchw 
nhwc 
chwn 
nCw4c 
nCw8c 
nChw4c 
nChw8c 
nChw16c 
ncdhw 
ndhwc 
nCdhw4c 
nCdhw8c 
nCdhw16c 
oi 
io 
oiw 
wio 
Owi4o 
OIw4i4o 
Owi8o 
OIw8o8i 
OIw8i8o 
OIw16i16o 
OIw16o16i 
Oiw4o 
Oiw16o 
Owi16o 
OIw8i16o2i 
OIw8o16i2o 
IOw8o16i2o 
IOw16o16i 
OIw4i16o4i 
OIw4i16o4i_s8s8 
oihw 
ihwo 
hwio 
iohw 
hwio_s8s8 
dhwio 
oidhw 
OIdhw4i4o 
Odhwi4o 
OIdhw8i8o 
OIdhw8o8i 
Odhwi8o 
OIdhw16i16o 
OIdhw16o16i 
Oidhw4o 
Oidhw16o 
Odhwi16o 
oIhw8i 
oIhw16i 
oIdhw8i 
oIdhw16i 
OIhw4i4o 
OIhw8i8o 
OIhw16i16o 
OIhw8o8i 
OIhw16o16i 
IOhw16o16i 
OIhw8i16o2i 
IOhw8i16o2i 
OIhw8o16i2o 
IOhw8o16i2o 
OIdhw8i16o2i 
OIdhw8o16i2o 
IOdhw8o16i2o 
OIhw4i16o4i 
OIhw4i16o4i_s8s8 
Oihw8o 
Oihw4o 
Oihw16o 
Ohwi8o 
Ohwi4o 
Ohwi16o 
OhIw16o4i 
goiw 
gOwi4o 
gOIw4i4o 
gOwi8o 
gOIw8o8i 
gOIw8i8o 
gOIw16i16o 
gOIw16o16i 
gOiw4o 
gOiw16o 
gOwi16o 
gIOw16o16i 
gOIw8i16o2i 
gOIw8o16i2o 
gIOw8o16i2o 
gOIw4i16o4i 
gOIw4i16o4i_s8s8 
goihw 
hwigo 
giohw 
hwigo_s8s8 
gOIdhw4i4o 
gOdhwi4o 
gOIdhw8i8o 
gOIdhw8o8i 
gOdhwi8o 
gOIhw4i4o 
gOIhw8i8o 
gOIhw16i16o 
gOIhw8i16o2i 
gIOhw8i16o2i 
gOIhw8o16i2o 
gIOhw8o16i2o 
gOIdhw8i16o2i 
gOIdhw8o16i2o 
gIOdhw8o16i2o 
gOIhw4i16o4i 
gOIhw4i16o4i_s8s8 
gOIhw2i8o4i 
gOIhw2i8o4i_s8s8 
gOihw8o 
gOihw4o 
gOihw16o 
gOhwi4o 
gOhwi8o 
gOhwi16o 
Goihw8g 
Goiw16g 
Goiw16g_s8s8 
Goihw16g 
Goihw16g_s8s8 
gOIhw4o4i 
gOIhw4o4i_s8s8 
gOIhw8o8i 
gOIhw16o16i 
gIOhw16o16i 
gOhIw16o4i 
goidhw 
gOIdhw16i16o 
gOIdhw16o16i 
gOidhw4o 
gOidhw16o 
gOdhwi16o 
ntc 
tnc 
ldsnc 
ldigo 
ldgoi 
ldgo 
rnn_packed 
wino_fmt 
format_last 

Constructor & Destructor Documentation

◆ memory() [1/3]

mkldnn::memory::memory ( const primitive aprimitive)
inline

Constructs a memory primitive from a generic primitive.

Parameters
aprimitiveThe primitive to treat as memory.

◆ memory() [2/3]

mkldnn::memory::memory ( const primitive_desc adesc)
inline

Constructs a memory primitive.

Parameters
adescMemory primitive descriptor.

◆ memory() [3/3]

mkldnn::memory::memory ( const primitive_desc adesc,
void *  ahandle 
)
inline

Member Function Documentation

◆ validate_dims()

template<typename T >
static void mkldnn::memory::validate_dims ( std::vector< T >  v)
inlinestatic

◆ get_primitive_desc()

primitive_desc mkldnn::memory::get_primitive_desc ( ) const
inline

Returns the descriptor of the memory primitive.

◆ get_data_handle()

void* mkldnn::memory::get_data_handle ( ) const
inline

Returns a handle of the data contained in the memory primitive. On the CPU engine, this is a pointer to the allocated memory.

◆ set_data_handle()

void mkldnn::memory::set_data_handle ( void *  handle) const
inline

◆ convert_to_c() [1/2]

static mkldnn_data_type_t mkldnn::memory::convert_to_c ( data_type  adata_type)
inlinestatic

◆ convert_to_c() [2/2]

static mkldnn_memory_format_t mkldnn::memory::convert_to_c ( format  aformat)
inlinestatic

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