clDNN
cldnn::reorder Struct Reference

Changes how data is ordered in memory. Value type is not changed & all information is preserved. More...

#include <reorder.hpp>

Inheritance diagram for cldnn::reorder:
Collaboration diagram for cldnn::reorder:

Public Types

typedef cldnn_reorder_desc dto
 

Public Member Functions

 reorder (const primitive_id &id, const primitive_id &input, const layout &output_layout, const std::vector< float > &values_to_subtract={})
 Constructs reorder primitive with directly provided mean subtract values. More...
 
 reorder (const primitive_id &id, const primitive_id &input, const layout &output_layout, primitive_id const &mean)
 Constructs reorder primitive which takes mean subtract values from another primitive. More...
 
 reorder (const primitive_id &id, const primitive_id &input, format output_format, data_types output_data_type, const std::vector< float > &values_to_subtract={}, const padding &output_padding=padding())
 Constructs reorder primitive with directly provided mean subtract values. More...
 
 reorder (const primitive_id &id, const primitive_id &input, format output_format, data_types output_data_type, primitive_id const &mean, const padding &output_padding=padding())
 Constructs reorder primitive which takes mean subtract values from another primitive. More...
 
 reorder (const dto *dto)
 Constructs a copy from basic C API cldnn_reorder_desc.
 
- Public Member Functions inherited from cldnn::primitive_base< reorder, cldnn_reorder_desc >
const cldnn_primitive_descget_dto () const override
 Returns pointer to a C API primitive descriptor casted to cldnn_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive
 primitive (const primitive_type_id &type, const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive (const cldnn_primitive_desc *dto)
 Constructs a copy from basic C API cldnn_primitive_desc.
 
std::vector< std::reference_wrapper< primitive_id > > dependecies ()
 Returns references to all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
std::vector< primitive_iddependecies () const
 Returns copy of all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
 operator primitive_id () const
 Implicit conversion to primiitive id.
 

Static Public Member Functions

static primitive_type_id type_id ()
 

Public Attributes

format output_format
 Requested memory format.
 
data_types output_data_type
 Requested memory data type.
 
primitive_id mean
 Primitive id to get mean subtract values. Ignored if subtract_per_featrue is set.
 
std::vector< float > subtract_per_feature
 Array of mean subtract values.
 
- Public Attributes inherited from cldnn::primitive
const primitive_type_id type
 Primitive's type id.
 
const primitive_id id
 Primitive's id.
 
fixed_size_vector_ref input
 List of ids of input primitives.
 
padding output_padding
 Requested output padding.
 

Protected Member Functions

std::vector< std::reference_wrapper< const primitive_id > > get_dependencies () const override
 
void update_dto (dto &dto) const override
 
- Protected Member Functions inherited from cldnn::primitive_base< reorder, cldnn_reorder_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_reorder_desc *dto)
 

Additional Inherited Members

- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

Changes how data is ordered in memory. Value type is not changed & all information is preserved.

Corresponding values are bitwise equal before/after reorder. Also merged with subtraction layer, which can subtract values while doing reordering. NOTE THAT THIS WILL SUBTRACT THE SAME VALUES FROM EACH BATCH.

Definition at line 36 of file reorder.hpp.

Constructor & Destructor Documentation

◆ reorder() [1/4]

cldnn::reorder::reorder ( const primitive_id id,
const primitive_id input,
const layout output_layout,
const std::vector< float > &  values_to_subtract = {} 
)
inline

Constructs reorder primitive with directly provided mean subtract values.

Parameters
idThis primitive id.
inputInput primitive id.
output_layoutRequested memory layout.
values_to_subtractArray of mean subtract values.

Definition at line 45 of file reorder.hpp.

◆ reorder() [2/4]

cldnn::reorder::reorder ( const primitive_id id,
const primitive_id input,
const layout output_layout,
primitive_id const &  mean 
)
inline

Constructs reorder primitive which takes mean subtract values from another primitive.

Parameters
idThis primitive id.
inputInput primitive id.
output_layoutRequested memory layout.
meanPrimitive id to get mean subtract values.

Definition at line 64 of file reorder.hpp.

◆ reorder() [3/4]

cldnn::reorder::reorder ( const primitive_id id,
const primitive_id input,
format  output_format,
data_types  output_data_type,
const std::vector< float > &  values_to_subtract = {},
const padding output_padding = padding() 
)
inline

Constructs reorder primitive with directly provided mean subtract values.

Parameters
idThis primitive id.
inputInput primitive id.
output_layoutRequested memory layout.
values_to_subtractArray of mean subtract values.

Definition at line 83 of file reorder.hpp.

◆ reorder() [4/4]

cldnn::reorder::reorder ( const primitive_id id,
const primitive_id input,
format  output_format,
data_types  output_data_type,
primitive_id const &  mean,
const padding output_padding = padding() 
)
inline

Constructs reorder primitive which takes mean subtract values from another primitive.

Parameters
idThis primitive id.
inputInput primitive id.
output_layoutRequested memory layout.
meanPrimitive id to get mean subtract values.

Definition at line 104 of file reorder.hpp.


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