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

Method element

src/argument.cpp:210–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210argument argument::element(std::size_t i) const
211{
212 assert(this->get_shape().sub_shapes().empty());
213 auto idx = this->get_shape().index(i);
214 auto offset = this->get_shape().type_size() * idx;
215 return argument{shape{this->get_shape().type()}, this->data() + offset};
216}
217
218void save_argument(const argument& a, const std::string& filename)
219{

Callers 1

computeMethod · 0.80

Calls 6

dataMethod · 0.95
type_sizeMethod · 0.80
emptyMethod · 0.45
get_shapeMethod · 0.45
indexMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected