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

Method BorrowingLiteral

tensorflow/compiler/xla/literal.cc:2120–2128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2118}
2119
2120BorrowingLiteral::BorrowingLiteral(const char* src_buf_ptr, const Shape& shape)
2121 : LiteralBase(), shape_(absl::make_unique<Shape>(shape)) {
2122 CHECK(shape_->IsArray());
2123 CHECK(LayoutUtil::HasLayout(*shape_));
2124
2125 root_piece_ = Piece();
2126 root_piece_.set_buffer(const_cast<char*>(src_buf_ptr));
2127 root_piece_.set_subshape(shape_.get());
2128}
2129
2130BorrowingLiteral::BorrowingLiteral(absl::Span<const char* const> src_buf_ptrs,
2131 const Shape& shape)

Callers

nothing calls this directly

Calls 9

set_subshapeMethod · 0.80
PieceClass · 0.70
IsArrayMethod · 0.45
set_bufferMethod · 0.45
getMethod · 0.45
IsTupleMethod · 0.45
sizeMethod · 0.45
tuple_shapesMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected