19 #include "../C/split.h" 20 #include "primitive.hpp" 53 CLDNN_DECLATE_PRIMITIVE(
split)
62 const std::vector<std::pair<primitive_id, tensor> >& output_ids_offsets,
68 , _output_ids(extract_primitive_vector(output_ids_offsets))
90 std::vector<cldnn_tensor> _output_offsets;
92 void update_dto(
dto&
dto)
const override 98 static std::vector<primitive_id> extract_primitive_vector(
const std::vector<std::pair<primitive_id, tensor> >& stor)
100 std::vector<primitive_id> res;
101 for (
auto &stor_pair : stor)
102 res.push_back(stor_pair.first);
107 static std::vector<tensor> extract_tensor_vector(
const std::vector<std::pair<primitive_id, tensor> >& stor)
109 std::vector<tensor> res;
110 for (
auto &stor_pair : stor)
111 res.push_back(stor_pair.second);
116 static std::vector<tensor> tensor_arr_to_vector(
const cldnn_tensor_arr& arr)
118 std::vector<tensor> result(arr.
size);
119 for (
size_t i = 0; i < arr.
size; i++)
120 result[i] = arr.
data[i];
125 static std::vector<cldnn_tensor> tensor_arr_to_cldnn_vector(
const cldnn_tensor_arr& arr)
127 std::vector<cldnn_tensor> result(arr.
size);
128 for (
size_t i = 0; i < arr.
size; i++)
129 result[i] = arr.
data[i];
134 static std::vector<cldnn_tensor> tensor_vector_to_cldnn_vector(
const std::vector<tensor>& stor)
136 std::vector<cldnn_tensor> res;
137 res.resize(stor.size());
138 for (
size_t i = 0; i < stor.size(); ++i)
Represents data padding information.
Represents reference to an array of tensor.
std::vector< tensor > output_offsets
Array of tensors with offsets.
split(const primitive_id &id, const primitive_id &input, const std::vector< std::pair< primitive_id, tensor > > &output_ids_offsets, const padding &output_padding=padding())
Constructs split primitive.
fixed_size_vector_ref output_ids
List of output_ids.
size_t size
Size (in tensor) of the array.
const cldnn_tensor * data
Pointer to tensor array.
Performs split operation on input.
split(const dto *dto)
Constructs a copy from C API cldnn_split_desc.
cldnn_primitive_id_arr output_ids
List of output_ids.
std::string primitive_id
Unique id of a primitive within a topology.
fixed_size_vector_ref input
List of ids of input primitives.
base class for all primitives implementations.
cldnn_tensor_arr output_offsets
Array of tensors with offsets.
padding output_padding
Requested output padding.
Performs split operation on input.
Initialize fields common for all primitives.