org.tensorflow.framework.CostGraphDef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto Show documentation
Show all versions of proto Show documentation
Java API for TensorFlow protocol buffers.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/framework/cost_graph.proto
package org.tensorflow.framework;
/**
* Protobuf type {@code tensorflow.CostGraphDef}
*/
public final class CostGraphDef extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef)
CostGraphDefOrBuilder {
// Use CostGraphDef.newBuilder() to construct.
private CostGraphDef(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CostGraphDef() {
node_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private CostGraphDef(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
node_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
node_.add(
input.readMessage(org.tensorflow.framework.CostGraphDef.Node.parser(), extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
node_ = java.util.Collections.unmodifiableList(node_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.class, org.tensorflow.framework.CostGraphDef.Builder.class);
}
public interface NodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
java.lang.String getDevice();
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
com.google.protobuf.ByteString
getDeviceBytes();
/**
*
* The id of the node. Node ids are only unique inside a partition.
*
*
* int32 id = 3;
*/
int getId();
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
java.util.List
getInputInfoList();
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
org.tensorflow.framework.CostGraphDef.Node.InputInfo getInputInfo(int index);
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
int getInputInfoCount();
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
java.util.List extends org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder>
getInputInfoOrBuilderList();
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
int index);
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
java.util.List
getOutputInfoList();
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
org.tensorflow.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index);
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
int getOutputInfoCount();
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
java.util.List extends org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder>
getOutputInfoOrBuilderList();
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
int index);
/**
*
* Temporary memory used by this node.
*
*
* int64 temporary_memory_size = 6;
*/
long getTemporaryMemorySize();
/**
* int64 host_temp_memory_size = 10;
*/
long getHostTempMemorySize();
/**
* int64 device_temp_memory_size = 11;
*/
long getDeviceTempMemorySize();
/**
* int64 host_persistent_memory_size = 12;
*/
long getHostPersistentMemorySize();
/**
* int64 device_persistent_memory_size = 16;
*/
long getDevicePersistentMemorySize();
/**
*
* Estimate of the computational cost of this node, in microseconds.
*
*
* int64 compute_cost = 9;
*/
long getComputeCost();
/**
*
* Analytical estimate of the computational cost of this node, in
* microseconds.
*
*
* int64 compute_time = 14;
*/
long getComputeTime();
/**
*
* Analytical estimate of the memory access cost of this node, in
* microseconds.
*
*
* int64 memory_time = 15;
*/
long getMemoryTime();
/**
*
* If true, the output is permanent: it can't be discarded, because this
* node is part of the "final output". Nodes may depend on final nodes.
*
*
* bool is_final = 7;
*/
boolean getIsFinal();
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
java.util.List getControlInputList();
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
int getControlInputCount();
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
int getControlInput(int index);
}
/**
* Protobuf type {@code tensorflow.CostGraphDef.Node}
*/
public static final class Node extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node)
NodeOrBuilder {
// Use Node.newBuilder() to construct.
private Node(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Node() {
name_ = "";
device_ = "";
id_ = 0;
inputInfo_ = java.util.Collections.emptyList();
outputInfo_ = java.util.Collections.emptyList();
temporaryMemorySize_ = 0L;
hostTempMemorySize_ = 0L;
deviceTempMemorySize_ = 0L;
hostPersistentMemorySize_ = 0L;
devicePersistentMemorySize_ = 0L;
computeCost_ = 0L;
computeTime_ = 0L;
memoryTime_ = 0L;
isFinal_ = false;
controlInput_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Node(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
device_ = s;
break;
}
case 24: {
id_ = input.readInt32();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
inputInfo_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
inputInfo_.add(
input.readMessage(org.tensorflow.framework.CostGraphDef.Node.InputInfo.parser(), extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
outputInfo_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
outputInfo_.add(
input.readMessage(org.tensorflow.framework.CostGraphDef.Node.OutputInfo.parser(), extensionRegistry));
break;
}
case 48: {
temporaryMemorySize_ = input.readInt64();
break;
}
case 56: {
isFinal_ = input.readBool();
break;
}
case 64: {
if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
controlInput_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00004000;
}
controlInput_.add(input.readInt32());
break;
}
case 66: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00004000) == 0x00004000) && input.getBytesUntilLimit() > 0) {
controlInput_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00004000;
}
while (input.getBytesUntilLimit() > 0) {
controlInput_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
case 72: {
computeCost_ = input.readInt64();
break;
}
case 80: {
hostTempMemorySize_ = input.readInt64();
break;
}
case 88: {
deviceTempMemorySize_ = input.readInt64();
break;
}
case 96: {
hostPersistentMemorySize_ = input.readInt64();
break;
}
case 112: {
computeTime_ = input.readInt64();
break;
}
case 120: {
memoryTime_ = input.readInt64();
break;
}
case 128: {
devicePersistentMemorySize_ = input.readInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_);
}
if (((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
controlInput_ = java.util.Collections.unmodifiableList(controlInput_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.class, org.tensorflow.framework.CostGraphDef.Node.Builder.class);
}
public interface InputInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.InputInfo)
com.google.protobuf.MessageOrBuilder {
/**
* int32 preceding_node = 1;
*/
int getPrecedingNode();
/**
* int32 preceding_port = 2;
*/
int getPrecedingPort();
}
/**
*
* Inputs of this node. They must be executed before this node can be
* executed. An input is a particular output of another node, specified
* by the node id and the output index.
*
*
* Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
*/
public static final class InputInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.InputInfo)
InputInfoOrBuilder {
// Use InputInfo.newBuilder() to construct.
private InputInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InputInfo() {
precedingNode_ = 0;
precedingPort_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private InputInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
precedingNode_ = input.readInt32();
break;
}
case 16: {
precedingPort_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder.class);
}
public static final int PRECEDING_NODE_FIELD_NUMBER = 1;
private int precedingNode_;
/**
* int32 preceding_node = 1;
*/
public int getPrecedingNode() {
return precedingNode_;
}
public static final int PRECEDING_PORT_FIELD_NUMBER = 2;
private int precedingPort_;
/**
* int32 preceding_port = 2;
*/
public int getPrecedingPort() {
return precedingPort_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (precedingNode_ != 0) {
output.writeInt32(1, precedingNode_);
}
if (precedingPort_ != 0) {
output.writeInt32(2, precedingPort_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (precedingNode_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, precedingNode_);
}
if (precedingPort_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, precedingPort_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.CostGraphDef.Node.InputInfo)) {
return super.equals(obj);
}
org.tensorflow.framework.CostGraphDef.Node.InputInfo other = (org.tensorflow.framework.CostGraphDef.Node.InputInfo) obj;
boolean result = true;
result = result && (getPrecedingNode()
== other.getPrecedingNode());
result = result && (getPrecedingPort()
== other.getPrecedingPort());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PRECEDING_NODE_FIELD_NUMBER;
hash = (53 * hash) + getPrecedingNode();
hash = (37 * hash) + PRECEDING_PORT_FIELD_NUMBER;
hash = (53 * hash) + getPrecedingPort();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.CostGraphDef.Node.InputInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Inputs of this node. They must be executed before this node can be
* executed. An input is a particular output of another node, specified
* by the node id and the output index.
*
*
* Protobuf type {@code tensorflow.CostGraphDef.Node.InputInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.InputInfo)
org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.InputInfo.class, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder.class);
}
// Construct using org.tensorflow.framework.CostGraphDef.Node.InputInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
precedingNode_ = 0;
precedingPort_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_InputInfo_descriptor;
}
public org.tensorflow.framework.CostGraphDef.Node.InputInfo getDefaultInstanceForType() {
return org.tensorflow.framework.CostGraphDef.Node.InputInfo.getDefaultInstance();
}
public org.tensorflow.framework.CostGraphDef.Node.InputInfo build() {
org.tensorflow.framework.CostGraphDef.Node.InputInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.CostGraphDef.Node.InputInfo buildPartial() {
org.tensorflow.framework.CostGraphDef.Node.InputInfo result = new org.tensorflow.framework.CostGraphDef.Node.InputInfo(this);
result.precedingNode_ = precedingNode_;
result.precedingPort_ = precedingPort_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.CostGraphDef.Node.InputInfo) {
return mergeFrom((org.tensorflow.framework.CostGraphDef.Node.InputInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.CostGraphDef.Node.InputInfo other) {
if (other == org.tensorflow.framework.CostGraphDef.Node.InputInfo.getDefaultInstance()) return this;
if (other.getPrecedingNode() != 0) {
setPrecedingNode(other.getPrecedingNode());
}
if (other.getPrecedingPort() != 0) {
setPrecedingPort(other.getPrecedingPort());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.CostGraphDef.Node.InputInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.CostGraphDef.Node.InputInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int precedingNode_ ;
/**
* int32 preceding_node = 1;
*/
public int getPrecedingNode() {
return precedingNode_;
}
/**
* int32 preceding_node = 1;
*/
public Builder setPrecedingNode(int value) {
precedingNode_ = value;
onChanged();
return this;
}
/**
* int32 preceding_node = 1;
*/
public Builder clearPrecedingNode() {
precedingNode_ = 0;
onChanged();
return this;
}
private int precedingPort_ ;
/**
* int32 preceding_port = 2;
*/
public int getPrecedingPort() {
return precedingPort_;
}
/**
* int32 preceding_port = 2;
*/
public Builder setPrecedingPort(int value) {
precedingPort_ = value;
onChanged();
return this;
}
/**
* int32 preceding_port = 2;
*/
public Builder clearPrecedingPort() {
precedingPort_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.InputInfo)
}
// @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node.InputInfo)
private static final org.tensorflow.framework.CostGraphDef.Node.InputInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.CostGraphDef.Node.InputInfo();
}
public static org.tensorflow.framework.CostGraphDef.Node.InputInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public InputInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InputInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.CostGraphDef.Node.InputInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OutputInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.CostGraphDef.Node.OutputInfo)
com.google.protobuf.MessageOrBuilder {
/**
* int64 size = 1;
*/
long getSize();
/**
*
* If >= 0, the output is an alias of an input. Note that an alias input
* may itself be an alias. The algorithm will therefore need to follow
* those pointers.
*
*
* int64 alias_input_port = 2;
*/
long getAliasInputPort();
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
boolean hasShape();
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
org.tensorflow.framework.TensorShapeProto getShape();
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder();
/**
* .tensorflow.DataType dtype = 4;
*/
int getDtypeValue();
/**
* .tensorflow.DataType dtype = 4;
*/
org.tensorflow.framework.DataType getDtype();
}
/**
*
* Outputs of this node.
*
*
* Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
*/
public static final class OutputInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.CostGraphDef.Node.OutputInfo)
OutputInfoOrBuilder {
// Use OutputInfo.newBuilder() to construct.
private OutputInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OutputInfo() {
size_ = 0L;
aliasInputPort_ = 0L;
dtype_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private OutputInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
size_ = input.readInt64();
break;
}
case 16: {
aliasInputPort_ = input.readInt64();
break;
}
case 26: {
org.tensorflow.framework.TensorShapeProto.Builder subBuilder = null;
if (shape_ != null) {
subBuilder = shape_.toBuilder();
}
shape_ = input.readMessage(org.tensorflow.framework.TensorShapeProto.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(shape_);
shape_ = subBuilder.buildPartial();
}
break;
}
case 32: {
int rawValue = input.readEnum();
dtype_ = rawValue;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder.class);
}
public static final int SIZE_FIELD_NUMBER = 1;
private long size_;
/**
* int64 size = 1;
*/
public long getSize() {
return size_;
}
public static final int ALIAS_INPUT_PORT_FIELD_NUMBER = 2;
private long aliasInputPort_;
/**
*
* If >= 0, the output is an alias of an input. Note that an alias input
* may itself be an alias. The algorithm will therefore need to follow
* those pointers.
*
*
* int64 alias_input_port = 2;
*/
public long getAliasInputPort() {
return aliasInputPort_;
}
public static final int SHAPE_FIELD_NUMBER = 3;
private org.tensorflow.framework.TensorShapeProto shape_;
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public boolean hasShape() {
return shape_ != null;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
return getShape();
}
public static final int DTYPE_FIELD_NUMBER = 4;
private int dtype_;
/**
* .tensorflow.DataType dtype = 4;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 4;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (size_ != 0L) {
output.writeInt64(1, size_);
}
if (aliasInputPort_ != 0L) {
output.writeInt64(2, aliasInputPort_);
}
if (shape_ != null) {
output.writeMessage(3, getShape());
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
output.writeEnum(4, dtype_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, size_);
}
if (aliasInputPort_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, aliasInputPort_);
}
if (shape_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getShape());
}
if (dtype_ != org.tensorflow.framework.DataType.DT_INVALID.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, dtype_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.CostGraphDef.Node.OutputInfo)) {
return super.equals(obj);
}
org.tensorflow.framework.CostGraphDef.Node.OutputInfo other = (org.tensorflow.framework.CostGraphDef.Node.OutputInfo) obj;
boolean result = true;
result = result && (getSize()
== other.getSize());
result = result && (getAliasInputPort()
== other.getAliasInputPort());
result = result && (hasShape() == other.hasShape());
if (hasShape()) {
result = result && getShape()
.equals(other.getShape());
}
result = result && dtype_ == other.dtype_;
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (37 * hash) + ALIAS_INPUT_PORT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAliasInputPort());
if (hasShape()) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShape().hashCode();
}
hash = (37 * hash) + DTYPE_FIELD_NUMBER;
hash = (53 * hash) + dtype_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.CostGraphDef.Node.OutputInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Outputs of this node.
*
*
* Protobuf type {@code tensorflow.CostGraphDef.Node.OutputInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node.OutputInfo)
org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.OutputInfo.class, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder.class);
}
// Construct using org.tensorflow.framework.CostGraphDef.Node.OutputInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
size_ = 0L;
aliasInputPort_ = 0L;
if (shapeBuilder_ == null) {
shape_ = null;
} else {
shape_ = null;
shapeBuilder_ = null;
}
dtype_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_OutputInfo_descriptor;
}
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo getDefaultInstanceForType() {
return org.tensorflow.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance();
}
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo build() {
org.tensorflow.framework.CostGraphDef.Node.OutputInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo buildPartial() {
org.tensorflow.framework.CostGraphDef.Node.OutputInfo result = new org.tensorflow.framework.CostGraphDef.Node.OutputInfo(this);
result.size_ = size_;
result.aliasInputPort_ = aliasInputPort_;
if (shapeBuilder_ == null) {
result.shape_ = shape_;
} else {
result.shape_ = shapeBuilder_.build();
}
result.dtype_ = dtype_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.CostGraphDef.Node.OutputInfo) {
return mergeFrom((org.tensorflow.framework.CostGraphDef.Node.OutputInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.CostGraphDef.Node.OutputInfo other) {
if (other == org.tensorflow.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance()) return this;
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (other.getAliasInputPort() != 0L) {
setAliasInputPort(other.getAliasInputPort());
}
if (other.hasShape()) {
mergeShape(other.getShape());
}
if (other.dtype_ != 0) {
setDtypeValue(other.getDtypeValue());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.CostGraphDef.Node.OutputInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.CostGraphDef.Node.OutputInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long size_ ;
/**
* int64 size = 1;
*/
public long getSize() {
return size_;
}
/**
* int64 size = 1;
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* int64 size = 1;
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private long aliasInputPort_ ;
/**
*
* If >= 0, the output is an alias of an input. Note that an alias input
* may itself be an alias. The algorithm will therefore need to follow
* those pointers.
*
*
* int64 alias_input_port = 2;
*/
public long getAliasInputPort() {
return aliasInputPort_;
}
/**
*
* If >= 0, the output is an alias of an input. Note that an alias input
* may itself be an alias. The algorithm will therefore need to follow
* those pointers.
*
*
* int64 alias_input_port = 2;
*/
public Builder setAliasInputPort(long value) {
aliasInputPort_ = value;
onChanged();
return this;
}
/**
*
* If >= 0, the output is an alias of an input. Note that an alias input
* may itself be an alias. The algorithm will therefore need to follow
* those pointers.
*
*
* int64 alias_input_port = 2;
*/
public Builder clearAliasInputPort() {
aliasInputPort_ = 0L;
onChanged();
return this;
}
private org.tensorflow.framework.TensorShapeProto shape_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder> shapeBuilder_;
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public boolean hasShape() {
return shapeBuilder_ != null || shape_ != null;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public org.tensorflow.framework.TensorShapeProto getShape() {
if (shapeBuilder_ == null) {
return shape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
} else {
return shapeBuilder_.getMessage();
}
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public Builder setShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
shape_ = value;
onChanged();
} else {
shapeBuilder_.setMessage(value);
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public Builder setShape(
org.tensorflow.framework.TensorShapeProto.Builder builderForValue) {
if (shapeBuilder_ == null) {
shape_ = builderForValue.build();
onChanged();
} else {
shapeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public Builder mergeShape(org.tensorflow.framework.TensorShapeProto value) {
if (shapeBuilder_ == null) {
if (shape_ != null) {
shape_ =
org.tensorflow.framework.TensorShapeProto.newBuilder(shape_).mergeFrom(value).buildPartial();
} else {
shape_ = value;
}
onChanged();
} else {
shapeBuilder_.mergeFrom(value);
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public Builder clearShape() {
if (shapeBuilder_ == null) {
shape_ = null;
onChanged();
} else {
shape_ = null;
shapeBuilder_ = null;
}
return this;
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public org.tensorflow.framework.TensorShapeProto.Builder getShapeBuilder() {
onChanged();
return getShapeFieldBuilder().getBuilder();
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
public org.tensorflow.framework.TensorShapeProtoOrBuilder getShapeOrBuilder() {
if (shapeBuilder_ != null) {
return shapeBuilder_.getMessageOrBuilder();
} else {
return shape_ == null ?
org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : shape_;
}
}
/**
* .tensorflow.TensorShapeProto shape = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>
getShapeFieldBuilder() {
if (shapeBuilder_ == null) {
shapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.framework.TensorShapeProto, org.tensorflow.framework.TensorShapeProto.Builder, org.tensorflow.framework.TensorShapeProtoOrBuilder>(
getShape(),
getParentForChildren(),
isClean());
shape_ = null;
}
return shapeBuilder_;
}
private int dtype_ = 0;
/**
* .tensorflow.DataType dtype = 4;
*/
public int getDtypeValue() {
return dtype_;
}
/**
* .tensorflow.DataType dtype = 4;
*/
public Builder setDtypeValue(int value) {
dtype_ = value;
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 4;
*/
public org.tensorflow.framework.DataType getDtype() {
org.tensorflow.framework.DataType result = org.tensorflow.framework.DataType.valueOf(dtype_);
return result == null ? org.tensorflow.framework.DataType.UNRECOGNIZED : result;
}
/**
* .tensorflow.DataType dtype = 4;
*/
public Builder setDtype(org.tensorflow.framework.DataType value) {
if (value == null) {
throw new NullPointerException();
}
dtype_ = value.getNumber();
onChanged();
return this;
}
/**
* .tensorflow.DataType dtype = 4;
*/
public Builder clearDtype() {
dtype_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node.OutputInfo)
}
// @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node.OutputInfo)
private static final org.tensorflow.framework.CostGraphDef.Node.OutputInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.CostGraphDef.Node.OutputInfo();
}
public static org.tensorflow.framework.CostGraphDef.Node.OutputInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public OutputInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OutputInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEVICE_FIELD_NUMBER = 2;
private volatile java.lang.Object device_;
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public java.lang.String getDevice() {
java.lang.Object ref = device_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
device_ = s;
return s;
}
}
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public com.google.protobuf.ByteString
getDeviceBytes() {
java.lang.Object ref = device_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
device_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 3;
private int id_;
/**
*
* The id of the node. Node ids are only unique inside a partition.
*
*
* int32 id = 3;
*/
public int getId() {
return id_;
}
public static final int INPUT_INFO_FIELD_NUMBER = 4;
private java.util.List inputInfo_;
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public java.util.List getInputInfoList() {
return inputInfo_;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder>
getInputInfoOrBuilderList() {
return inputInfo_;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public int getInputInfoCount() {
return inputInfo_.size();
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) {
return inputInfo_.get(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
int index) {
return inputInfo_.get(index);
}
public static final int OUTPUT_INFO_FIELD_NUMBER = 5;
private java.util.List outputInfo_;
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public java.util.List getOutputInfoList() {
return outputInfo_;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder>
getOutputInfoOrBuilderList() {
return outputInfo_;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public int getOutputInfoCount() {
return outputInfo_.size();
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) {
return outputInfo_.get(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
int index) {
return outputInfo_.get(index);
}
public static final int TEMPORARY_MEMORY_SIZE_FIELD_NUMBER = 6;
private long temporaryMemorySize_;
/**
*
* Temporary memory used by this node.
*
*
* int64 temporary_memory_size = 6;
*/
public long getTemporaryMemorySize() {
return temporaryMemorySize_;
}
public static final int HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER = 10;
private long hostTempMemorySize_;
/**
* int64 host_temp_memory_size = 10;
*/
public long getHostTempMemorySize() {
return hostTempMemorySize_;
}
public static final int DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER = 11;
private long deviceTempMemorySize_;
/**
* int64 device_temp_memory_size = 11;
*/
public long getDeviceTempMemorySize() {
return deviceTempMemorySize_;
}
public static final int HOST_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 12;
private long hostPersistentMemorySize_;
/**
* int64 host_persistent_memory_size = 12;
*/
public long getHostPersistentMemorySize() {
return hostPersistentMemorySize_;
}
public static final int DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER = 16;
private long devicePersistentMemorySize_;
/**
* int64 device_persistent_memory_size = 16;
*/
public long getDevicePersistentMemorySize() {
return devicePersistentMemorySize_;
}
public static final int COMPUTE_COST_FIELD_NUMBER = 9;
private long computeCost_;
/**
*
* Estimate of the computational cost of this node, in microseconds.
*
*
* int64 compute_cost = 9;
*/
public long getComputeCost() {
return computeCost_;
}
public static final int COMPUTE_TIME_FIELD_NUMBER = 14;
private long computeTime_;
/**
*
* Analytical estimate of the computational cost of this node, in
* microseconds.
*
*
* int64 compute_time = 14;
*/
public long getComputeTime() {
return computeTime_;
}
public static final int MEMORY_TIME_FIELD_NUMBER = 15;
private long memoryTime_;
/**
*
* Analytical estimate of the memory access cost of this node, in
* microseconds.
*
*
* int64 memory_time = 15;
*/
public long getMemoryTime() {
return memoryTime_;
}
public static final int IS_FINAL_FIELD_NUMBER = 7;
private boolean isFinal_;
/**
*
* If true, the output is permanent: it can't be discarded, because this
* node is part of the "final output". Nodes may depend on final nodes.
*
*
* bool is_final = 7;
*/
public boolean getIsFinal() {
return isFinal_;
}
public static final int CONTROL_INPUT_FIELD_NUMBER = 8;
private java.util.List controlInput_;
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public java.util.List
getControlInputList() {
return controlInput_;
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public int getControlInputCount() {
return controlInput_.size();
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public int getControlInput(int index) {
return controlInput_.get(index);
}
private int controlInputMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getDeviceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, device_);
}
if (id_ != 0) {
output.writeInt32(3, id_);
}
for (int i = 0; i < inputInfo_.size(); i++) {
output.writeMessage(4, inputInfo_.get(i));
}
for (int i = 0; i < outputInfo_.size(); i++) {
output.writeMessage(5, outputInfo_.get(i));
}
if (temporaryMemorySize_ != 0L) {
output.writeInt64(6, temporaryMemorySize_);
}
if (isFinal_ != false) {
output.writeBool(7, isFinal_);
}
if (getControlInputList().size() > 0) {
output.writeUInt32NoTag(66);
output.writeUInt32NoTag(controlInputMemoizedSerializedSize);
}
for (int i = 0; i < controlInput_.size(); i++) {
output.writeInt32NoTag(controlInput_.get(i));
}
if (computeCost_ != 0L) {
output.writeInt64(9, computeCost_);
}
if (hostTempMemorySize_ != 0L) {
output.writeInt64(10, hostTempMemorySize_);
}
if (deviceTempMemorySize_ != 0L) {
output.writeInt64(11, deviceTempMemorySize_);
}
if (hostPersistentMemorySize_ != 0L) {
output.writeInt64(12, hostPersistentMemorySize_);
}
if (computeTime_ != 0L) {
output.writeInt64(14, computeTime_);
}
if (memoryTime_ != 0L) {
output.writeInt64(15, memoryTime_);
}
if (devicePersistentMemorySize_ != 0L) {
output.writeInt64(16, devicePersistentMemorySize_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getDeviceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, device_);
}
if (id_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, id_);
}
for (int i = 0; i < inputInfo_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, inputInfo_.get(i));
}
for (int i = 0; i < outputInfo_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, outputInfo_.get(i));
}
if (temporaryMemorySize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, temporaryMemorySize_);
}
if (isFinal_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, isFinal_);
}
{
int dataSize = 0;
for (int i = 0; i < controlInput_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(controlInput_.get(i));
}
size += dataSize;
if (!getControlInputList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
controlInputMemoizedSerializedSize = dataSize;
}
if (computeCost_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(9, computeCost_);
}
if (hostTempMemorySize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, hostTempMemorySize_);
}
if (deviceTempMemorySize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, deviceTempMemorySize_);
}
if (hostPersistentMemorySize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(12, hostPersistentMemorySize_);
}
if (computeTime_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(14, computeTime_);
}
if (memoryTime_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(15, memoryTime_);
}
if (devicePersistentMemorySize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(16, devicePersistentMemorySize_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.CostGraphDef.Node)) {
return super.equals(obj);
}
org.tensorflow.framework.CostGraphDef.Node other = (org.tensorflow.framework.CostGraphDef.Node) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getDevice()
.equals(other.getDevice());
result = result && (getId()
== other.getId());
result = result && getInputInfoList()
.equals(other.getInputInfoList());
result = result && getOutputInfoList()
.equals(other.getOutputInfoList());
result = result && (getTemporaryMemorySize()
== other.getTemporaryMemorySize());
result = result && (getHostTempMemorySize()
== other.getHostTempMemorySize());
result = result && (getDeviceTempMemorySize()
== other.getDeviceTempMemorySize());
result = result && (getHostPersistentMemorySize()
== other.getHostPersistentMemorySize());
result = result && (getDevicePersistentMemorySize()
== other.getDevicePersistentMemorySize());
result = result && (getComputeCost()
== other.getComputeCost());
result = result && (getComputeTime()
== other.getComputeTime());
result = result && (getMemoryTime()
== other.getMemoryTime());
result = result && (getIsFinal()
== other.getIsFinal());
result = result && getControlInputList()
.equals(other.getControlInputList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DEVICE_FIELD_NUMBER;
hash = (53 * hash) + getDevice().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
if (getInputInfoCount() > 0) {
hash = (37 * hash) + INPUT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getInputInfoList().hashCode();
}
if (getOutputInfoCount() > 0) {
hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getOutputInfoList().hashCode();
}
hash = (37 * hash) + TEMPORARY_MEMORY_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTemporaryMemorySize());
hash = (37 * hash) + HOST_TEMP_MEMORY_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getHostTempMemorySize());
hash = (37 * hash) + DEVICE_TEMP_MEMORY_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getDeviceTempMemorySize());
hash = (37 * hash) + HOST_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getHostPersistentMemorySize());
hash = (37 * hash) + DEVICE_PERSISTENT_MEMORY_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getDevicePersistentMemorySize());
hash = (37 * hash) + COMPUTE_COST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getComputeCost());
hash = (37 * hash) + COMPUTE_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getComputeTime());
hash = (37 * hash) + MEMORY_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMemoryTime());
hash = (37 * hash) + IS_FINAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsFinal());
if (getControlInputCount() > 0) {
hash = (37 * hash) + CONTROL_INPUT_FIELD_NUMBER;
hash = (53 * hash) + getControlInputList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef.Node parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.CostGraphDef.Node prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tensorflow.CostGraphDef.Node}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef.Node)
org.tensorflow.framework.CostGraphDef.NodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.Node.class, org.tensorflow.framework.CostGraphDef.Node.Builder.class);
}
// Construct using org.tensorflow.framework.CostGraphDef.Node.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getInputInfoFieldBuilder();
getOutputInfoFieldBuilder();
}
}
public Builder clear() {
super.clear();
name_ = "";
device_ = "";
id_ = 0;
if (inputInfoBuilder_ == null) {
inputInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
inputInfoBuilder_.clear();
}
if (outputInfoBuilder_ == null) {
outputInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
outputInfoBuilder_.clear();
}
temporaryMemorySize_ = 0L;
hostTempMemorySize_ = 0L;
deviceTempMemorySize_ = 0L;
hostPersistentMemorySize_ = 0L;
devicePersistentMemorySize_ = 0L;
computeCost_ = 0L;
computeTime_ = 0L;
memoryTime_ = 0L;
isFinal_ = false;
controlInput_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00004000);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_Node_descriptor;
}
public org.tensorflow.framework.CostGraphDef.Node getDefaultInstanceForType() {
return org.tensorflow.framework.CostGraphDef.Node.getDefaultInstance();
}
public org.tensorflow.framework.CostGraphDef.Node build() {
org.tensorflow.framework.CostGraphDef.Node result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.CostGraphDef.Node buildPartial() {
org.tensorflow.framework.CostGraphDef.Node result = new org.tensorflow.framework.CostGraphDef.Node(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.device_ = device_;
result.id_ = id_;
if (inputInfoBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
inputInfo_ = java.util.Collections.unmodifiableList(inputInfo_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.inputInfo_ = inputInfo_;
} else {
result.inputInfo_ = inputInfoBuilder_.build();
}
if (outputInfoBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
outputInfo_ = java.util.Collections.unmodifiableList(outputInfo_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.outputInfo_ = outputInfo_;
} else {
result.outputInfo_ = outputInfoBuilder_.build();
}
result.temporaryMemorySize_ = temporaryMemorySize_;
result.hostTempMemorySize_ = hostTempMemorySize_;
result.deviceTempMemorySize_ = deviceTempMemorySize_;
result.hostPersistentMemorySize_ = hostPersistentMemorySize_;
result.devicePersistentMemorySize_ = devicePersistentMemorySize_;
result.computeCost_ = computeCost_;
result.computeTime_ = computeTime_;
result.memoryTime_ = memoryTime_;
result.isFinal_ = isFinal_;
if (((bitField0_ & 0x00004000) == 0x00004000)) {
controlInput_ = java.util.Collections.unmodifiableList(controlInput_);
bitField0_ = (bitField0_ & ~0x00004000);
}
result.controlInput_ = controlInput_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.CostGraphDef.Node) {
return mergeFrom((org.tensorflow.framework.CostGraphDef.Node)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.CostGraphDef.Node other) {
if (other == org.tensorflow.framework.CostGraphDef.Node.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDevice().isEmpty()) {
device_ = other.device_;
onChanged();
}
if (other.getId() != 0) {
setId(other.getId());
}
if (inputInfoBuilder_ == null) {
if (!other.inputInfo_.isEmpty()) {
if (inputInfo_.isEmpty()) {
inputInfo_ = other.inputInfo_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureInputInfoIsMutable();
inputInfo_.addAll(other.inputInfo_);
}
onChanged();
}
} else {
if (!other.inputInfo_.isEmpty()) {
if (inputInfoBuilder_.isEmpty()) {
inputInfoBuilder_.dispose();
inputInfoBuilder_ = null;
inputInfo_ = other.inputInfo_;
bitField0_ = (bitField0_ & ~0x00000008);
inputInfoBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getInputInfoFieldBuilder() : null;
} else {
inputInfoBuilder_.addAllMessages(other.inputInfo_);
}
}
}
if (outputInfoBuilder_ == null) {
if (!other.outputInfo_.isEmpty()) {
if (outputInfo_.isEmpty()) {
outputInfo_ = other.outputInfo_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureOutputInfoIsMutable();
outputInfo_.addAll(other.outputInfo_);
}
onChanged();
}
} else {
if (!other.outputInfo_.isEmpty()) {
if (outputInfoBuilder_.isEmpty()) {
outputInfoBuilder_.dispose();
outputInfoBuilder_ = null;
outputInfo_ = other.outputInfo_;
bitField0_ = (bitField0_ & ~0x00000010);
outputInfoBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getOutputInfoFieldBuilder() : null;
} else {
outputInfoBuilder_.addAllMessages(other.outputInfo_);
}
}
}
if (other.getTemporaryMemorySize() != 0L) {
setTemporaryMemorySize(other.getTemporaryMemorySize());
}
if (other.getHostTempMemorySize() != 0L) {
setHostTempMemorySize(other.getHostTempMemorySize());
}
if (other.getDeviceTempMemorySize() != 0L) {
setDeviceTempMemorySize(other.getDeviceTempMemorySize());
}
if (other.getHostPersistentMemorySize() != 0L) {
setHostPersistentMemorySize(other.getHostPersistentMemorySize());
}
if (other.getDevicePersistentMemorySize() != 0L) {
setDevicePersistentMemorySize(other.getDevicePersistentMemorySize());
}
if (other.getComputeCost() != 0L) {
setComputeCost(other.getComputeCost());
}
if (other.getComputeTime() != 0L) {
setComputeTime(other.getComputeTime());
}
if (other.getMemoryTime() != 0L) {
setMemoryTime(other.getMemoryTime());
}
if (other.getIsFinal() != false) {
setIsFinal(other.getIsFinal());
}
if (!other.controlInput_.isEmpty()) {
if (controlInput_.isEmpty()) {
controlInput_ = other.controlInput_;
bitField0_ = (bitField0_ & ~0x00004000);
} else {
ensureControlInputIsMutable();
controlInput_.addAll(other.controlInput_);
}
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.CostGraphDef.Node parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.CostGraphDef.Node) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name of the node. Names are globally unique.
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object device_ = "";
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public java.lang.String getDevice() {
java.lang.Object ref = device_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
device_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public com.google.protobuf.ByteString
getDeviceBytes() {
java.lang.Object ref = device_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
device_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public Builder setDevice(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
device_ = value;
onChanged();
return this;
}
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public Builder clearDevice() {
device_ = getDefaultInstance().getDevice();
onChanged();
return this;
}
/**
*
* The device of the node. Can be empty if the node is mapped to the
* default partition or partitioning hasn't been run yet.
*
*
* string device = 2;
*/
public Builder setDeviceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
device_ = value;
onChanged();
return this;
}
private int id_ ;
/**
*
* The id of the node. Node ids are only unique inside a partition.
*
*
* int32 id = 3;
*/
public int getId() {
return id_;
}
/**
*
* The id of the node. Node ids are only unique inside a partition.
*
*
* int32 id = 3;
*/
public Builder setId(int value) {
id_ = value;
onChanged();
return this;
}
/**
*
* The id of the node. Node ids are only unique inside a partition.
*
*
* int32 id = 3;
*/
public Builder clearId() {
id_ = 0;
onChanged();
return this;
}
private java.util.List inputInfo_ =
java.util.Collections.emptyList();
private void ensureInputInfoIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
inputInfo_ = new java.util.ArrayList(inputInfo_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.InputInfo, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder> inputInfoBuilder_;
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public java.util.List getInputInfoList() {
if (inputInfoBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputInfo_);
} else {
return inputInfoBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public int getInputInfoCount() {
if (inputInfoBuilder_ == null) {
return inputInfo_.size();
} else {
return inputInfoBuilder_.getCount();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfo getInputInfo(int index) {
if (inputInfoBuilder_ == null) {
return inputInfo_.get(index);
} else {
return inputInfoBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder setInputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.InputInfo value) {
if (inputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputInfoIsMutable();
inputInfo_.set(index, value);
onChanged();
} else {
inputInfoBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder setInputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
if (inputInfoBuilder_ == null) {
ensureInputInfoIsMutable();
inputInfo_.set(index, builderForValue.build());
onChanged();
} else {
inputInfoBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder addInputInfo(org.tensorflow.framework.CostGraphDef.Node.InputInfo value) {
if (inputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputInfoIsMutable();
inputInfo_.add(value);
onChanged();
} else {
inputInfoBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder addInputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.InputInfo value) {
if (inputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputInfoIsMutable();
inputInfo_.add(index, value);
onChanged();
} else {
inputInfoBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder addInputInfo(
org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
if (inputInfoBuilder_ == null) {
ensureInputInfoIsMutable();
inputInfo_.add(builderForValue.build());
onChanged();
} else {
inputInfoBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder addInputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder builderForValue) {
if (inputInfoBuilder_ == null) {
ensureInputInfoIsMutable();
inputInfo_.add(index, builderForValue.build());
onChanged();
} else {
inputInfoBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder addAllInputInfo(
java.lang.Iterable extends org.tensorflow.framework.CostGraphDef.Node.InputInfo> values) {
if (inputInfoBuilder_ == null) {
ensureInputInfoIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, inputInfo_);
onChanged();
} else {
inputInfoBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder clearInputInfo() {
if (inputInfoBuilder_ == null) {
inputInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
inputInfoBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public Builder removeInputInfo(int index) {
if (inputInfoBuilder_ == null) {
ensureInputInfoIsMutable();
inputInfo_.remove(index);
onChanged();
} else {
inputInfoBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder getInputInfoBuilder(
int index) {
return getInputInfoFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder getInputInfoOrBuilder(
int index) {
if (inputInfoBuilder_ == null) {
return inputInfo_.get(index); } else {
return inputInfoBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder>
getInputInfoOrBuilderList() {
if (inputInfoBuilder_ != null) {
return inputInfoBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inputInfo_);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder() {
return getInputInfoFieldBuilder().addBuilder(
org.tensorflow.framework.CostGraphDef.Node.InputInfo.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder addInputInfoBuilder(
int index) {
return getInputInfoFieldBuilder().addBuilder(
index, org.tensorflow.framework.CostGraphDef.Node.InputInfo.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
*/
public java.util.List
getInputInfoBuilderList() {
return getInputInfoFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.InputInfo, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder>
getInputInfoFieldBuilder() {
if (inputInfoBuilder_ == null) {
inputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.InputInfo, org.tensorflow.framework.CostGraphDef.Node.InputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.InputInfoOrBuilder>(
inputInfo_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
inputInfo_ = null;
}
return inputInfoBuilder_;
}
private java.util.List outputInfo_ =
java.util.Collections.emptyList();
private void ensureOutputInfoIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
outputInfo_ = new java.util.ArrayList(outputInfo_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder> outputInfoBuilder_;
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public java.util.List getOutputInfoList() {
if (outputInfoBuilder_ == null) {
return java.util.Collections.unmodifiableList(outputInfo_);
} else {
return outputInfoBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public int getOutputInfoCount() {
if (outputInfoBuilder_ == null) {
return outputInfo_.size();
} else {
return outputInfoBuilder_.getCount();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo getOutputInfo(int index) {
if (outputInfoBuilder_ == null) {
return outputInfo_.get(index);
} else {
return outputInfoBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder setOutputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.OutputInfo value) {
if (outputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputInfoIsMutable();
outputInfo_.set(index, value);
onChanged();
} else {
outputInfoBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder setOutputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
if (outputInfoBuilder_ == null) {
ensureOutputInfoIsMutable();
outputInfo_.set(index, builderForValue.build());
onChanged();
} else {
outputInfoBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder addOutputInfo(org.tensorflow.framework.CostGraphDef.Node.OutputInfo value) {
if (outputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputInfoIsMutable();
outputInfo_.add(value);
onChanged();
} else {
outputInfoBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder addOutputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.OutputInfo value) {
if (outputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputInfoIsMutable();
outputInfo_.add(index, value);
onChanged();
} else {
outputInfoBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder addOutputInfo(
org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
if (outputInfoBuilder_ == null) {
ensureOutputInfoIsMutable();
outputInfo_.add(builderForValue.build());
onChanged();
} else {
outputInfoBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder addOutputInfo(
int index, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder builderForValue) {
if (outputInfoBuilder_ == null) {
ensureOutputInfoIsMutable();
outputInfo_.add(index, builderForValue.build());
onChanged();
} else {
outputInfoBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder addAllOutputInfo(
java.lang.Iterable extends org.tensorflow.framework.CostGraphDef.Node.OutputInfo> values) {
if (outputInfoBuilder_ == null) {
ensureOutputInfoIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputInfo_);
onChanged();
} else {
outputInfoBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder clearOutputInfo() {
if (outputInfoBuilder_ == null) {
outputInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
outputInfoBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public Builder removeOutputInfo(int index) {
if (outputInfoBuilder_ == null) {
ensureOutputInfoIsMutable();
outputInfo_.remove(index);
onChanged();
} else {
outputInfoBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder getOutputInfoBuilder(
int index) {
return getOutputInfoFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder getOutputInfoOrBuilder(
int index) {
if (outputInfoBuilder_ == null) {
return outputInfo_.get(index); } else {
return outputInfoBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder>
getOutputInfoOrBuilderList() {
if (outputInfoBuilder_ != null) {
return outputInfoBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputInfo_);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder() {
return getOutputInfoFieldBuilder().addBuilder(
org.tensorflow.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder addOutputInfoBuilder(
int index) {
return getOutputInfoFieldBuilder().addBuilder(
index, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
*/
public java.util.List
getOutputInfoBuilderList() {
return getOutputInfoFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder>
getOutputInfoFieldBuilder() {
if (outputInfoBuilder_ == null) {
outputInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node.OutputInfo, org.tensorflow.framework.CostGraphDef.Node.OutputInfo.Builder, org.tensorflow.framework.CostGraphDef.Node.OutputInfoOrBuilder>(
outputInfo_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
outputInfo_ = null;
}
return outputInfoBuilder_;
}
private long temporaryMemorySize_ ;
/**
*
* Temporary memory used by this node.
*
*
* int64 temporary_memory_size = 6;
*/
public long getTemporaryMemorySize() {
return temporaryMemorySize_;
}
/**
*
* Temporary memory used by this node.
*
*
* int64 temporary_memory_size = 6;
*/
public Builder setTemporaryMemorySize(long value) {
temporaryMemorySize_ = value;
onChanged();
return this;
}
/**
*
* Temporary memory used by this node.
*
*
* int64 temporary_memory_size = 6;
*/
public Builder clearTemporaryMemorySize() {
temporaryMemorySize_ = 0L;
onChanged();
return this;
}
private long hostTempMemorySize_ ;
/**
* int64 host_temp_memory_size = 10;
*/
public long getHostTempMemorySize() {
return hostTempMemorySize_;
}
/**
* int64 host_temp_memory_size = 10;
*/
public Builder setHostTempMemorySize(long value) {
hostTempMemorySize_ = value;
onChanged();
return this;
}
/**
* int64 host_temp_memory_size = 10;
*/
public Builder clearHostTempMemorySize() {
hostTempMemorySize_ = 0L;
onChanged();
return this;
}
private long deviceTempMemorySize_ ;
/**
* int64 device_temp_memory_size = 11;
*/
public long getDeviceTempMemorySize() {
return deviceTempMemorySize_;
}
/**
* int64 device_temp_memory_size = 11;
*/
public Builder setDeviceTempMemorySize(long value) {
deviceTempMemorySize_ = value;
onChanged();
return this;
}
/**
* int64 device_temp_memory_size = 11;
*/
public Builder clearDeviceTempMemorySize() {
deviceTempMemorySize_ = 0L;
onChanged();
return this;
}
private long hostPersistentMemorySize_ ;
/**
* int64 host_persistent_memory_size = 12;
*/
public long getHostPersistentMemorySize() {
return hostPersistentMemorySize_;
}
/**
* int64 host_persistent_memory_size = 12;
*/
public Builder setHostPersistentMemorySize(long value) {
hostPersistentMemorySize_ = value;
onChanged();
return this;
}
/**
* int64 host_persistent_memory_size = 12;
*/
public Builder clearHostPersistentMemorySize() {
hostPersistentMemorySize_ = 0L;
onChanged();
return this;
}
private long devicePersistentMemorySize_ ;
/**
* int64 device_persistent_memory_size = 16;
*/
public long getDevicePersistentMemorySize() {
return devicePersistentMemorySize_;
}
/**
* int64 device_persistent_memory_size = 16;
*/
public Builder setDevicePersistentMemorySize(long value) {
devicePersistentMemorySize_ = value;
onChanged();
return this;
}
/**
* int64 device_persistent_memory_size = 16;
*/
public Builder clearDevicePersistentMemorySize() {
devicePersistentMemorySize_ = 0L;
onChanged();
return this;
}
private long computeCost_ ;
/**
*
* Estimate of the computational cost of this node, in microseconds.
*
*
* int64 compute_cost = 9;
*/
public long getComputeCost() {
return computeCost_;
}
/**
*
* Estimate of the computational cost of this node, in microseconds.
*
*
* int64 compute_cost = 9;
*/
public Builder setComputeCost(long value) {
computeCost_ = value;
onChanged();
return this;
}
/**
*
* Estimate of the computational cost of this node, in microseconds.
*
*
* int64 compute_cost = 9;
*/
public Builder clearComputeCost() {
computeCost_ = 0L;
onChanged();
return this;
}
private long computeTime_ ;
/**
*
* Analytical estimate of the computational cost of this node, in
* microseconds.
*
*
* int64 compute_time = 14;
*/
public long getComputeTime() {
return computeTime_;
}
/**
*
* Analytical estimate of the computational cost of this node, in
* microseconds.
*
*
* int64 compute_time = 14;
*/
public Builder setComputeTime(long value) {
computeTime_ = value;
onChanged();
return this;
}
/**
*
* Analytical estimate of the computational cost of this node, in
* microseconds.
*
*
* int64 compute_time = 14;
*/
public Builder clearComputeTime() {
computeTime_ = 0L;
onChanged();
return this;
}
private long memoryTime_ ;
/**
*
* Analytical estimate of the memory access cost of this node, in
* microseconds.
*
*
* int64 memory_time = 15;
*/
public long getMemoryTime() {
return memoryTime_;
}
/**
*
* Analytical estimate of the memory access cost of this node, in
* microseconds.
*
*
* int64 memory_time = 15;
*/
public Builder setMemoryTime(long value) {
memoryTime_ = value;
onChanged();
return this;
}
/**
*
* Analytical estimate of the memory access cost of this node, in
* microseconds.
*
*
* int64 memory_time = 15;
*/
public Builder clearMemoryTime() {
memoryTime_ = 0L;
onChanged();
return this;
}
private boolean isFinal_ ;
/**
*
* If true, the output is permanent: it can't be discarded, because this
* node is part of the "final output". Nodes may depend on final nodes.
*
*
* bool is_final = 7;
*/
public boolean getIsFinal() {
return isFinal_;
}
/**
*
* If true, the output is permanent: it can't be discarded, because this
* node is part of the "final output". Nodes may depend on final nodes.
*
*
* bool is_final = 7;
*/
public Builder setIsFinal(boolean value) {
isFinal_ = value;
onChanged();
return this;
}
/**
*
* If true, the output is permanent: it can't be discarded, because this
* node is part of the "final output". Nodes may depend on final nodes.
*
*
* bool is_final = 7;
*/
public Builder clearIsFinal() {
isFinal_ = false;
onChanged();
return this;
}
private java.util.List controlInput_ = java.util.Collections.emptyList();
private void ensureControlInputIsMutable() {
if (!((bitField0_ & 0x00004000) == 0x00004000)) {
controlInput_ = new java.util.ArrayList(controlInput_);
bitField0_ |= 0x00004000;
}
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public java.util.List
getControlInputList() {
return java.util.Collections.unmodifiableList(controlInput_);
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public int getControlInputCount() {
return controlInput_.size();
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public int getControlInput(int index) {
return controlInput_.get(index);
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public Builder setControlInput(
int index, int value) {
ensureControlInputIsMutable();
controlInput_.set(index, value);
onChanged();
return this;
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public Builder addControlInput(int value) {
ensureControlInputIsMutable();
controlInput_.add(value);
onChanged();
return this;
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public Builder addAllControlInput(
java.lang.Iterable extends java.lang.Integer> values) {
ensureControlInputIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, controlInput_);
onChanged();
return this;
}
/**
*
* Ids of the control inputs for this node.
*
*
* repeated int32 control_input = 8;
*/
public Builder clearControlInput() {
controlInput_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef.Node)
}
// @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef.Node)
private static final org.tensorflow.framework.CostGraphDef.Node DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.CostGraphDef.Node();
}
public static org.tensorflow.framework.CostGraphDef.Node getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Node parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Node(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.CostGraphDef.Node getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NODE_FIELD_NUMBER = 1;
private java.util.List node_;
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public java.util.List getNodeList() {
return node_;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.NodeOrBuilder>
getNodeOrBuilderList() {
return node_;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public int getNodeCount() {
return node_.size();
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.Node getNode(int index) {
return node_.get(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
int index) {
return node_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < node_.size(); i++) {
output.writeMessage(1, node_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < node_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, node_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.framework.CostGraphDef)) {
return super.equals(obj);
}
org.tensorflow.framework.CostGraphDef other = (org.tensorflow.framework.CostGraphDef) obj;
boolean result = true;
result = result && getNodeList()
.equals(other.getNodeList());
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getNodeCount() > 0) {
hash = (37 * hash) + NODE_FIELD_NUMBER;
hash = (53 * hash) + getNodeList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.CostGraphDef parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.framework.CostGraphDef prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tensorflow.CostGraphDef}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.CostGraphDef)
org.tensorflow.framework.CostGraphDefOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.CostGraphDef.class, org.tensorflow.framework.CostGraphDef.Builder.class);
}
// Construct using org.tensorflow.framework.CostGraphDef.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getNodeFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (nodeBuilder_ == null) {
node_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
nodeBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.CostGraphProtos.internal_static_tensorflow_CostGraphDef_descriptor;
}
public org.tensorflow.framework.CostGraphDef getDefaultInstanceForType() {
return org.tensorflow.framework.CostGraphDef.getDefaultInstance();
}
public org.tensorflow.framework.CostGraphDef build() {
org.tensorflow.framework.CostGraphDef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.tensorflow.framework.CostGraphDef buildPartial() {
org.tensorflow.framework.CostGraphDef result = new org.tensorflow.framework.CostGraphDef(this);
int from_bitField0_ = bitField0_;
if (nodeBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
node_ = java.util.Collections.unmodifiableList(node_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.node_ = node_;
} else {
result.node_ = nodeBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.CostGraphDef) {
return mergeFrom((org.tensorflow.framework.CostGraphDef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.CostGraphDef other) {
if (other == org.tensorflow.framework.CostGraphDef.getDefaultInstance()) return this;
if (nodeBuilder_ == null) {
if (!other.node_.isEmpty()) {
if (node_.isEmpty()) {
node_ = other.node_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNodeIsMutable();
node_.addAll(other.node_);
}
onChanged();
}
} else {
if (!other.node_.isEmpty()) {
if (nodeBuilder_.isEmpty()) {
nodeBuilder_.dispose();
nodeBuilder_ = null;
node_ = other.node_;
bitField0_ = (bitField0_ & ~0x00000001);
nodeBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNodeFieldBuilder() : null;
} else {
nodeBuilder_.addAllMessages(other.node_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.CostGraphDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.CostGraphDef) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List node_ =
java.util.Collections.emptyList();
private void ensureNodeIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
node_ = new java.util.ArrayList(node_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node, org.tensorflow.framework.CostGraphDef.Node.Builder, org.tensorflow.framework.CostGraphDef.NodeOrBuilder> nodeBuilder_;
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public java.util.List getNodeList() {
if (nodeBuilder_ == null) {
return java.util.Collections.unmodifiableList(node_);
} else {
return nodeBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public int getNodeCount() {
if (nodeBuilder_ == null) {
return node_.size();
} else {
return nodeBuilder_.getCount();
}
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.Node getNode(int index) {
if (nodeBuilder_ == null) {
return node_.get(index);
} else {
return nodeBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder setNode(
int index, org.tensorflow.framework.CostGraphDef.Node value) {
if (nodeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeIsMutable();
node_.set(index, value);
onChanged();
} else {
nodeBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder setNode(
int index, org.tensorflow.framework.CostGraphDef.Node.Builder builderForValue) {
if (nodeBuilder_ == null) {
ensureNodeIsMutable();
node_.set(index, builderForValue.build());
onChanged();
} else {
nodeBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder addNode(org.tensorflow.framework.CostGraphDef.Node value) {
if (nodeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeIsMutable();
node_.add(value);
onChanged();
} else {
nodeBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder addNode(
int index, org.tensorflow.framework.CostGraphDef.Node value) {
if (nodeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeIsMutable();
node_.add(index, value);
onChanged();
} else {
nodeBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder addNode(
org.tensorflow.framework.CostGraphDef.Node.Builder builderForValue) {
if (nodeBuilder_ == null) {
ensureNodeIsMutable();
node_.add(builderForValue.build());
onChanged();
} else {
nodeBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder addNode(
int index, org.tensorflow.framework.CostGraphDef.Node.Builder builderForValue) {
if (nodeBuilder_ == null) {
ensureNodeIsMutable();
node_.add(index, builderForValue.build());
onChanged();
} else {
nodeBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder addAllNode(
java.lang.Iterable extends org.tensorflow.framework.CostGraphDef.Node> values) {
if (nodeBuilder_ == null) {
ensureNodeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, node_);
onChanged();
} else {
nodeBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder clearNode() {
if (nodeBuilder_ == null) {
node_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
nodeBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public Builder removeNode(int index) {
if (nodeBuilder_ == null) {
ensureNodeIsMutable();
node_.remove(index);
onChanged();
} else {
nodeBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.Node.Builder getNodeBuilder(
int index) {
return getNodeFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.NodeOrBuilder getNodeOrBuilder(
int index) {
if (nodeBuilder_ == null) {
return node_.get(index); } else {
return nodeBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public java.util.List extends org.tensorflow.framework.CostGraphDef.NodeOrBuilder>
getNodeOrBuilderList() {
if (nodeBuilder_ != null) {
return nodeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(node_);
}
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.Node.Builder addNodeBuilder() {
return getNodeFieldBuilder().addBuilder(
org.tensorflow.framework.CostGraphDef.Node.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public org.tensorflow.framework.CostGraphDef.Node.Builder addNodeBuilder(
int index) {
return getNodeFieldBuilder().addBuilder(
index, org.tensorflow.framework.CostGraphDef.Node.getDefaultInstance());
}
/**
* repeated .tensorflow.CostGraphDef.Node node = 1;
*/
public java.util.List
getNodeBuilderList() {
return getNodeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node, org.tensorflow.framework.CostGraphDef.Node.Builder, org.tensorflow.framework.CostGraphDef.NodeOrBuilder>
getNodeFieldBuilder() {
if (nodeBuilder_ == null) {
nodeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.CostGraphDef.Node, org.tensorflow.framework.CostGraphDef.Node.Builder, org.tensorflow.framework.CostGraphDef.NodeOrBuilder>(
node_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
node_ = null;
}
return nodeBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:tensorflow.CostGraphDef)
}
// @@protoc_insertion_point(class_scope:tensorflow.CostGraphDef)
private static final org.tensorflow.framework.CostGraphDef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.CostGraphDef();
}
public static org.tensorflow.framework.CostGraphDef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CostGraphDef parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CostGraphDef(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.tensorflow.framework.CostGraphDef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy