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

Method MoveIntoTuple

tensorflow/compiler/xla/literal.cc:1346–1359  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

1344}
1345
1346/* static */ Literal MutableLiteralBase::MoveIntoTuple(
1347 absl::Span<Literal> elements) {
1348 std::vector<Shape> element_shapes;
1349 for (const Literal& element : elements) {
1350 element_shapes.push_back(element.shape());
1351 }
1352 Literal literal(ShapeUtil::MakeTupleShape(element_shapes),
1353 /*allocate_arrays=*/false);
1354 for (int i = 0; i < elements.size(); ++i) {
1355 TF_CHECK_OK(
1356 literal.MoveFrom(std::move(elements[i]), /*dest_shape_index=*/{i}));
1357 }
1358 return literal;
1359}
1360
1361template <typename NativeT>
1362bool LiteralBase::Piece::EqualElementsInternal(

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.45
shapeMethod · 0.45
sizeMethod · 0.45
MoveFromMethod · 0.45

Tested by

no test coverage detected