MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ShapeTree

Method ShapeTree

tensorflow/compiler/xla/shape_tree.h:484–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482
483template <typename T>
484ShapeTree<T>::ShapeTree(Shape shape)
485 : shape_storage_(std::make_shared<Shape>(std::move(shape))),
486 shape_(shape_storage_.get()) {
487 const int64 count = CountSubshapes(*shape_);
488 nodes_.reserve(count);
489 nodes_.emplace_back(ShapeIndex{});
490
491 index_table_.reserve(count);
492 index_table_.emplace_back(Index{0, 1});
493 InitChildren(*shape_, &nodes_[0], &index_table_[0]);
494}
495
496template <typename T>
497ShapeTree<T>::ShapeTree(const Shape* shape) : shape_(shape) {

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
reserveMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected