[][src]Struct onednn_sys::dnnl_memory_desc_t

#[repr(C)]pub struct dnnl_memory_desc_t {
    pub ndims: c_int,
    pub dims: dnnl_dims_t,
    pub data_type: dnnl_data_type_t,
    pub padded_dims: dnnl_dims_t,
    pub padded_offsets: dnnl_dims_t,
    pub offset0: dnnl_dim_t,
    pub format_kind: dnnl_format_kind_t,
    pub format_desc: dnnl_memory_desc_t__bindgen_ty_1,
    pub extra: dnnl_memory_extra_desc_t,
}

Memory descriptor. The description is based on a number of dimensions, dimensions themselves, plus information about elements type and memory format. Additionally, contains format-specific descriptions of the data layout.

Fields

ndims: c_int

Number of dimensions

dims: dnnl_dims_t

Dimensions in the following order:

  • CNN data tensors: mini-batch, channel, spatial ({N, C, [[D,] H,] W})
  • CNN weight tensors: group (optional), output channel, input channel, spatial ({[G,] O, I, [[D,] H,] W})
  • RNN data tensors: time, mini-batch, channels ({T, N, C}) or layers, directions, states, mini-batch, channels ({L, D, S, N, C})
  • RNN weight tensor: layers, directions, input channel, gates, output channels ({L, D, I, G, O}).

@note The order of dimensions does not depend on the memory format, so whether the data is laid out in #dnnl_nchw or #dnnl_nhwc the dims for 4D CN data tensor would be {N, C, H, W}.

data_type: dnnl_data_type_t

Data type of the tensor elements.

padded_dims: dnnl_dims_t

Size of the data including padding in each dimension.

padded_offsets: dnnl_dims_t

Per-dimension offset from the padding to actual data, the top-level tensor with offsets applied must lie within the padding area.

offset0: dnnl_dim_t

Offset from memory origin to the current block, non-zero only in a description of a memory sub-block.

format_kind: dnnl_format_kind_t

Memory format kind.

format_desc: dnnl_memory_desc_t__bindgen_ty_1extra: dnnl_memory_extra_desc_t

Trait Implementations

impl Clone for dnnl_memory_desc_t[src]

impl Copy for dnnl_memory_desc_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.