oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0

A primitive to copy data between two memory objects. More...

Classes

struct  dnnl::reorder
 Reorder primitive. More...
 

Functions

dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create (dnnl_primitive_desc_t *reorder_primitive_desc, const dnnl_memory_desc_t *src_desc, dnnl_engine_t src_engine, const dnnl_memory_desc_t *dst_desc, dnnl_engine_t dst_engine, const_dnnl_primitive_attr_t attr)
 Creates a primitive descriptor for a reorder primitive. More...
 

Detailed Description

A primitive to copy data between two memory objects.

This primitive is typically used to change the way the data is laid out in memory.

See also
Reorder in developer guide

Function Documentation

◆ dnnl_reorder_primitive_desc_create()

dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create ( dnnl_primitive_desc_t reorder_primitive_desc,
const dnnl_memory_desc_t src_desc,
dnnl_engine_t  src_engine,
const dnnl_memory_desc_t dst_desc,
dnnl_engine_t  dst_engine,
const_dnnl_primitive_attr_t  attr 
)

Creates a primitive descriptor for a reorder primitive.

Parameters
reorder_primitive_descOutput primitive descriptor.
src_descSource memory descriptor.
src_engineEngine on which the source memory object will be located.
dst_descDestination memory descriptor.
dst_engineEngine on which the destination memory object will be located.
attrPrimitive attributes to use (can be NULL).
Returns
dnnl_success on success and a status describing the error otherwise.
Examples:
cnn_inference_f32.c, cpu_cnn_training_f32.c, and cross_engine_reorder.c.