| 560 | } |
| 561 | |
| 562 | void MutableLiteralBase::PopulateR1(const tensorflow::core::Bitmap& values) { |
| 563 | CHECK(shape().IsArray()); |
| 564 | CHECK_EQ(shape().rank(), 1); |
| 565 | CHECK_EQ(element_count(), values.bits()); |
| 566 | CHECK_EQ(shape().element_type(), PRED); |
| 567 | for (int64 i = 0; i < static_cast<int64>(values.bits()); ++i) { |
| 568 | Set({i}, values.get(i)); |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | Literal LiteralBase::Relayout(const Layout& new_layout, |
| 573 | const ShapeIndex& shape_index) const { |