Spaces:
Running
Running
File size: 3,264 Bytes
f4a0f22 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
// DO NOT MODIFY. GENERATED BY gen_on_device_proto_descriptors.py
#include "components/optimization_guide/core/model_execution/on_device_model_execution_proto_descriptors.h"
#include "components/optimization_guide/core/optimization_guide_util.h"
#include "base/values.h"
namespace optimization_guide {
namespace {
std::optional<proto::Value> GetProtoValue(
const google::protobuf::MessageLite& msg,
const proto::ProtoField& proto_field, int32_t index) {
if (index >= proto_field.proto_descriptors_size()) {
return std::nullopt;
}
int32_t tag_number =
proto_field.proto_descriptors(index).tag_number();
return std::nullopt;
}
std::optional<NestedMessageIterator> GetProtoRepeated(
const google::protobuf::MessageLite* msg,
const proto::ProtoField& proto_field,
int32_t index) {
if (index >= proto_field.proto_descriptors_size()) {
return std::nullopt;
}
int32_t tag_number =
proto_field.proto_descriptors(index).tag_number();
return std::nullopt;
}
std::optional<proto::Any> SetProtoValue(
const std::string& proto_name,
const proto::ProtoField& proto_field,
const std::string& value,
int32_t index) {
if (index >= proto_field.proto_descriptors_size()) {
return std::nullopt;
}
return std::nullopt;
}
} // namespace
std::optional<proto::Value> GetProtoValue(
const google::protobuf::MessageLite& msg,
const proto::ProtoField& proto_field) {
return GetProtoValue(msg, proto_field, /*index=*/0);
}
std::optional<NestedMessageIterator> GetProtoRepeated(
const google::protobuf::MessageLite* msg,
const proto::ProtoField& proto_field) {
return GetProtoRepeated(msg, proto_field, /*index=*/0);
}
std::unique_ptr<google::protobuf::MessageLite> GetProtoFromAny(
const proto::Any& msg) {
return nullptr;
}
std::optional<proto::Any> SetProtoValue(
const std::string& proto_name,
const proto::ProtoField& proto_field,
const std::string& value) {
return SetProtoValue(proto_name, proto_field, value, /*index=*/0);
}
const google::protobuf::MessageLite* NestedMessageIterator::Get() const {
NOTREACHED_IN_MIGRATION();
return nullptr;
}
std::optional<proto::Any> ConvertToAnyWrappedProto(
const base::Value& object, const std::string& type_name) {
proto::Any any;
any.set_type_url("type.googleapis.com/" + type_name);
return std::nullopt;
}
NestedMessageIterator::NestedMessageIterator(
const google::protobuf::MessageLite* parent,
int32_t tag_number,
int32_t field_size,
int32_t offset) :
parent_(parent),
tag_number_(tag_number),
field_size_(field_size),
offset_(offset) {}
} // namespace optimization_guide
|