Intel® Math Kernel Library 2019 Developer Reference - C

Handling Array Layouts

Note

The Deep Neural Network (DNN) component in Intel MKL is deprecated and will be removed in a future release. You can continue to use optimized functions for deep neural networks through Intel Math Kernel Library for Deep Neural Networks.

The type dnnLayout_t is a pointer to an opaque structure that describes layouts of arrays in the memory. DNN functions distinguish the following kinds of layouts:

To create a plain layout, in your application call a dnnLayoutCreate_<Data Type> function and pass to it the dimension, sizes, and strides of the array.

To create a custom layout for a resource of a DNN operation, call a dnnLayoutCreateFromPrimitive_<Data Type> function and pass to it the description of the operation and index of the resource.

In order to save and restore a layout, use dnnLayoutSerialize_<Data Type> and dnnLayoutDeserialize_<Data Type>, respectively. Use dnnLayoutSerializationBufferSize_<Data Type> to calculate the amount of memory in bytes required for serialization.

To destroy a layout, call a dnnLayoutDelete_<Data Type> function.