| 1042 | |
| 1043 | template <typename NativeT> |
| 1044 | void MutableLiteralBase::PopulateWithValue(NativeT value) { |
| 1045 | CHECK(shape().IsArray()); |
| 1046 | CHECK_EQ(shape().element_type(), |
| 1047 | primitive_util::NativeToPrimitiveType<NativeT>()); |
| 1048 | for (NativeT& element : data<NativeT>()) { |
| 1049 | element = value; |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | template <typename NativeT> |
| 1054 | Literal LiteralBase::Replicate(int64 times) const { |