MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / get_data_vals

Function get_data_vals

src/tf/tf_parser.cpp:209–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208template <class T>
209static std::vector<T> get_data_vals(const google::protobuf::RepeatedField<T>& data,
210 const size_t& shape_size)
211{
212 std::vector<T> data_vals(shape_size);
213 // check if shape has enough data values given existing fields
214 if(data.size() == 1)
215 {
216 std::fill(data_vals.begin(), data_vals.end(), data[0]);
217 }
218 else
219 copy(data.begin(), data.end(), data_vals.begin());
220 return data_vals;
221}
222
223template <class T>
224static literal create_literal(shape::type_t shape_type,

Callers 1

parse_tensorMethod · 0.85

Calls 5

fillFunction · 0.50
copyFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected