xla::int64 is not the same type as tensorflow::protobuf_int64 in open-source. Wrapper function that gives an int64 array slice view of a repeated int64 protobuf field.
| 174 | // Wrapper function that gives an int64 array slice view of a repeated int64 |
| 175 | // protobuf field. |
| 176 | static inline absl::Span<const int64> AsInt64Slice( |
| 177 | const tensorflow::protobuf::RepeatedField<tensorflow::protobuf_int64>& v) { |
| 178 | absl::Span<const tensorflow::protobuf_int64> slice(v); |
| 179 | return absl::Span<const int64>(reinterpret_cast<const int64*>(slice.data()), |
| 180 | slice.size()); |
| 181 | } |
| 182 | |
| 183 | // TODO(b/29771030): This nop overload was added to simplify the migration of |
| 184 | // Shape from a proto to a C++ class. Remove after class has been migrated. |