tensorflow.tfprof.TfprofLog Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/profiler/tfprof_log.proto
package tensorflow.tfprof;
public final class TfprofLog {
private TfprofLog() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface CodeDefOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.CodeDef)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
java.util.List
getTracesList();
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
tensorflow.tfprof.TfprofLog.CodeDef.Trace getTraces(int index);
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
int getTracesCount();
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
java.util.List extends tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder>
getTracesOrBuilderList();
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder getTracesOrBuilder(
int index);
}
/**
*
* It specifies the Python callstack that creates an op.
*
*
* Protobuf type {@code tensorflow.tfprof.CodeDef}
*/
public static final class CodeDef extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.CodeDef)
CodeDefOrBuilder {
private static final long serialVersionUID = 0L;
// Use CodeDef.newBuilder() to construct.
private CodeDef(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CodeDef() {
traces_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CodeDef(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
traces_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
traces_.add(
input.readMessage(tensorflow.tfprof.TfprofLog.CodeDef.Trace.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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)) {
traces_ = java.util.Collections.unmodifiableList(traces_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.CodeDef.class, tensorflow.tfprof.TfprofLog.CodeDef.Builder.class);
}
public interface TraceOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.CodeDef.Trace)
com.google.protobuf.MessageOrBuilder {
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated java.lang.String getFile();
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated com.google.protobuf.ByteString
getFileBytes();
/**
* int64 file_id = 6;
*/
long getFileId();
/**
* int32 lineno = 2;
*/
int getLineno();
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated java.lang.String getFunction();
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated com.google.protobuf.ByteString
getFunctionBytes();
/**
* int64 function_id = 7;
*/
long getFunctionId();
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated java.lang.String getLine();
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated com.google.protobuf.ByteString
getLineBytes();
/**
* int64 line_id = 8;
*/
long getLineId();
/**
* int32 func_start_line = 5;
*/
int getFuncStartLine();
}
/**
* Protobuf type {@code tensorflow.tfprof.CodeDef.Trace}
*/
public static final class Trace extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.CodeDef.Trace)
TraceOrBuilder {
private static final long serialVersionUID = 0L;
// Use Trace.newBuilder() to construct.
private Trace(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Trace() {
file_ = "";
fileId_ = 0L;
lineno_ = 0;
function_ = "";
functionId_ = 0L;
line_ = "";
lineId_ = 0L;
funcStartLine_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Trace(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
file_ = s;
break;
}
case 16: {
lineno_ = input.readInt32();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
function_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
line_ = s;
break;
}
case 40: {
funcStartLine_ = input.readInt32();
break;
}
case 48: {
fileId_ = input.readInt64();
break;
}
case 56: {
functionId_ = input.readInt64();
break;
}
case 64: {
lineId_ = input.readInt64();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_Trace_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_Trace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.CodeDef.Trace.class, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder.class);
}
public static final int FILE_FIELD_NUMBER = 1;
private volatile java.lang.Object file_;
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getFile() {
java.lang.Object ref = file_;
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();
file_ = s;
return s;
}
}
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getFileBytes() {
java.lang.Object ref = file_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
file_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILE_ID_FIELD_NUMBER = 6;
private long fileId_;
/**
* int64 file_id = 6;
*/
public long getFileId() {
return fileId_;
}
public static final int LINENO_FIELD_NUMBER = 2;
private int lineno_;
/**
* int32 lineno = 2;
*/
public int getLineno() {
return lineno_;
}
public static final int FUNCTION_FIELD_NUMBER = 3;
private volatile java.lang.Object function_;
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getFunction() {
java.lang.Object ref = function_;
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();
function_ = s;
return s;
}
}
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getFunctionBytes() {
java.lang.Object ref = function_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
function_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FUNCTION_ID_FIELD_NUMBER = 7;
private long functionId_;
/**
* int64 function_id = 7;
*/
public long getFunctionId() {
return functionId_;
}
public static final int LINE_FIELD_NUMBER = 4;
private volatile java.lang.Object line_;
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getLine() {
java.lang.Object ref = line_;
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();
line_ = s;
return s;
}
}
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getLineBytes() {
java.lang.Object ref = line_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
line_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LINE_ID_FIELD_NUMBER = 8;
private long lineId_;
/**
* int64 line_id = 8;
*/
public long getLineId() {
return lineId_;
}
public static final int FUNC_START_LINE_FIELD_NUMBER = 5;
private int funcStartLine_;
/**
* int32 func_start_line = 5;
*/
public int getFuncStartLine() {
return funcStartLine_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getFileBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, file_);
}
if (lineno_ != 0) {
output.writeInt32(2, lineno_);
}
if (!getFunctionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, function_);
}
if (!getLineBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, line_);
}
if (funcStartLine_ != 0) {
output.writeInt32(5, funcStartLine_);
}
if (fileId_ != 0L) {
output.writeInt64(6, fileId_);
}
if (functionId_ != 0L) {
output.writeInt64(7, functionId_);
}
if (lineId_ != 0L) {
output.writeInt64(8, lineId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getFileBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, file_);
}
if (lineno_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, lineno_);
}
if (!getFunctionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, function_);
}
if (!getLineBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, line_);
}
if (funcStartLine_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, funcStartLine_);
}
if (fileId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, fileId_);
}
if (functionId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(7, functionId_);
}
if (lineId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, lineId_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.CodeDef.Trace)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.CodeDef.Trace other = (tensorflow.tfprof.TfprofLog.CodeDef.Trace) obj;
boolean result = true;
result = result && getFile()
.equals(other.getFile());
result = result && (getFileId()
== other.getFileId());
result = result && (getLineno()
== other.getLineno());
result = result && getFunction()
.equals(other.getFunction());
result = result && (getFunctionId()
== other.getFunctionId());
result = result && getLine()
.equals(other.getLine());
result = result && (getLineId()
== other.getLineId());
result = result && (getFuncStartLine()
== other.getFuncStartLine());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FILE_FIELD_NUMBER;
hash = (53 * hash) + getFile().hashCode();
hash = (37 * hash) + FILE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFileId());
hash = (37 * hash) + LINENO_FIELD_NUMBER;
hash = (53 * hash) + getLineno();
hash = (37 * hash) + FUNCTION_FIELD_NUMBER;
hash = (53 * hash) + getFunction().hashCode();
hash = (37 * hash) + FUNCTION_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFunctionId());
hash = (37 * hash) + LINE_FIELD_NUMBER;
hash = (53 * hash) + getLine().hashCode();
hash = (37 * hash) + LINE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLineId());
hash = (37 * hash) + FUNC_START_LINE_FIELD_NUMBER;
hash = (53 * hash) + getFuncStartLine();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace 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 tensorflow.tfprof.TfprofLog.CodeDef.Trace parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace 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 tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.CodeDef.Trace prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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.tfprof.CodeDef.Trace}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.CodeDef.Trace)
tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_Trace_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_Trace_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.CodeDef.Trace.class, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.CodeDef.Trace.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
file_ = "";
fileId_ = 0L;
lineno_ = 0;
function_ = "";
functionId_ = 0L;
line_ = "";
lineId_ = 0L;
funcStartLine_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_Trace_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef.Trace getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.CodeDef.Trace.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef.Trace build() {
tensorflow.tfprof.TfprofLog.CodeDef.Trace result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef.Trace buildPartial() {
tensorflow.tfprof.TfprofLog.CodeDef.Trace result = new tensorflow.tfprof.TfprofLog.CodeDef.Trace(this);
result.file_ = file_;
result.fileId_ = fileId_;
result.lineno_ = lineno_;
result.function_ = function_;
result.functionId_ = functionId_;
result.line_ = line_;
result.lineId_ = lineId_;
result.funcStartLine_ = funcStartLine_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.CodeDef.Trace) {
return mergeFrom((tensorflow.tfprof.TfprofLog.CodeDef.Trace)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.CodeDef.Trace other) {
if (other == tensorflow.tfprof.TfprofLog.CodeDef.Trace.getDefaultInstance()) return this;
if (!other.getFile().isEmpty()) {
file_ = other.file_;
onChanged();
}
if (other.getFileId() != 0L) {
setFileId(other.getFileId());
}
if (other.getLineno() != 0) {
setLineno(other.getLineno());
}
if (!other.getFunction().isEmpty()) {
function_ = other.function_;
onChanged();
}
if (other.getFunctionId() != 0L) {
setFunctionId(other.getFunctionId());
}
if (!other.getLine().isEmpty()) {
line_ = other.line_;
onChanged();
}
if (other.getLineId() != 0L) {
setLineId(other.getLineId());
}
if (other.getFuncStartLine() != 0) {
setFuncStartLine(other.getFuncStartLine());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.CodeDef.Trace parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.CodeDef.Trace) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object file_ = "";
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getFile() {
java.lang.Object ref = file_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
file_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getFileBytes() {
java.lang.Object ref = file_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
file_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public Builder setFile(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
file_ = value;
onChanged();
return this;
}
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearFile() {
file_ = getDefaultInstance().getFile();
onChanged();
return this;
}
/**
*
* deprecated by file_id.
*
*
* string file = 1 [deprecated = true];
*/
@java.lang.Deprecated public Builder setFileBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
file_ = value;
onChanged();
return this;
}
private long fileId_ ;
/**
* int64 file_id = 6;
*/
public long getFileId() {
return fileId_;
}
/**
* int64 file_id = 6;
*/
public Builder setFileId(long value) {
fileId_ = value;
onChanged();
return this;
}
/**
* int64 file_id = 6;
*/
public Builder clearFileId() {
fileId_ = 0L;
onChanged();
return this;
}
private int lineno_ ;
/**
* int32 lineno = 2;
*/
public int getLineno() {
return lineno_;
}
/**
* int32 lineno = 2;
*/
public Builder setLineno(int value) {
lineno_ = value;
onChanged();
return this;
}
/**
* int32 lineno = 2;
*/
public Builder clearLineno() {
lineno_ = 0;
onChanged();
return this;
}
private java.lang.Object function_ = "";
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getFunction() {
java.lang.Object ref = function_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
function_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getFunctionBytes() {
java.lang.Object ref = function_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
function_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public Builder setFunction(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
function_ = value;
onChanged();
return this;
}
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearFunction() {
function_ = getDefaultInstance().getFunction();
onChanged();
return this;
}
/**
*
* deprecated by function_id.
*
*
* string function = 3 [deprecated = true];
*/
@java.lang.Deprecated public Builder setFunctionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
function_ = value;
onChanged();
return this;
}
private long functionId_ ;
/**
* int64 function_id = 7;
*/
public long getFunctionId() {
return functionId_;
}
/**
* int64 function_id = 7;
*/
public Builder setFunctionId(long value) {
functionId_ = value;
onChanged();
return this;
}
/**
* int64 function_id = 7;
*/
public Builder clearFunctionId() {
functionId_ = 0L;
onChanged();
return this;
}
private java.lang.Object line_ = "";
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public java.lang.String getLine() {
java.lang.Object ref = line_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
line_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getLineBytes() {
java.lang.Object ref = line_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
line_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder setLine(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
line_ = value;
onChanged();
return this;
}
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearLine() {
line_ = getDefaultInstance().getLine();
onChanged();
return this;
}
/**
*
* deprecated line_id.
*
*
* string line = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder setLineBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
line_ = value;
onChanged();
return this;
}
private long lineId_ ;
/**
* int64 line_id = 8;
*/
public long getLineId() {
return lineId_;
}
/**
* int64 line_id = 8;
*/
public Builder setLineId(long value) {
lineId_ = value;
onChanged();
return this;
}
/**
* int64 line_id = 8;
*/
public Builder clearLineId() {
lineId_ = 0L;
onChanged();
return this;
}
private int funcStartLine_ ;
/**
* int32 func_start_line = 5;
*/
public int getFuncStartLine() {
return funcStartLine_;
}
/**
* int32 func_start_line = 5;
*/
public Builder setFuncStartLine(int value) {
funcStartLine_ = value;
onChanged();
return this;
}
/**
* int32 func_start_line = 5;
*/
public Builder clearFuncStartLine() {
funcStartLine_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.tfprof.CodeDef.Trace)
}
// @@protoc_insertion_point(class_scope:tensorflow.tfprof.CodeDef.Trace)
private static final tensorflow.tfprof.TfprofLog.CodeDef.Trace DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.tfprof.TfprofLog.CodeDef.Trace();
}
public static tensorflow.tfprof.TfprofLog.CodeDef.Trace getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Trace parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Trace(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef.Trace getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TRACES_FIELD_NUMBER = 1;
private java.util.List traces_;
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public java.util.List getTracesList() {
return traces_;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public java.util.List extends tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder>
getTracesOrBuilderList() {
return traces_;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public int getTracesCount() {
return traces_.size();
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Trace getTraces(int index) {
return traces_.get(index);
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder getTracesOrBuilder(
int index) {
return traces_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < traces_.size(); i++) {
output.writeMessage(1, traces_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < traces_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, traces_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.CodeDef)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.CodeDef other = (tensorflow.tfprof.TfprofLog.CodeDef) obj;
boolean result = true;
result = result && getTracesList()
.equals(other.getTracesList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTracesCount() > 0) {
hash = (37 * hash) + TRACES_FIELD_NUMBER;
hash = (53 * hash) + getTracesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef 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 tensorflow.tfprof.TfprofLog.CodeDef parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef 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 tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.CodeDef parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.CodeDef prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* It specifies the Python callstack that creates an op.
*
*
* Protobuf type {@code tensorflow.tfprof.CodeDef}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.CodeDef)
tensorflow.tfprof.TfprofLog.CodeDefOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.CodeDef.class, tensorflow.tfprof.TfprofLog.CodeDef.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.CodeDef.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTracesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (tracesBuilder_ == null) {
traces_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
tracesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_CodeDef_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef build() {
tensorflow.tfprof.TfprofLog.CodeDef result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef buildPartial() {
tensorflow.tfprof.TfprofLog.CodeDef result = new tensorflow.tfprof.TfprofLog.CodeDef(this);
int from_bitField0_ = bitField0_;
if (tracesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
traces_ = java.util.Collections.unmodifiableList(traces_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.traces_ = traces_;
} else {
result.traces_ = tracesBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.CodeDef) {
return mergeFrom((tensorflow.tfprof.TfprofLog.CodeDef)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.CodeDef other) {
if (other == tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance()) return this;
if (tracesBuilder_ == null) {
if (!other.traces_.isEmpty()) {
if (traces_.isEmpty()) {
traces_ = other.traces_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTracesIsMutable();
traces_.addAll(other.traces_);
}
onChanged();
}
} else {
if (!other.traces_.isEmpty()) {
if (tracesBuilder_.isEmpty()) {
tracesBuilder_.dispose();
tracesBuilder_ = null;
traces_ = other.traces_;
bitField0_ = (bitField0_ & ~0x00000001);
tracesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTracesFieldBuilder() : null;
} else {
tracesBuilder_.addAllMessages(other.traces_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.CodeDef parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.CodeDef) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List traces_ =
java.util.Collections.emptyList();
private void ensureTracesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
traces_ = new java.util.ArrayList(traces_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef.Trace, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder, tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder> tracesBuilder_;
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public java.util.List getTracesList() {
if (tracesBuilder_ == null) {
return java.util.Collections.unmodifiableList(traces_);
} else {
return tracesBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public int getTracesCount() {
if (tracesBuilder_ == null) {
return traces_.size();
} else {
return tracesBuilder_.getCount();
}
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Trace getTraces(int index) {
if (tracesBuilder_ == null) {
return traces_.get(index);
} else {
return tracesBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder setTraces(
int index, tensorflow.tfprof.TfprofLog.CodeDef.Trace value) {
if (tracesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTracesIsMutable();
traces_.set(index, value);
onChanged();
} else {
tracesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder setTraces(
int index, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder builderForValue) {
if (tracesBuilder_ == null) {
ensureTracesIsMutable();
traces_.set(index, builderForValue.build());
onChanged();
} else {
tracesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder addTraces(tensorflow.tfprof.TfprofLog.CodeDef.Trace value) {
if (tracesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTracesIsMutable();
traces_.add(value);
onChanged();
} else {
tracesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder addTraces(
int index, tensorflow.tfprof.TfprofLog.CodeDef.Trace value) {
if (tracesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTracesIsMutable();
traces_.add(index, value);
onChanged();
} else {
tracesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder addTraces(
tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder builderForValue) {
if (tracesBuilder_ == null) {
ensureTracesIsMutable();
traces_.add(builderForValue.build());
onChanged();
} else {
tracesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder addTraces(
int index, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder builderForValue) {
if (tracesBuilder_ == null) {
ensureTracesIsMutable();
traces_.add(index, builderForValue.build());
onChanged();
} else {
tracesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder addAllTraces(
java.lang.Iterable extends tensorflow.tfprof.TfprofLog.CodeDef.Trace> values) {
if (tracesBuilder_ == null) {
ensureTracesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, traces_);
onChanged();
} else {
tracesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder clearTraces() {
if (tracesBuilder_ == null) {
traces_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
tracesBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public Builder removeTraces(int index) {
if (tracesBuilder_ == null) {
ensureTracesIsMutable();
traces_.remove(index);
onChanged();
} else {
tracesBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder getTracesBuilder(
int index) {
return getTracesFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder getTracesOrBuilder(
int index) {
if (tracesBuilder_ == null) {
return traces_.get(index); } else {
return tracesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public java.util.List extends tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder>
getTracesOrBuilderList() {
if (tracesBuilder_ != null) {
return tracesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(traces_);
}
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder addTracesBuilder() {
return getTracesFieldBuilder().addBuilder(
tensorflow.tfprof.TfprofLog.CodeDef.Trace.getDefaultInstance());
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder addTracesBuilder(
int index) {
return getTracesFieldBuilder().addBuilder(
index, tensorflow.tfprof.TfprofLog.CodeDef.Trace.getDefaultInstance());
}
/**
* repeated .tensorflow.tfprof.CodeDef.Trace traces = 1;
*/
public java.util.List
getTracesBuilderList() {
return getTracesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef.Trace, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder, tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder>
getTracesFieldBuilder() {
if (tracesBuilder_ == null) {
tracesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef.Trace, tensorflow.tfprof.TfprofLog.CodeDef.Trace.Builder, tensorflow.tfprof.TfprofLog.CodeDef.TraceOrBuilder>(
traces_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
traces_ = null;
}
return tracesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.tfprof.CodeDef)
}
// @@protoc_insertion_point(class_scope:tensorflow.tfprof.CodeDef)
private static final tensorflow.tfprof.TfprofLog.CodeDef DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.tfprof.TfprofLog.CodeDef();
}
public static tensorflow.tfprof.TfprofLog.CodeDef getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CodeDef parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CodeDef(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.CodeDef getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OpLogEntryOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.OpLogEntry)
com.google.protobuf.MessageOrBuilder {
/**
*
* op name.
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* op name.
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* float_ops is filled by tfprof Python API when called. It requires the
* op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
* implemented.
*
*
* int64 float_ops = 2;
*/
long getFloatOps();
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
java.util.List
getTypesList();
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
int getTypesCount();
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
java.lang.String getTypes(int index);
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
com.google.protobuf.ByteString
getTypesBytes(int index);
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
boolean hasCodeDef();
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
tensorflow.tfprof.TfprofLog.CodeDef getCodeDef();
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getCodeDefOrBuilder();
}
/**
* Protobuf type {@code tensorflow.tfprof.OpLogEntry}
*/
public static final class OpLogEntry extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.OpLogEntry)
OpLogEntryOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpLogEntry.newBuilder() to construct.
private OpLogEntry(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpLogEntry() {
name_ = "";
floatOps_ = 0L;
types_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OpLogEntry(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 16: {
floatOps_ = input.readInt64();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
types_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
types_.add(s);
break;
}
case 34: {
tensorflow.tfprof.TfprofLog.CodeDef.Builder subBuilder = null;
if (codeDef_ != null) {
subBuilder = codeDef_.toBuilder();
}
codeDef_ = input.readMessage(tensorflow.tfprof.TfprofLog.CodeDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(codeDef_);
codeDef_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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_ & 0x00000004) == 0x00000004)) {
types_ = types_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogEntry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.OpLogEntry.class, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* op name.
*
*
* 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;
}
}
/**
*
* op name.
*
*
* 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 FLOAT_OPS_FIELD_NUMBER = 2;
private long floatOps_;
/**
*
* float_ops is filled by tfprof Python API when called. It requires the
* op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
* implemented.
*
*
* int64 float_ops = 2;
*/
public long getFloatOps() {
return floatOps_;
}
public static final int TYPES_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList types_;
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public com.google.protobuf.ProtocolStringList
getTypesList() {
return types_;
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public int getTypesCount() {
return types_.size();
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public java.lang.String getTypes(int index) {
return types_.get(index);
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public com.google.protobuf.ByteString
getTypesBytes(int index) {
return types_.getByteString(index);
}
public static final int CODE_DEF_FIELD_NUMBER = 4;
private tensorflow.tfprof.TfprofLog.CodeDef codeDef_;
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public boolean hasCodeDef() {
return codeDef_ != null;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public tensorflow.tfprof.TfprofLog.CodeDef getCodeDef() {
return codeDef_ == null ? tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : codeDef_;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getCodeDefOrBuilder() {
return getCodeDef();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (floatOps_ != 0L) {
output.writeInt64(2, floatOps_);
}
for (int i = 0; i < types_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, types_.getRaw(i));
}
if (codeDef_ != null) {
output.writeMessage(4, getCodeDef());
}
unknownFields.writeTo(output);
}
@java.lang.Override
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 (floatOps_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, floatOps_);
}
{
int dataSize = 0;
for (int i = 0; i < types_.size(); i++) {
dataSize += computeStringSizeNoTag(types_.getRaw(i));
}
size += dataSize;
size += 1 * getTypesList().size();
}
if (codeDef_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCodeDef());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.OpLogEntry)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.OpLogEntry other = (tensorflow.tfprof.TfprofLog.OpLogEntry) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (getFloatOps()
== other.getFloatOps());
result = result && getTypesList()
.equals(other.getTypesList());
result = result && (hasCodeDef() == other.hasCodeDef());
if (hasCodeDef()) {
result = result && getCodeDef()
.equals(other.getCodeDef());
}
result = result && unknownFields.equals(other.unknownFields);
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) + FLOAT_OPS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFloatOps());
if (getTypesCount() > 0) {
hash = (37 * hash) + TYPES_FIELD_NUMBER;
hash = (53 * hash) + getTypesList().hashCode();
}
if (hasCodeDef()) {
hash = (37 * hash) + CODE_DEF_FIELD_NUMBER;
hash = (53 * hash) + getCodeDef().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry 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 tensorflow.tfprof.TfprofLog.OpLogEntry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry 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 tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.OpLogEntry prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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.tfprof.OpLogEntry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.OpLogEntry)
tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogEntry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.OpLogEntry.class, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.OpLogEntry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
floatOps_ = 0L;
types_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
if (codeDefBuilder_ == null) {
codeDef_ = null;
} else {
codeDef_ = null;
codeDefBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogEntry_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogEntry getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.OpLogEntry.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogEntry build() {
tensorflow.tfprof.TfprofLog.OpLogEntry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogEntry buildPartial() {
tensorflow.tfprof.TfprofLog.OpLogEntry result = new tensorflow.tfprof.TfprofLog.OpLogEntry(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.floatOps_ = floatOps_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
types_ = types_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.types_ = types_;
if (codeDefBuilder_ == null) {
result.codeDef_ = codeDef_;
} else {
result.codeDef_ = codeDefBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.OpLogEntry) {
return mergeFrom((tensorflow.tfprof.TfprofLog.OpLogEntry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.OpLogEntry other) {
if (other == tensorflow.tfprof.TfprofLog.OpLogEntry.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.getFloatOps() != 0L) {
setFloatOps(other.getFloatOps());
}
if (!other.types_.isEmpty()) {
if (types_.isEmpty()) {
types_ = other.types_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureTypesIsMutable();
types_.addAll(other.types_);
}
onChanged();
}
if (other.hasCodeDef()) {
mergeCodeDef(other.getCodeDef());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.OpLogEntry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.OpLogEntry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* op name.
*
*
* 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;
}
}
/**
*
* op name.
*
*
* 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;
}
}
/**
*
* op name.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* op name.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* op name.
*
*
* 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 long floatOps_ ;
/**
*
* float_ops is filled by tfprof Python API when called. It requires the
* op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
* implemented.
*
*
* int64 float_ops = 2;
*/
public long getFloatOps() {
return floatOps_;
}
/**
*
* float_ops is filled by tfprof Python API when called. It requires the
* op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
* implemented.
*
*
* int64 float_ops = 2;
*/
public Builder setFloatOps(long value) {
floatOps_ = value;
onChanged();
return this;
}
/**
*
* float_ops is filled by tfprof Python API when called. It requires the
* op has RegisterStatistics defined. Currently, Conv2D, MatMul, etc, are
* implemented.
*
*
* int64 float_ops = 2;
*/
public Builder clearFloatOps() {
floatOps_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTypesIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
types_ = new com.google.protobuf.LazyStringArrayList(types_);
bitField0_ |= 0x00000004;
}
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public com.google.protobuf.ProtocolStringList
getTypesList() {
return types_.getUnmodifiableView();
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public int getTypesCount() {
return types_.size();
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public java.lang.String getTypes(int index) {
return types_.get(index);
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public com.google.protobuf.ByteString
getTypesBytes(int index) {
return types_.getByteString(index);
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public Builder setTypes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
types_.set(index, value);
onChanged();
return this;
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public Builder addTypes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypesIsMutable();
types_.add(value);
onChanged();
return this;
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public Builder addAllTypes(
java.lang.Iterable values) {
ensureTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, types_);
onChanged();
return this;
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public Builder clearTypes() {
types_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* User can define extra op type information for an op. This allows the user
* to select a group of ops precisely using op_type as a key.
*
*
* repeated string types = 3;
*/
public Builder addTypesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTypesIsMutable();
types_.add(value);
onChanged();
return this;
}
private tensorflow.tfprof.TfprofLog.CodeDef codeDef_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder> codeDefBuilder_;
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public boolean hasCodeDef() {
return codeDefBuilder_ != null || codeDef_ != null;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public tensorflow.tfprof.TfprofLog.CodeDef getCodeDef() {
if (codeDefBuilder_ == null) {
return codeDef_ == null ? tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : codeDef_;
} else {
return codeDefBuilder_.getMessage();
}
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public Builder setCodeDef(tensorflow.tfprof.TfprofLog.CodeDef value) {
if (codeDefBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
codeDef_ = value;
onChanged();
} else {
codeDefBuilder_.setMessage(value);
}
return this;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public Builder setCodeDef(
tensorflow.tfprof.TfprofLog.CodeDef.Builder builderForValue) {
if (codeDefBuilder_ == null) {
codeDef_ = builderForValue.build();
onChanged();
} else {
codeDefBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public Builder mergeCodeDef(tensorflow.tfprof.TfprofLog.CodeDef value) {
if (codeDefBuilder_ == null) {
if (codeDef_ != null) {
codeDef_ =
tensorflow.tfprof.TfprofLog.CodeDef.newBuilder(codeDef_).mergeFrom(value).buildPartial();
} else {
codeDef_ = value;
}
onChanged();
} else {
codeDefBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public Builder clearCodeDef() {
if (codeDefBuilder_ == null) {
codeDef_ = null;
onChanged();
} else {
codeDef_ = null;
codeDefBuilder_ = null;
}
return this;
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Builder getCodeDefBuilder() {
onChanged();
return getCodeDefFieldBuilder().getBuilder();
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
public tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getCodeDefOrBuilder() {
if (codeDefBuilder_ != null) {
return codeDefBuilder_.getMessageOrBuilder();
} else {
return codeDef_ == null ?
tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : codeDef_;
}
}
/**
*
* Used to support tfprof "code" view.
*
*
* .tensorflow.tfprof.CodeDef code_def = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder>
getCodeDefFieldBuilder() {
if (codeDefBuilder_ == null) {
codeDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder>(
getCodeDef(),
getParentForChildren(),
isClean());
codeDef_ = null;
}
return codeDefBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.tfprof.OpLogEntry)
}
// @@protoc_insertion_point(class_scope:tensorflow.tfprof.OpLogEntry)
private static final tensorflow.tfprof.TfprofLog.OpLogEntry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.tfprof.TfprofLog.OpLogEntry();
}
public static tensorflow.tfprof.TfprofLog.OpLogEntry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpLogEntry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OpLogEntry(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogEntry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OpLogProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.OpLogProto)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
java.util.List
getLogEntriesList();
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
tensorflow.tfprof.TfprofLog.OpLogEntry getLogEntries(int index);
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
int getLogEntriesCount();
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
java.util.List extends tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder>
getLogEntriesOrBuilderList();
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder getLogEntriesOrBuilder(
int index);
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
int getIdToStringCount();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
boolean containsIdToString(
long key);
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getIdToString();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
java.util.Map
getIdToStringMap();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue);
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
java.lang.String getIdToStringOrThrow(
long key);
}
/**
* Protobuf type {@code tensorflow.tfprof.OpLogProto}
*/
public static final class OpLogProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.OpLogProto)
OpLogProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpLogProto.newBuilder() to construct.
private OpLogProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpLogProto() {
logEntries_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OpLogProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
logEntries_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
logEntries_.add(
input.readMessage(tensorflow.tfprof.TfprofLog.OpLogEntry.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
idToString_ = com.google.protobuf.MapField.newMapField(
IdToStringDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
idToString__ = input.readMessage(
IdToStringDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
idToString_.getMutableMap().put(
idToString__.getKey(), idToString__.getValue());
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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)) {
logEntries_ = java.util.Collections.unmodifiableList(logEntries_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.OpLogProto.class, tensorflow.tfprof.TfprofLog.OpLogProto.Builder.class);
}
public static final int LOG_ENTRIES_FIELD_NUMBER = 1;
private java.util.List logEntries_;
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public java.util.List getLogEntriesList() {
return logEntries_;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public java.util.List extends tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder>
getLogEntriesOrBuilderList() {
return logEntries_;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public int getLogEntriesCount() {
return logEntries_.size();
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntry getLogEntries(int index) {
return logEntries_.get(index);
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder getLogEntriesOrBuilder(
int index) {
return logEntries_.get(index);
}
public static final int ID_TO_STRING_FIELD_NUMBER = 2;
private static final class IdToStringDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_IdToStringEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.String> idToString_;
private com.google.protobuf.MapField
internalGetIdToString() {
if (idToString_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
return idToString_;
}
public int getIdToStringCount() {
return internalGetIdToString().getMap().size();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public boolean containsIdToString(
long key) {
return internalGetIdToString().getMap().containsKey(key);
}
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getIdToString() {
return getIdToStringMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.util.Map getIdToStringMap() {
return internalGetIdToString().getMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue) {
java.util.Map map =
internalGetIdToString().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.lang.String getIdToStringOrThrow(
long key) {
java.util.Map map =
internalGetIdToString().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < logEntries_.size(); i++) {
output.writeMessage(1, logEntries_.get(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetIdToString(),
IdToStringDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < logEntries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, logEntries_.get(i));
}
for (java.util.Map.Entry entry
: internalGetIdToString().getMap().entrySet()) {
com.google.protobuf.MapEntry
idToString__ = IdToStringDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, idToString__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.OpLogProto)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.OpLogProto other = (tensorflow.tfprof.TfprofLog.OpLogProto) obj;
boolean result = true;
result = result && getLogEntriesList()
.equals(other.getLogEntriesList());
result = result && internalGetIdToString().equals(
other.internalGetIdToString());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getLogEntriesCount() > 0) {
hash = (37 * hash) + LOG_ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getLogEntriesList().hashCode();
}
if (!internalGetIdToString().getMap().isEmpty()) {
hash = (37 * hash) + ID_TO_STRING_FIELD_NUMBER;
hash = (53 * hash) + internalGetIdToString().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto 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 tensorflow.tfprof.TfprofLog.OpLogProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto 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 tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.OpLogProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.OpLogProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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.tfprof.OpLogProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.OpLogProto)
tensorflow.tfprof.TfprofLog.OpLogProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.OpLogProto.class, tensorflow.tfprof.TfprofLog.OpLogProto.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.OpLogProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLogEntriesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (logEntriesBuilder_ == null) {
logEntries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
logEntriesBuilder_.clear();
}
internalGetMutableIdToString().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_OpLogProto_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogProto getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.OpLogProto.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogProto build() {
tensorflow.tfprof.TfprofLog.OpLogProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogProto buildPartial() {
tensorflow.tfprof.TfprofLog.OpLogProto result = new tensorflow.tfprof.TfprofLog.OpLogProto(this);
int from_bitField0_ = bitField0_;
if (logEntriesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
logEntries_ = java.util.Collections.unmodifiableList(logEntries_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.logEntries_ = logEntries_;
} else {
result.logEntries_ = logEntriesBuilder_.build();
}
result.idToString_ = internalGetIdToString();
result.idToString_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.OpLogProto) {
return mergeFrom((tensorflow.tfprof.TfprofLog.OpLogProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.OpLogProto other) {
if (other == tensorflow.tfprof.TfprofLog.OpLogProto.getDefaultInstance()) return this;
if (logEntriesBuilder_ == null) {
if (!other.logEntries_.isEmpty()) {
if (logEntries_.isEmpty()) {
logEntries_ = other.logEntries_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLogEntriesIsMutable();
logEntries_.addAll(other.logEntries_);
}
onChanged();
}
} else {
if (!other.logEntries_.isEmpty()) {
if (logEntriesBuilder_.isEmpty()) {
logEntriesBuilder_.dispose();
logEntriesBuilder_ = null;
logEntries_ = other.logEntries_;
bitField0_ = (bitField0_ & ~0x00000001);
logEntriesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLogEntriesFieldBuilder() : null;
} else {
logEntriesBuilder_.addAllMessages(other.logEntries_);
}
}
}
internalGetMutableIdToString().mergeFrom(
other.internalGetIdToString());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.OpLogProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.OpLogProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List logEntries_ =
java.util.Collections.emptyList();
private void ensureLogEntriesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
logEntries_ = new java.util.ArrayList(logEntries_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.OpLogEntry, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder, tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder> logEntriesBuilder_;
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public java.util.List getLogEntriesList() {
if (logEntriesBuilder_ == null) {
return java.util.Collections.unmodifiableList(logEntries_);
} else {
return logEntriesBuilder_.getMessageList();
}
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public int getLogEntriesCount() {
if (logEntriesBuilder_ == null) {
return logEntries_.size();
} else {
return logEntriesBuilder_.getCount();
}
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntry getLogEntries(int index) {
if (logEntriesBuilder_ == null) {
return logEntries_.get(index);
} else {
return logEntriesBuilder_.getMessage(index);
}
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder setLogEntries(
int index, tensorflow.tfprof.TfprofLog.OpLogEntry value) {
if (logEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogEntriesIsMutable();
logEntries_.set(index, value);
onChanged();
} else {
logEntriesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder setLogEntries(
int index, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder builderForValue) {
if (logEntriesBuilder_ == null) {
ensureLogEntriesIsMutable();
logEntries_.set(index, builderForValue.build());
onChanged();
} else {
logEntriesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder addLogEntries(tensorflow.tfprof.TfprofLog.OpLogEntry value) {
if (logEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogEntriesIsMutable();
logEntries_.add(value);
onChanged();
} else {
logEntriesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder addLogEntries(
int index, tensorflow.tfprof.TfprofLog.OpLogEntry value) {
if (logEntriesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogEntriesIsMutable();
logEntries_.add(index, value);
onChanged();
} else {
logEntriesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder addLogEntries(
tensorflow.tfprof.TfprofLog.OpLogEntry.Builder builderForValue) {
if (logEntriesBuilder_ == null) {
ensureLogEntriesIsMutable();
logEntries_.add(builderForValue.build());
onChanged();
} else {
logEntriesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder addLogEntries(
int index, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder builderForValue) {
if (logEntriesBuilder_ == null) {
ensureLogEntriesIsMutable();
logEntries_.add(index, builderForValue.build());
onChanged();
} else {
logEntriesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder addAllLogEntries(
java.lang.Iterable extends tensorflow.tfprof.TfprofLog.OpLogEntry> values) {
if (logEntriesBuilder_ == null) {
ensureLogEntriesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, logEntries_);
onChanged();
} else {
logEntriesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder clearLogEntries() {
if (logEntriesBuilder_ == null) {
logEntries_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
logEntriesBuilder_.clear();
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public Builder removeLogEntries(int index) {
if (logEntriesBuilder_ == null) {
ensureLogEntriesIsMutable();
logEntries_.remove(index);
onChanged();
} else {
logEntriesBuilder_.remove(index);
}
return this;
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntry.Builder getLogEntriesBuilder(
int index) {
return getLogEntriesFieldBuilder().getBuilder(index);
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder getLogEntriesOrBuilder(
int index) {
if (logEntriesBuilder_ == null) {
return logEntries_.get(index); } else {
return logEntriesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public java.util.List extends tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder>
getLogEntriesOrBuilderList() {
if (logEntriesBuilder_ != null) {
return logEntriesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(logEntries_);
}
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntry.Builder addLogEntriesBuilder() {
return getLogEntriesFieldBuilder().addBuilder(
tensorflow.tfprof.TfprofLog.OpLogEntry.getDefaultInstance());
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public tensorflow.tfprof.TfprofLog.OpLogEntry.Builder addLogEntriesBuilder(
int index) {
return getLogEntriesFieldBuilder().addBuilder(
index, tensorflow.tfprof.TfprofLog.OpLogEntry.getDefaultInstance());
}
/**
* repeated .tensorflow.tfprof.OpLogEntry log_entries = 1;
*/
public java.util.List
getLogEntriesBuilderList() {
return getLogEntriesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.OpLogEntry, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder, tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder>
getLogEntriesFieldBuilder() {
if (logEntriesBuilder_ == null) {
logEntriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
tensorflow.tfprof.TfprofLog.OpLogEntry, tensorflow.tfprof.TfprofLog.OpLogEntry.Builder, tensorflow.tfprof.TfprofLog.OpLogEntryOrBuilder>(
logEntries_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
logEntries_ = null;
}
return logEntriesBuilder_;
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.String> idToString_;
private com.google.protobuf.MapField
internalGetIdToString() {
if (idToString_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
return idToString_;
}
private com.google.protobuf.MapField
internalGetMutableIdToString() {
onChanged();;
if (idToString_ == null) {
idToString_ = com.google.protobuf.MapField.newMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
if (!idToString_.isMutable()) {
idToString_ = idToString_.copy();
}
return idToString_;
}
public int getIdToStringCount() {
return internalGetIdToString().getMap().size();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public boolean containsIdToString(
long key) {
return internalGetIdToString().getMap().containsKey(key);
}
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getIdToString() {
return getIdToStringMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.util.Map getIdToStringMap() {
return internalGetIdToString().getMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue) {
java.util.Map map =
internalGetIdToString().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public java.lang.String getIdToStringOrThrow(
long key) {
java.util.Map map =
internalGetIdToString().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearIdToString() {
internalGetMutableIdToString().getMutableMap()
.clear();
return this;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public Builder removeIdToString(
long key) {
internalGetMutableIdToString().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableIdToString() {
return internalGetMutableIdToString().getMutableMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public Builder putIdToString(
long key,
java.lang.String value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableIdToString().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 2;
*/
public Builder putAllIdToString(
java.util.Map values) {
internalGetMutableIdToString().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.tfprof.OpLogProto)
}
// @@protoc_insertion_point(class_scope:tensorflow.tfprof.OpLogProto)
private static final tensorflow.tfprof.TfprofLog.OpLogProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.tfprof.TfprofLog.OpLogProto();
}
public static tensorflow.tfprof.TfprofLog.OpLogProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpLogProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OpLogProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.OpLogProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProfileProtoOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.ProfileProto)
com.google.protobuf.MessageOrBuilder {
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
int getNodesCount();
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
boolean containsNodes(
long key);
/**
* Use {@link #getNodesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getNodes();
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
java.util.Map
getNodesMap();
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ProfileNode defaultValue);
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrThrow(
long key);
/**
*
* Whether or not has code traces.
*
*
* bool has_trace = 2;
*/
boolean getHasTrace();
/**
*
* Whether or not the TF device tracer fails to return accelerator
* information (which could lead to 0 accelerator execution time).
*
*
* bool miss_accelerator_stream = 5;
*/
boolean getMissAcceleratorStream();
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
java.util.List getStepsList();
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
int getStepsCount();
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
long getSteps(int index);
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
int getIdToStringCount();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
boolean containsIdToString(
long key);
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getIdToString();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
java.util.Map
getIdToStringMap();
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue);
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
java.lang.String getIdToStringOrThrow(
long key);
}
/**
*
* A proto representation of the profiler's profile.
* It allows serialization, shipping around and deserialization of the profiles.
* Please don't depend on the internals of the profile proto.
*
*
* Protobuf type {@code tensorflow.tfprof.ProfileProto}
*/
public static final class ProfileProto extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.ProfileProto)
ProfileProtoOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProfileProto.newBuilder() to construct.
private ProfileProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProfileProto() {
hasTrace_ = false;
missAcceleratorStream_ = false;
steps_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ProfileProto(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
nodes_ = com.google.protobuf.MapField.newMapField(
NodesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
nodes__ = input.readMessage(
NodesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
nodes_.getMutableMap().put(
nodes__.getKey(), nodes__.getValue());
break;
}
case 16: {
hasTrace_ = input.readBool();
break;
}
case 24: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
steps_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
steps_.add(input.readInt64());
break;
}
case 26: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
steps_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
while (input.getBytesUntilLimit() > 0) {
steps_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
idToString_ = com.google.protobuf.MapField.newMapField(
IdToStringDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000010;
}
com.google.protobuf.MapEntry
idToString__ = input.readMessage(
IdToStringDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
idToString_.getMutableMap().put(
idToString__.getKey(), idToString__.getValue());
break;
}
case 40: {
missAcceleratorStream_ = input.readBool();
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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)) {
steps_ = java.util.Collections.unmodifiableList(steps_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetNodes();
case 4:
return internalGetIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.ProfileProto.class, tensorflow.tfprof.TfprofLog.ProfileProto.Builder.class);
}
private int bitField0_;
public static final int NODES_FIELD_NUMBER = 1;
private static final class NodesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, tensorflow.tfprof.TfprofLog.ProfileNode> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_NodesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
tensorflow.tfprof.TfprofLog.ProfileNode.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, tensorflow.tfprof.TfprofLog.ProfileNode> nodes_;
private com.google.protobuf.MapField
internalGetNodes() {
if (nodes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NodesDefaultEntryHolder.defaultEntry);
}
return nodes_;
}
public int getNodesCount() {
return internalGetNodes().getMap().size();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public boolean containsNodes(
long key) {
return internalGetNodes().getMap().containsKey(key);
}
/**
* Use {@link #getNodesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getNodes() {
return getNodesMap();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public java.util.Map getNodesMap() {
return internalGetNodes().getMap();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ProfileNode defaultValue) {
java.util.Map map =
internalGetNodes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrThrow(
long key) {
java.util.Map map =
internalGetNodes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int HAS_TRACE_FIELD_NUMBER = 2;
private boolean hasTrace_;
/**
*
* Whether or not has code traces.
*
*
* bool has_trace = 2;
*/
public boolean getHasTrace() {
return hasTrace_;
}
public static final int MISS_ACCELERATOR_STREAM_FIELD_NUMBER = 5;
private boolean missAcceleratorStream_;
/**
*
* Whether or not the TF device tracer fails to return accelerator
* information (which could lead to 0 accelerator execution time).
*
*
* bool miss_accelerator_stream = 5;
*/
public boolean getMissAcceleratorStream() {
return missAcceleratorStream_;
}
public static final int STEPS_FIELD_NUMBER = 3;
private java.util.List steps_;
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public java.util.List
getStepsList() {
return steps_;
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public long getSteps(int index) {
return steps_.get(index);
}
private int stepsMemoizedSerializedSize = -1;
public static final int ID_TO_STRING_FIELD_NUMBER = 4;
private static final class IdToStringDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_IdToStringEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.String> idToString_;
private com.google.protobuf.MapField
internalGetIdToString() {
if (idToString_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
return idToString_;
}
public int getIdToStringCount() {
return internalGetIdToString().getMap().size();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public boolean containsIdToString(
long key) {
return internalGetIdToString().getMap().containsKey(key);
}
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getIdToString() {
return getIdToStringMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.util.Map getIdToStringMap() {
return internalGetIdToString().getMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue) {
java.util.Map map =
internalGetIdToString().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.lang.String getIdToStringOrThrow(
long key) {
java.util.Map map =
internalGetIdToString().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetNodes(),
NodesDefaultEntryHolder.defaultEntry,
1);
if (hasTrace_ != false) {
output.writeBool(2, hasTrace_);
}
if (getStepsList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(stepsMemoizedSerializedSize);
}
for (int i = 0; i < steps_.size(); i++) {
output.writeInt64NoTag(steps_.get(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetIdToString(),
IdToStringDefaultEntryHolder.defaultEntry,
4);
if (missAcceleratorStream_ != false) {
output.writeBool(5, missAcceleratorStream_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetNodes().getMap().entrySet()) {
com.google.protobuf.MapEntry
nodes__ = NodesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, nodes__);
}
if (hasTrace_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, hasTrace_);
}
{
int dataSize = 0;
for (int i = 0; i < steps_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(steps_.get(i));
}
size += dataSize;
if (!getStepsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
stepsMemoizedSerializedSize = dataSize;
}
for (java.util.Map.Entry entry
: internalGetIdToString().getMap().entrySet()) {
com.google.protobuf.MapEntry
idToString__ = IdToStringDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, idToString__);
}
if (missAcceleratorStream_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, missAcceleratorStream_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.ProfileProto)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.ProfileProto other = (tensorflow.tfprof.TfprofLog.ProfileProto) obj;
boolean result = true;
result = result && internalGetNodes().equals(
other.internalGetNodes());
result = result && (getHasTrace()
== other.getHasTrace());
result = result && (getMissAcceleratorStream()
== other.getMissAcceleratorStream());
result = result && getStepsList()
.equals(other.getStepsList());
result = result && internalGetIdToString().equals(
other.internalGetIdToString());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetNodes().getMap().isEmpty()) {
hash = (37 * hash) + NODES_FIELD_NUMBER;
hash = (53 * hash) + internalGetNodes().hashCode();
}
hash = (37 * hash) + HAS_TRACE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getHasTrace());
hash = (37 * hash) + MISS_ACCELERATOR_STREAM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMissAcceleratorStream());
if (getStepsCount() > 0) {
hash = (37 * hash) + STEPS_FIELD_NUMBER;
hash = (53 * hash) + getStepsList().hashCode();
}
if (!internalGetIdToString().getMap().isEmpty()) {
hash = (37 * hash) + ID_TO_STRING_FIELD_NUMBER;
hash = (53 * hash) + internalGetIdToString().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto 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 tensorflow.tfprof.TfprofLog.ProfileProto parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto 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 tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileProto parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.ProfileProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
* A proto representation of the profiler's profile.
* It allows serialization, shipping around and deserialization of the profiles.
* Please don't depend on the internals of the profile proto.
*
*
* Protobuf type {@code tensorflow.tfprof.ProfileProto}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.ProfileProto)
tensorflow.tfprof.TfprofLog.ProfileProtoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetNodes();
case 4:
return internalGetIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableNodes();
case 4:
return internalGetMutableIdToString();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.ProfileProto.class, tensorflow.tfprof.TfprofLog.ProfileProto.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.ProfileProto.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableNodes().clear();
hasTrace_ = false;
missAcceleratorStream_ = false;
steps_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutableIdToString().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileProto_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileProto getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.ProfileProto.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileProto build() {
tensorflow.tfprof.TfprofLog.ProfileProto result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileProto buildPartial() {
tensorflow.tfprof.TfprofLog.ProfileProto result = new tensorflow.tfprof.TfprofLog.ProfileProto(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.nodes_ = internalGetNodes();
result.nodes_.makeImmutable();
result.hasTrace_ = hasTrace_;
result.missAcceleratorStream_ = missAcceleratorStream_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
steps_ = java.util.Collections.unmodifiableList(steps_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.steps_ = steps_;
result.idToString_ = internalGetIdToString();
result.idToString_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.ProfileProto) {
return mergeFrom((tensorflow.tfprof.TfprofLog.ProfileProto)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.ProfileProto other) {
if (other == tensorflow.tfprof.TfprofLog.ProfileProto.getDefaultInstance()) return this;
internalGetMutableNodes().mergeFrom(
other.internalGetNodes());
if (other.getHasTrace() != false) {
setHasTrace(other.getHasTrace());
}
if (other.getMissAcceleratorStream() != false) {
setMissAcceleratorStream(other.getMissAcceleratorStream());
}
if (!other.steps_.isEmpty()) {
if (steps_.isEmpty()) {
steps_ = other.steps_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureStepsIsMutable();
steps_.addAll(other.steps_);
}
onChanged();
}
internalGetMutableIdToString().mergeFrom(
other.internalGetIdToString());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.ProfileProto parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.ProfileProto) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.Long, tensorflow.tfprof.TfprofLog.ProfileNode> nodes_;
private com.google.protobuf.MapField
internalGetNodes() {
if (nodes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NodesDefaultEntryHolder.defaultEntry);
}
return nodes_;
}
private com.google.protobuf.MapField
internalGetMutableNodes() {
onChanged();;
if (nodes_ == null) {
nodes_ = com.google.protobuf.MapField.newMapField(
NodesDefaultEntryHolder.defaultEntry);
}
if (!nodes_.isMutable()) {
nodes_ = nodes_.copy();
}
return nodes_;
}
public int getNodesCount() {
return internalGetNodes().getMap().size();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public boolean containsNodes(
long key) {
return internalGetNodes().getMap().containsKey(key);
}
/**
* Use {@link #getNodesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getNodes() {
return getNodesMap();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public java.util.Map getNodesMap() {
return internalGetNodes().getMap();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ProfileNode defaultValue) {
java.util.Map map =
internalGetNodes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public tensorflow.tfprof.TfprofLog.ProfileNode getNodesOrThrow(
long key) {
java.util.Map map =
internalGetNodes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearNodes() {
internalGetMutableNodes().getMutableMap()
.clear();
return this;
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public Builder removeNodes(
long key) {
internalGetMutableNodes().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableNodes() {
return internalGetMutableNodes().getMutableMap();
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public Builder putNodes(
long key,
tensorflow.tfprof.TfprofLog.ProfileNode value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableNodes().getMutableMap()
.put(key, value);
return this;
}
/**
* map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1;
*/
public Builder putAllNodes(
java.util.Map values) {
internalGetMutableNodes().getMutableMap()
.putAll(values);
return this;
}
private boolean hasTrace_ ;
/**
*
* Whether or not has code traces.
*
*
* bool has_trace = 2;
*/
public boolean getHasTrace() {
return hasTrace_;
}
/**
*
* Whether or not has code traces.
*
*
* bool has_trace = 2;
*/
public Builder setHasTrace(boolean value) {
hasTrace_ = value;
onChanged();
return this;
}
/**
*
* Whether or not has code traces.
*
*
* bool has_trace = 2;
*/
public Builder clearHasTrace() {
hasTrace_ = false;
onChanged();
return this;
}
private boolean missAcceleratorStream_ ;
/**
*
* Whether or not the TF device tracer fails to return accelerator
* information (which could lead to 0 accelerator execution time).
*
*
* bool miss_accelerator_stream = 5;
*/
public boolean getMissAcceleratorStream() {
return missAcceleratorStream_;
}
/**
*
* Whether or not the TF device tracer fails to return accelerator
* information (which could lead to 0 accelerator execution time).
*
*
* bool miss_accelerator_stream = 5;
*/
public Builder setMissAcceleratorStream(boolean value) {
missAcceleratorStream_ = value;
onChanged();
return this;
}
/**
*
* Whether or not the TF device tracer fails to return accelerator
* information (which could lead to 0 accelerator execution time).
*
*
* bool miss_accelerator_stream = 5;
*/
public Builder clearMissAcceleratorStream() {
missAcceleratorStream_ = false;
onChanged();
return this;
}
private java.util.List steps_ = java.util.Collections.emptyList();
private void ensureStepsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
steps_ = new java.util.ArrayList(steps_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public java.util.List
getStepsList() {
return java.util.Collections.unmodifiableList(steps_);
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public long getSteps(int index) {
return steps_.get(index);
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public Builder setSteps(
int index, long value) {
ensureStepsIsMutable();
steps_.set(index, value);
onChanged();
return this;
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public Builder addSteps(long value) {
ensureStepsIsMutable();
steps_.add(value);
onChanged();
return this;
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public Builder addAllSteps(
java.lang.Iterable extends java.lang.Long> values) {
ensureStepsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, steps_);
onChanged();
return this;
}
/**
*
* Traced steps.
*
*
* repeated int64 steps = 3;
*/
public Builder clearSteps() {
steps_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.String> idToString_;
private com.google.protobuf.MapField
internalGetIdToString() {
if (idToString_ == null) {
return com.google.protobuf.MapField.emptyMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
return idToString_;
}
private com.google.protobuf.MapField
internalGetMutableIdToString() {
onChanged();;
if (idToString_ == null) {
idToString_ = com.google.protobuf.MapField.newMapField(
IdToStringDefaultEntryHolder.defaultEntry);
}
if (!idToString_.isMutable()) {
idToString_ = idToString_.copy();
}
return idToString_;
}
public int getIdToStringCount() {
return internalGetIdToString().getMap().size();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public boolean containsIdToString(
long key) {
return internalGetIdToString().getMap().containsKey(key);
}
/**
* Use {@link #getIdToStringMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getIdToString() {
return getIdToStringMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.util.Map getIdToStringMap() {
return internalGetIdToString().getMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.lang.String getIdToStringOrDefault(
long key,
java.lang.String defaultValue) {
java.util.Map map =
internalGetIdToString().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public java.lang.String getIdToStringOrThrow(
long key) {
java.util.Map map =
internalGetIdToString().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearIdToString() {
internalGetMutableIdToString().getMutableMap()
.clear();
return this;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public Builder removeIdToString(
long key) {
internalGetMutableIdToString().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableIdToString() {
return internalGetMutableIdToString().getMutableMap();
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public Builder putIdToString(
long key,
java.lang.String value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableIdToString().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Maps from id of CodeDef file,function,line to its string
* In the future can also map other id of other fields to string.
*
*
* map<int64, string> id_to_string = 4;
*/
public Builder putAllIdToString(
java.util.Map values) {
internalGetMutableIdToString().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.tfprof.ProfileProto)
}
// @@protoc_insertion_point(class_scope:tensorflow.tfprof.ProfileProto)
private static final tensorflow.tfprof.TfprofLog.ProfileProto DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new tensorflow.tfprof.TfprofLog.ProfileProto();
}
public static tensorflow.tfprof.TfprofLog.ProfileProto getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ProfileProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ProfileProto(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ProfileNodeOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.tfprof.ProfileNode)
com.google.protobuf.MessageOrBuilder {
/**
*
* graph node name.
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* graph node name.
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* graph operation type.
*
*
* string op = 9;
*/
java.lang.String getOp();
/**
*
* graph operation type.
*
*
* string op = 9;
*/
com.google.protobuf.ByteString
getOpBytes();
/**
*
* A unique id for the node.
*
*
* int64 id = 13;
*/
long getId();
/**
* map<int32, int64> inputs = 2;
*/
int getInputsCount();
/**
* map<int32, int64> inputs = 2;
*/
boolean containsInputs(
int key);
/**
* Use {@link #getInputsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getInputs();
/**
* map<int32, int64> inputs = 2;
*/
java.util.Map
getInputsMap();
/**
* map<int32, int64> inputs = 2;
*/
long getInputsOrDefault(
int key,
long defaultValue);
/**
* map<int32, int64> inputs = 2;
*/
long getInputsOrThrow(
int key);
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
int getInputShapesCount();
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
boolean containsInputShapes(
int key);
/**
* Use {@link #getInputShapesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getInputShapes();
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
java.util.Map
getInputShapesMap();
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue);
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrThrow(
int key);
/**
* map<int32, int64> outputs = 3;
*/
int getOutputsCount();
/**
* map<int32, int64> outputs = 3;
*/
boolean containsOutputs(
int key);
/**
* Use {@link #getOutputsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getOutputs();
/**
* map<int32, int64> outputs = 3;
*/
java.util.Map
getOutputsMap();
/**
* map<int32, int64> outputs = 3;
*/
long getOutputsOrDefault(
int key,
long defaultValue);
/**
* map<int32, int64> outputs = 3;
*/
long getOutputsOrThrow(
int key);
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
int getOutputShapesCount();
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
boolean containsOutputShapes(
int key);
/**
* Use {@link #getOutputShapesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getOutputShapes();
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
java.util.Map
getOutputShapesMap();
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue);
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrThrow(
int key);
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
int getSrcOutputIndexCount();
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
boolean containsSrcOutputIndex(
long key);
/**
* Use {@link #getSrcOutputIndexMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getSrcOutputIndex();
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
java.util.Map
getSrcOutputIndexMap();
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
int getSrcOutputIndexOrDefault(
long key,
int defaultValue);
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
int getSrcOutputIndexOrThrow(
long key);
/**
* repeated int64 shape = 4;
*/
java.util.List getShapeList();
/**
* repeated int64 shape = 4;
*/
int getShapeCount();
/**
* repeated int64 shape = 4;
*/
long getShape(int index);
/**
* repeated string op_types = 5;
*/
java.util.List
getOpTypesList();
/**
* repeated string op_types = 5;
*/
int getOpTypesCount();
/**
* repeated string op_types = 5;
*/
java.lang.String getOpTypes(int index);
/**
* repeated string op_types = 5;
*/
com.google.protobuf.ByteString
getOpTypesBytes(int index);
/**
* string canonical_device = 6;
*/
java.lang.String getCanonicalDevice();
/**
* string canonical_device = 6;
*/
com.google.protobuf.ByteString
getCanonicalDeviceBytes();
/**
* string host_device = 7;
*/
java.lang.String getHostDevice();
/**
* string host_device = 7;
*/
com.google.protobuf.ByteString
getHostDeviceBytes();
/**
* int64 float_ops = 8;
*/
long getFloatOps();
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
boolean hasTrace();
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
tensorflow.tfprof.TfprofLog.CodeDef getTrace();
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getTraceOrBuilder();
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
int getAttrsCount();
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
boolean containsAttrs(
java.lang.String key);
/**
* Use {@link #getAttrsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getAttrs();
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
java.util.Map
getAttrsMap();
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
org.tensorflow.framework.AttrValue getAttrsOrDefault(
java.lang.String key,
org.tensorflow.framework.AttrValue defaultValue);
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
org.tensorflow.framework.AttrValue getAttrsOrThrow(
java.lang.String key);
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
int getExecsCount();
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
boolean containsExecs(
long key);
/**
* Use {@link #getExecsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExecs();
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
java.util.Map
getExecsMap();
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ExecProfile defaultValue);
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrThrow(
long key);
}
/**
* Protobuf type {@code tensorflow.tfprof.ProfileNode}
*/
public static final class ProfileNode extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.tfprof.ProfileNode)
ProfileNodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use ProfileNode.newBuilder() to construct.
private ProfileNode(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ProfileNode() {
name_ = "";
op_ = "";
id_ = 0L;
shape_ = java.util.Collections.emptyList();
opTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
canonicalDevice_ = "";
hostDevice_ = "";
floatOps_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ProfileNode(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
inputs_ = com.google.protobuf.MapField.newMapField(
InputsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000008;
}
com.google.protobuf.MapEntry
inputs__ = input.readMessage(
InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
inputs_.getMutableMap().put(
inputs__.getKey(), inputs__.getValue());
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
outputs_ = com.google.protobuf.MapField.newMapField(
OutputsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000020;
}
com.google.protobuf.MapEntry
outputs__ = input.readMessage(
OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
outputs_.getMutableMap().put(
outputs__.getKey(), outputs__.getValue());
break;
}
case 32: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
shape_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
shape_.add(input.readInt64());
break;
}
case 34: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) {
shape_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
while (input.getBytesUntilLimit() > 0) {
shape_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
opTypes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000200;
}
opTypes_.add(s);
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
canonicalDevice_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
hostDevice_ = s;
break;
}
case 64: {
floatOps_ = input.readInt64();
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
op_ = s;
break;
}
case 82: {
tensorflow.tfprof.TfprofLog.CodeDef.Builder subBuilder = null;
if (trace_ != null) {
subBuilder = trace_.toBuilder();
}
trace_ = input.readMessage(tensorflow.tfprof.TfprofLog.CodeDef.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trace_);
trace_ = subBuilder.buildPartial();
}
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
attrs_ = com.google.protobuf.MapField.newMapField(
AttrsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00004000;
}
com.google.protobuf.MapEntry
attrs__ = input.readMessage(
AttrsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
attrs_.getMutableMap().put(
attrs__.getKey(), attrs__.getValue());
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) {
execs_ = com.google.protobuf.MapField.newMapField(
ExecsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00008000;
}
com.google.protobuf.MapEntry
execs__ = input.readMessage(
ExecsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
execs_.getMutableMap().put(
execs__.getKey(), execs__.getValue());
break;
}
case 104: {
id_ = input.readInt64();
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
srcOutputIndex_ = com.google.protobuf.MapField.newMapField(
SrcOutputIndexDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000080;
}
com.google.protobuf.MapEntry
srcOutputIndex__ = input.readMessage(
SrcOutputIndexDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
srcOutputIndex_.getMutableMap().put(
srcOutputIndex__.getKey(), srcOutputIndex__.getValue());
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
outputShapes_ = com.google.protobuf.MapField.newMapField(
OutputShapesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000040;
}
com.google.protobuf.MapEntry
outputShapes__ = input.readMessage(
OutputShapesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
outputShapes_.getMutableMap().put(
outputShapes__.getKey(), outputShapes__.getValue());
break;
}
case 130: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
inputShapes_ = com.google.protobuf.MapField.newMapField(
InputShapesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000010;
}
com.google.protobuf.MapEntry
inputShapes__ = input.readMessage(
InputShapesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
inputShapes_.getMutableMap().put(
inputShapes__.getKey(), inputShapes__.getValue());
break;
}
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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_ & 0x00000100) == 0x00000100)) {
shape_ = java.util.Collections.unmodifiableList(shape_);
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
opTypes_ = opTypes_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetInputs();
case 16:
return internalGetInputShapes();
case 3:
return internalGetOutputs();
case 15:
return internalGetOutputShapes();
case 14:
return internalGetSrcOutputIndex();
case 11:
return internalGetAttrs();
case 12:
return internalGetExecs();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.ProfileNode.class, tensorflow.tfprof.TfprofLog.ProfileNode.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* graph node name.
*
*
* 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;
}
}
/**
*
* graph node name.
*
*
* 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 OP_FIELD_NUMBER = 9;
private volatile java.lang.Object op_;
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public java.lang.String getOp() {
java.lang.Object ref = op_;
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();
op_ = s;
return s;
}
}
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public com.google.protobuf.ByteString
getOpBytes() {
java.lang.Object ref = op_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
op_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 13;
private long id_;
/**
*
* A unique id for the node.
*
*
* int64 id = 13;
*/
public long getId() {
return id_;
}
public static final int INPUTS_FIELD_NUMBER = 2;
private static final class InputsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, java.lang.Long> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_InputsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT32,
0,
com.google.protobuf.WireFormat.FieldType.INT64,
0L);
}
private com.google.protobuf.MapField<
java.lang.Integer, java.lang.Long> inputs_;
private com.google.protobuf.MapField
internalGetInputs() {
if (inputs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InputsDefaultEntryHolder.defaultEntry);
}
return inputs_;
}
public int getInputsCount() {
return internalGetInputs().getMap().size();
}
/**
* map<int32, int64> inputs = 2;
*/
public boolean containsInputs(
int key) {
return internalGetInputs().getMap().containsKey(key);
}
/**
* Use {@link #getInputsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInputs() {
return getInputsMap();
}
/**
* map<int32, int64> inputs = 2;
*/
public java.util.Map getInputsMap() {
return internalGetInputs().getMap();
}
/**
* map<int32, int64> inputs = 2;
*/
public long getInputsOrDefault(
int key,
long defaultValue) {
java.util.Map map =
internalGetInputs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, int64> inputs = 2;
*/
public long getInputsOrThrow(
int key) {
java.util.Map map =
internalGetInputs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int INPUT_SHAPES_FIELD_NUMBER = 16;
private static final class InputShapesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_InputShapesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT32,
0,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
tensorflow.tfprof.TfprofLog.Tuple.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> inputShapes_;
private com.google.protobuf.MapField
internalGetInputShapes() {
if (inputShapes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InputShapesDefaultEntryHolder.defaultEntry);
}
return inputShapes_;
}
public int getInputShapesCount() {
return internalGetInputShapes().getMap().size();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public boolean containsInputShapes(
int key) {
return internalGetInputShapes().getMap().containsKey(key);
}
/**
* Use {@link #getInputShapesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInputShapes() {
return getInputShapesMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public java.util.Map getInputShapesMap() {
return internalGetInputShapes().getMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue) {
java.util.Map map =
internalGetInputShapes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrThrow(
int key) {
java.util.Map map =
internalGetInputShapes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int OUTPUTS_FIELD_NUMBER = 3;
private static final class OutputsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, java.lang.Long> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_OutputsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT32,
0,
com.google.protobuf.WireFormat.FieldType.INT64,
0L);
}
private com.google.protobuf.MapField<
java.lang.Integer, java.lang.Long> outputs_;
private com.google.protobuf.MapField
internalGetOutputs() {
if (outputs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OutputsDefaultEntryHolder.defaultEntry);
}
return outputs_;
}
public int getOutputsCount() {
return internalGetOutputs().getMap().size();
}
/**
* map<int32, int64> outputs = 3;
*/
public boolean containsOutputs(
int key) {
return internalGetOutputs().getMap().containsKey(key);
}
/**
* Use {@link #getOutputsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getOutputs() {
return getOutputsMap();
}
/**
* map<int32, int64> outputs = 3;
*/
public java.util.Map getOutputsMap() {
return internalGetOutputs().getMap();
}
/**
* map<int32, int64> outputs = 3;
*/
public long getOutputsOrDefault(
int key,
long defaultValue) {
java.util.Map map =
internalGetOutputs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, int64> outputs = 3;
*/
public long getOutputsOrThrow(
int key) {
java.util.Map map =
internalGetOutputs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int OUTPUT_SHAPES_FIELD_NUMBER = 15;
private static final class OutputShapesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_OutputShapesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT32,
0,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
tensorflow.tfprof.TfprofLog.Tuple.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> outputShapes_;
private com.google.protobuf.MapField
internalGetOutputShapes() {
if (outputShapes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OutputShapesDefaultEntryHolder.defaultEntry);
}
return outputShapes_;
}
public int getOutputShapesCount() {
return internalGetOutputShapes().getMap().size();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public boolean containsOutputShapes(
int key) {
return internalGetOutputShapes().getMap().containsKey(key);
}
/**
* Use {@link #getOutputShapesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getOutputShapes() {
return getOutputShapesMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public java.util.Map getOutputShapesMap() {
return internalGetOutputShapes().getMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue) {
java.util.Map map =
internalGetOutputShapes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrThrow(
int key) {
java.util.Map map =
internalGetOutputShapes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SRC_OUTPUT_INDEX_FIELD_NUMBER = 14;
private static final class SrcOutputIndexDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_SrcOutputIndexEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.INT32,
0);
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.Integer> srcOutputIndex_;
private com.google.protobuf.MapField
internalGetSrcOutputIndex() {
if (srcOutputIndex_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SrcOutputIndexDefaultEntryHolder.defaultEntry);
}
return srcOutputIndex_;
}
public int getSrcOutputIndexCount() {
return internalGetSrcOutputIndex().getMap().size();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public boolean containsSrcOutputIndex(
long key) {
return internalGetSrcOutputIndex().getMap().containsKey(key);
}
/**
* Use {@link #getSrcOutputIndexMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSrcOutputIndex() {
return getSrcOutputIndexMap();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public java.util.Map getSrcOutputIndexMap() {
return internalGetSrcOutputIndex().getMap();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public int getSrcOutputIndexOrDefault(
long key,
int defaultValue) {
java.util.Map map =
internalGetSrcOutputIndex().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public int getSrcOutputIndexOrThrow(
long key) {
java.util.Map map =
internalGetSrcOutputIndex().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SHAPE_FIELD_NUMBER = 4;
private java.util.List shape_;
/**
* repeated int64 shape = 4;
*/
public java.util.List
getShapeList() {
return shape_;
}
/**
* repeated int64 shape = 4;
*/
public int getShapeCount() {
return shape_.size();
}
/**
* repeated int64 shape = 4;
*/
public long getShape(int index) {
return shape_.get(index);
}
private int shapeMemoizedSerializedSize = -1;
public static final int OP_TYPES_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList opTypes_;
/**
* repeated string op_types = 5;
*/
public com.google.protobuf.ProtocolStringList
getOpTypesList() {
return opTypes_;
}
/**
* repeated string op_types = 5;
*/
public int getOpTypesCount() {
return opTypes_.size();
}
/**
* repeated string op_types = 5;
*/
public java.lang.String getOpTypes(int index) {
return opTypes_.get(index);
}
/**
* repeated string op_types = 5;
*/
public com.google.protobuf.ByteString
getOpTypesBytes(int index) {
return opTypes_.getByteString(index);
}
public static final int CANONICAL_DEVICE_FIELD_NUMBER = 6;
private volatile java.lang.Object canonicalDevice_;
/**
* string canonical_device = 6;
*/
public java.lang.String getCanonicalDevice() {
java.lang.Object ref = canonicalDevice_;
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();
canonicalDevice_ = s;
return s;
}
}
/**
* string canonical_device = 6;
*/
public com.google.protobuf.ByteString
getCanonicalDeviceBytes() {
java.lang.Object ref = canonicalDevice_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
canonicalDevice_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HOST_DEVICE_FIELD_NUMBER = 7;
private volatile java.lang.Object hostDevice_;
/**
* string host_device = 7;
*/
public java.lang.String getHostDevice() {
java.lang.Object ref = hostDevice_;
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();
hostDevice_ = s;
return s;
}
}
/**
* string host_device = 7;
*/
public com.google.protobuf.ByteString
getHostDeviceBytes() {
java.lang.Object ref = hostDevice_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostDevice_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FLOAT_OPS_FIELD_NUMBER = 8;
private long floatOps_;
/**
* int64 float_ops = 8;
*/
public long getFloatOps() {
return floatOps_;
}
public static final int TRACE_FIELD_NUMBER = 10;
private tensorflow.tfprof.TfprofLog.CodeDef trace_;
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public boolean hasTrace() {
return trace_ != null;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public tensorflow.tfprof.TfprofLog.CodeDef getTrace() {
return trace_ == null ? tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : trace_;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getTraceOrBuilder() {
return getTrace();
}
public static final int ATTRS_FIELD_NUMBER = 11;
private static final class AttrsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, org.tensorflow.framework.AttrValue> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_AttrsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
org.tensorflow.framework.AttrValue.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, org.tensorflow.framework.AttrValue> attrs_;
private com.google.protobuf.MapField
internalGetAttrs() {
if (attrs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
AttrsDefaultEntryHolder.defaultEntry);
}
return attrs_;
}
public int getAttrsCount() {
return internalGetAttrs().getMap().size();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public boolean containsAttrs(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetAttrs().getMap().containsKey(key);
}
/**
* Use {@link #getAttrsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getAttrs() {
return getAttrsMap();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public java.util.Map getAttrsMap() {
return internalGetAttrs().getMap();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public org.tensorflow.framework.AttrValue getAttrsOrDefault(
java.lang.String key,
org.tensorflow.framework.AttrValue defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetAttrs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public org.tensorflow.framework.AttrValue getAttrsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetAttrs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int EXECS_FIELD_NUMBER = 12;
private static final class ExecsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Long, tensorflow.tfprof.TfprofLog.ExecProfile> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_ExecsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT64,
0L,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
tensorflow.tfprof.TfprofLog.ExecProfile.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.Long, tensorflow.tfprof.TfprofLog.ExecProfile> execs_;
private com.google.protobuf.MapField
internalGetExecs() {
if (execs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExecsDefaultEntryHolder.defaultEntry);
}
return execs_;
}
public int getExecsCount() {
return internalGetExecs().getMap().size();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public boolean containsExecs(
long key) {
return internalGetExecs().getMap().containsKey(key);
}
/**
* Use {@link #getExecsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getExecs() {
return getExecsMap();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public java.util.Map getExecsMap() {
return internalGetExecs().getMap();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ExecProfile defaultValue) {
java.util.Map map =
internalGetExecs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrThrow(
long key) {
java.util.Map map =
internalGetExecs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetInputs(),
InputsDefaultEntryHolder.defaultEntry,
2);
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetOutputs(),
OutputsDefaultEntryHolder.defaultEntry,
3);
if (getShapeList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(shapeMemoizedSerializedSize);
}
for (int i = 0; i < shape_.size(); i++) {
output.writeInt64NoTag(shape_.get(i));
}
for (int i = 0; i < opTypes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, opTypes_.getRaw(i));
}
if (!getCanonicalDeviceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, canonicalDevice_);
}
if (!getHostDeviceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, hostDevice_);
}
if (floatOps_ != 0L) {
output.writeInt64(8, floatOps_);
}
if (!getOpBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, op_);
}
if (trace_ != null) {
output.writeMessage(10, getTrace());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetAttrs(),
AttrsDefaultEntryHolder.defaultEntry,
11);
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetExecs(),
ExecsDefaultEntryHolder.defaultEntry,
12);
if (id_ != 0L) {
output.writeInt64(13, id_);
}
com.google.protobuf.GeneratedMessageV3
.serializeLongMapTo(
output,
internalGetSrcOutputIndex(),
SrcOutputIndexDefaultEntryHolder.defaultEntry,
14);
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetOutputShapes(),
OutputShapesDefaultEntryHolder.defaultEntry,
15);
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetInputShapes(),
InputShapesDefaultEntryHolder.defaultEntry,
16);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (java.util.Map.Entry entry
: internalGetInputs().getMap().entrySet()) {
com.google.protobuf.MapEntry
inputs__ = InputsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, inputs__);
}
for (java.util.Map.Entry entry
: internalGetOutputs().getMap().entrySet()) {
com.google.protobuf.MapEntry
outputs__ = OutputsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, outputs__);
}
{
int dataSize = 0;
for (int i = 0; i < shape_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(shape_.get(i));
}
size += dataSize;
if (!getShapeList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
shapeMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < opTypes_.size(); i++) {
dataSize += computeStringSizeNoTag(opTypes_.getRaw(i));
}
size += dataSize;
size += 1 * getOpTypesList().size();
}
if (!getCanonicalDeviceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, canonicalDevice_);
}
if (!getHostDeviceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, hostDevice_);
}
if (floatOps_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(8, floatOps_);
}
if (!getOpBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, op_);
}
if (trace_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getTrace());
}
for (java.util.Map.Entry entry
: internalGetAttrs().getMap().entrySet()) {
com.google.protobuf.MapEntry
attrs__ = AttrsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, attrs__);
}
for (java.util.Map.Entry entry
: internalGetExecs().getMap().entrySet()) {
com.google.protobuf.MapEntry
execs__ = ExecsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, execs__);
}
if (id_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(13, id_);
}
for (java.util.Map.Entry entry
: internalGetSrcOutputIndex().getMap().entrySet()) {
com.google.protobuf.MapEntry
srcOutputIndex__ = SrcOutputIndexDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, srcOutputIndex__);
}
for (java.util.Map.Entry entry
: internalGetOutputShapes().getMap().entrySet()) {
com.google.protobuf.MapEntry
outputShapes__ = OutputShapesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, outputShapes__);
}
for (java.util.Map.Entry entry
: internalGetInputShapes().getMap().entrySet()) {
com.google.protobuf.MapEntry
inputShapes__ = InputShapesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, inputShapes__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof tensorflow.tfprof.TfprofLog.ProfileNode)) {
return super.equals(obj);
}
tensorflow.tfprof.TfprofLog.ProfileNode other = (tensorflow.tfprof.TfprofLog.ProfileNode) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getOp()
.equals(other.getOp());
result = result && (getId()
== other.getId());
result = result && internalGetInputs().equals(
other.internalGetInputs());
result = result && internalGetInputShapes().equals(
other.internalGetInputShapes());
result = result && internalGetOutputs().equals(
other.internalGetOutputs());
result = result && internalGetOutputShapes().equals(
other.internalGetOutputShapes());
result = result && internalGetSrcOutputIndex().equals(
other.internalGetSrcOutputIndex());
result = result && getShapeList()
.equals(other.getShapeList());
result = result && getOpTypesList()
.equals(other.getOpTypesList());
result = result && getCanonicalDevice()
.equals(other.getCanonicalDevice());
result = result && getHostDevice()
.equals(other.getHostDevice());
result = result && (getFloatOps()
== other.getFloatOps());
result = result && (hasTrace() == other.hasTrace());
if (hasTrace()) {
result = result && getTrace()
.equals(other.getTrace());
}
result = result && internalGetAttrs().equals(
other.internalGetAttrs());
result = result && internalGetExecs().equals(
other.internalGetExecs());
result = result && unknownFields.equals(other.unknownFields);
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) + OP_FIELD_NUMBER;
hash = (53 * hash) + getOp().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getId());
if (!internalGetInputs().getMap().isEmpty()) {
hash = (37 * hash) + INPUTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetInputs().hashCode();
}
if (!internalGetInputShapes().getMap().isEmpty()) {
hash = (37 * hash) + INPUT_SHAPES_FIELD_NUMBER;
hash = (53 * hash) + internalGetInputShapes().hashCode();
}
if (!internalGetOutputs().getMap().isEmpty()) {
hash = (37 * hash) + OUTPUTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetOutputs().hashCode();
}
if (!internalGetOutputShapes().getMap().isEmpty()) {
hash = (37 * hash) + OUTPUT_SHAPES_FIELD_NUMBER;
hash = (53 * hash) + internalGetOutputShapes().hashCode();
}
if (!internalGetSrcOutputIndex().getMap().isEmpty()) {
hash = (37 * hash) + SRC_OUTPUT_INDEX_FIELD_NUMBER;
hash = (53 * hash) + internalGetSrcOutputIndex().hashCode();
}
if (getShapeCount() > 0) {
hash = (37 * hash) + SHAPE_FIELD_NUMBER;
hash = (53 * hash) + getShapeList().hashCode();
}
if (getOpTypesCount() > 0) {
hash = (37 * hash) + OP_TYPES_FIELD_NUMBER;
hash = (53 * hash) + getOpTypesList().hashCode();
}
hash = (37 * hash) + CANONICAL_DEVICE_FIELD_NUMBER;
hash = (53 * hash) + getCanonicalDevice().hashCode();
hash = (37 * hash) + HOST_DEVICE_FIELD_NUMBER;
hash = (53 * hash) + getHostDevice().hashCode();
hash = (37 * hash) + FLOAT_OPS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFloatOps());
if (hasTrace()) {
hash = (37 * hash) + TRACE_FIELD_NUMBER;
hash = (53 * hash) + getTrace().hashCode();
}
if (!internalGetAttrs().getMap().isEmpty()) {
hash = (37 * hash) + ATTRS_FIELD_NUMBER;
hash = (53 * hash) + internalGetAttrs().hashCode();
}
if (!internalGetExecs().getMap().isEmpty()) {
hash = (37 * hash) + EXECS_FIELD_NUMBER;
hash = (53 * hash) + internalGetExecs().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode 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 tensorflow.tfprof.TfprofLog.ProfileNode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode 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 tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static tensorflow.tfprof.TfprofLog.ProfileNode parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(tensorflow.tfprof.TfprofLog.ProfileNode prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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.tfprof.ProfileNode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.tfprof.ProfileNode)
tensorflow.tfprof.TfprofLog.ProfileNodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetInputs();
case 16:
return internalGetInputShapes();
case 3:
return internalGetOutputs();
case 15:
return internalGetOutputShapes();
case 14:
return internalGetSrcOutputIndex();
case 11:
return internalGetAttrs();
case 12:
return internalGetExecs();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableInputs();
case 16:
return internalGetMutableInputShapes();
case 3:
return internalGetMutableOutputs();
case 15:
return internalGetMutableOutputShapes();
case 14:
return internalGetMutableSrcOutputIndex();
case 11:
return internalGetMutableAttrs();
case 12:
return internalGetMutableExecs();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
tensorflow.tfprof.TfprofLog.ProfileNode.class, tensorflow.tfprof.TfprofLog.ProfileNode.Builder.class);
}
// Construct using tensorflow.tfprof.TfprofLog.ProfileNode.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
op_ = "";
id_ = 0L;
internalGetMutableInputs().clear();
internalGetMutableInputShapes().clear();
internalGetMutableOutputs().clear();
internalGetMutableOutputShapes().clear();
internalGetMutableSrcOutputIndex().clear();
shape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
opTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
canonicalDevice_ = "";
hostDevice_ = "";
floatOps_ = 0L;
if (traceBuilder_ == null) {
trace_ = null;
} else {
trace_ = null;
traceBuilder_ = null;
}
internalGetMutableAttrs().clear();
internalGetMutableExecs().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return tensorflow.tfprof.TfprofLog.internal_static_tensorflow_tfprof_ProfileNode_descriptor;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileNode getDefaultInstanceForType() {
return tensorflow.tfprof.TfprofLog.ProfileNode.getDefaultInstance();
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileNode build() {
tensorflow.tfprof.TfprofLog.ProfileNode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public tensorflow.tfprof.TfprofLog.ProfileNode buildPartial() {
tensorflow.tfprof.TfprofLog.ProfileNode result = new tensorflow.tfprof.TfprofLog.ProfileNode(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.op_ = op_;
result.id_ = id_;
result.inputs_ = internalGetInputs();
result.inputs_.makeImmutable();
result.inputShapes_ = internalGetInputShapes();
result.inputShapes_.makeImmutable();
result.outputs_ = internalGetOutputs();
result.outputs_.makeImmutable();
result.outputShapes_ = internalGetOutputShapes();
result.outputShapes_.makeImmutable();
result.srcOutputIndex_ = internalGetSrcOutputIndex();
result.srcOutputIndex_.makeImmutable();
if (((bitField0_ & 0x00000100) == 0x00000100)) {
shape_ = java.util.Collections.unmodifiableList(shape_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.shape_ = shape_;
if (((bitField0_ & 0x00000200) == 0x00000200)) {
opTypes_ = opTypes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000200);
}
result.opTypes_ = opTypes_;
result.canonicalDevice_ = canonicalDevice_;
result.hostDevice_ = hostDevice_;
result.floatOps_ = floatOps_;
if (traceBuilder_ == null) {
result.trace_ = trace_;
} else {
result.trace_ = traceBuilder_.build();
}
result.attrs_ = internalGetAttrs();
result.attrs_.makeImmutable();
result.execs_ = internalGetExecs();
result.execs_.makeImmutable();
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof tensorflow.tfprof.TfprofLog.ProfileNode) {
return mergeFrom((tensorflow.tfprof.TfprofLog.ProfileNode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(tensorflow.tfprof.TfprofLog.ProfileNode other) {
if (other == tensorflow.tfprof.TfprofLog.ProfileNode.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getOp().isEmpty()) {
op_ = other.op_;
onChanged();
}
if (other.getId() != 0L) {
setId(other.getId());
}
internalGetMutableInputs().mergeFrom(
other.internalGetInputs());
internalGetMutableInputShapes().mergeFrom(
other.internalGetInputShapes());
internalGetMutableOutputs().mergeFrom(
other.internalGetOutputs());
internalGetMutableOutputShapes().mergeFrom(
other.internalGetOutputShapes());
internalGetMutableSrcOutputIndex().mergeFrom(
other.internalGetSrcOutputIndex());
if (!other.shape_.isEmpty()) {
if (shape_.isEmpty()) {
shape_ = other.shape_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureShapeIsMutable();
shape_.addAll(other.shape_);
}
onChanged();
}
if (!other.opTypes_.isEmpty()) {
if (opTypes_.isEmpty()) {
opTypes_ = other.opTypes_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureOpTypesIsMutable();
opTypes_.addAll(other.opTypes_);
}
onChanged();
}
if (!other.getCanonicalDevice().isEmpty()) {
canonicalDevice_ = other.canonicalDevice_;
onChanged();
}
if (!other.getHostDevice().isEmpty()) {
hostDevice_ = other.hostDevice_;
onChanged();
}
if (other.getFloatOps() != 0L) {
setFloatOps(other.getFloatOps());
}
if (other.hasTrace()) {
mergeTrace(other.getTrace());
}
internalGetMutableAttrs().mergeFrom(
other.internalGetAttrs());
internalGetMutableExecs().mergeFrom(
other.internalGetExecs());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
tensorflow.tfprof.TfprofLog.ProfileNode parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (tensorflow.tfprof.TfprofLog.ProfileNode) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* graph node name.
*
*
* 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;
}
}
/**
*
* graph node name.
*
*
* 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;
}
}
/**
*
* graph node name.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* graph node name.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* graph node name.
*
*
* 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 op_ = "";
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public java.lang.String getOp() {
java.lang.Object ref = op_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
op_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public com.google.protobuf.ByteString
getOpBytes() {
java.lang.Object ref = op_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
op_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public Builder setOp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
op_ = value;
onChanged();
return this;
}
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public Builder clearOp() {
op_ = getDefaultInstance().getOp();
onChanged();
return this;
}
/**
*
* graph operation type.
*
*
* string op = 9;
*/
public Builder setOpBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
op_ = value;
onChanged();
return this;
}
private long id_ ;
/**
*
* A unique id for the node.
*
*
* int64 id = 13;
*/
public long getId() {
return id_;
}
/**
*
* A unique id for the node.
*
*
* int64 id = 13;
*/
public Builder setId(long value) {
id_ = value;
onChanged();
return this;
}
/**
*
* A unique id for the node.
*
*
* int64 id = 13;
*/
public Builder clearId() {
id_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.Integer, java.lang.Long> inputs_;
private com.google.protobuf.MapField
internalGetInputs() {
if (inputs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InputsDefaultEntryHolder.defaultEntry);
}
return inputs_;
}
private com.google.protobuf.MapField
internalGetMutableInputs() {
onChanged();;
if (inputs_ == null) {
inputs_ = com.google.protobuf.MapField.newMapField(
InputsDefaultEntryHolder.defaultEntry);
}
if (!inputs_.isMutable()) {
inputs_ = inputs_.copy();
}
return inputs_;
}
public int getInputsCount() {
return internalGetInputs().getMap().size();
}
/**
* map<int32, int64> inputs = 2;
*/
public boolean containsInputs(
int key) {
return internalGetInputs().getMap().containsKey(key);
}
/**
* Use {@link #getInputsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInputs() {
return getInputsMap();
}
/**
* map<int32, int64> inputs = 2;
*/
public java.util.Map getInputsMap() {
return internalGetInputs().getMap();
}
/**
* map<int32, int64> inputs = 2;
*/
public long getInputsOrDefault(
int key,
long defaultValue) {
java.util.Map map =
internalGetInputs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, int64> inputs = 2;
*/
public long getInputsOrThrow(
int key) {
java.util.Map map =
internalGetInputs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearInputs() {
internalGetMutableInputs().getMutableMap()
.clear();
return this;
}
/**
* map<int32, int64> inputs = 2;
*/
public Builder removeInputs(
int key) {
internalGetMutableInputs().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableInputs() {
return internalGetMutableInputs().getMutableMap();
}
/**
* map<int32, int64> inputs = 2;
*/
public Builder putInputs(
int key,
long value) {
internalGetMutableInputs().getMutableMap()
.put(key, value);
return this;
}
/**
* map<int32, int64> inputs = 2;
*/
public Builder putAllInputs(
java.util.Map values) {
internalGetMutableInputs().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> inputShapes_;
private com.google.protobuf.MapField
internalGetInputShapes() {
if (inputShapes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InputShapesDefaultEntryHolder.defaultEntry);
}
return inputShapes_;
}
private com.google.protobuf.MapField
internalGetMutableInputShapes() {
onChanged();;
if (inputShapes_ == null) {
inputShapes_ = com.google.protobuf.MapField.newMapField(
InputShapesDefaultEntryHolder.defaultEntry);
}
if (!inputShapes_.isMutable()) {
inputShapes_ = inputShapes_.copy();
}
return inputShapes_;
}
public int getInputShapesCount() {
return internalGetInputShapes().getMap().size();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public boolean containsInputShapes(
int key) {
return internalGetInputShapes().getMap().containsKey(key);
}
/**
* Use {@link #getInputShapesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInputShapes() {
return getInputShapesMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public java.util.Map getInputShapesMap() {
return internalGetInputShapes().getMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue) {
java.util.Map map =
internalGetInputShapes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public tensorflow.tfprof.TfprofLog.Tuple getInputShapesOrThrow(
int key) {
java.util.Map map =
internalGetInputShapes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearInputShapes() {
internalGetMutableInputShapes().getMutableMap()
.clear();
return this;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public Builder removeInputShapes(
int key) {
internalGetMutableInputShapes().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableInputShapes() {
return internalGetMutableInputShapes().getMutableMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public Builder putInputShapes(
int key,
tensorflow.tfprof.TfprofLog.Tuple value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableInputShapes().getMutableMap()
.put(key, value);
return this;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16;
*/
public Builder putAllInputShapes(
java.util.Map values) {
internalGetMutableInputShapes().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Integer, java.lang.Long> outputs_;
private com.google.protobuf.MapField
internalGetOutputs() {
if (outputs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OutputsDefaultEntryHolder.defaultEntry);
}
return outputs_;
}
private com.google.protobuf.MapField
internalGetMutableOutputs() {
onChanged();;
if (outputs_ == null) {
outputs_ = com.google.protobuf.MapField.newMapField(
OutputsDefaultEntryHolder.defaultEntry);
}
if (!outputs_.isMutable()) {
outputs_ = outputs_.copy();
}
return outputs_;
}
public int getOutputsCount() {
return internalGetOutputs().getMap().size();
}
/**
* map<int32, int64> outputs = 3;
*/
public boolean containsOutputs(
int key) {
return internalGetOutputs().getMap().containsKey(key);
}
/**
* Use {@link #getOutputsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getOutputs() {
return getOutputsMap();
}
/**
* map<int32, int64> outputs = 3;
*/
public java.util.Map getOutputsMap() {
return internalGetOutputs().getMap();
}
/**
* map<int32, int64> outputs = 3;
*/
public long getOutputsOrDefault(
int key,
long defaultValue) {
java.util.Map map =
internalGetOutputs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, int64> outputs = 3;
*/
public long getOutputsOrThrow(
int key) {
java.util.Map map =
internalGetOutputs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearOutputs() {
internalGetMutableOutputs().getMutableMap()
.clear();
return this;
}
/**
* map<int32, int64> outputs = 3;
*/
public Builder removeOutputs(
int key) {
internalGetMutableOutputs().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableOutputs() {
return internalGetMutableOutputs().getMutableMap();
}
/**
* map<int32, int64> outputs = 3;
*/
public Builder putOutputs(
int key,
long value) {
internalGetMutableOutputs().getMutableMap()
.put(key, value);
return this;
}
/**
* map<int32, int64> outputs = 3;
*/
public Builder putAllOutputs(
java.util.Map values) {
internalGetMutableOutputs().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Integer, tensorflow.tfprof.TfprofLog.Tuple> outputShapes_;
private com.google.protobuf.MapField
internalGetOutputShapes() {
if (outputShapes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OutputShapesDefaultEntryHolder.defaultEntry);
}
return outputShapes_;
}
private com.google.protobuf.MapField
internalGetMutableOutputShapes() {
onChanged();;
if (outputShapes_ == null) {
outputShapes_ = com.google.protobuf.MapField.newMapField(
OutputShapesDefaultEntryHolder.defaultEntry);
}
if (!outputShapes_.isMutable()) {
outputShapes_ = outputShapes_.copy();
}
return outputShapes_;
}
public int getOutputShapesCount() {
return internalGetOutputShapes().getMap().size();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public boolean containsOutputShapes(
int key) {
return internalGetOutputShapes().getMap().containsKey(key);
}
/**
* Use {@link #getOutputShapesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getOutputShapes() {
return getOutputShapesMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public java.util.Map getOutputShapesMap() {
return internalGetOutputShapes().getMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrDefault(
int key,
tensorflow.tfprof.TfprofLog.Tuple defaultValue) {
java.util.Map map =
internalGetOutputShapes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public tensorflow.tfprof.TfprofLog.Tuple getOutputShapesOrThrow(
int key) {
java.util.Map map =
internalGetOutputShapes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearOutputShapes() {
internalGetMutableOutputShapes().getMutableMap()
.clear();
return this;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public Builder removeOutputShapes(
int key) {
internalGetMutableOutputShapes().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableOutputShapes() {
return internalGetMutableOutputShapes().getMutableMap();
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public Builder putOutputShapes(
int key,
tensorflow.tfprof.TfprofLog.Tuple value) {
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableOutputShapes().getMutableMap()
.put(key, value);
return this;
}
/**
* map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15;
*/
public Builder putAllOutputShapes(
java.util.Map values) {
internalGetMutableOutputShapes().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, java.lang.Integer> srcOutputIndex_;
private com.google.protobuf.MapField
internalGetSrcOutputIndex() {
if (srcOutputIndex_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SrcOutputIndexDefaultEntryHolder.defaultEntry);
}
return srcOutputIndex_;
}
private com.google.protobuf.MapField
internalGetMutableSrcOutputIndex() {
onChanged();;
if (srcOutputIndex_ == null) {
srcOutputIndex_ = com.google.protobuf.MapField.newMapField(
SrcOutputIndexDefaultEntryHolder.defaultEntry);
}
if (!srcOutputIndex_.isMutable()) {
srcOutputIndex_ = srcOutputIndex_.copy();
}
return srcOutputIndex_;
}
public int getSrcOutputIndexCount() {
return internalGetSrcOutputIndex().getMap().size();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public boolean containsSrcOutputIndex(
long key) {
return internalGetSrcOutputIndex().getMap().containsKey(key);
}
/**
* Use {@link #getSrcOutputIndexMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSrcOutputIndex() {
return getSrcOutputIndexMap();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public java.util.Map getSrcOutputIndexMap() {
return internalGetSrcOutputIndex().getMap();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public int getSrcOutputIndexOrDefault(
long key,
int defaultValue) {
java.util.Map map =
internalGetSrcOutputIndex().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public int getSrcOutputIndexOrThrow(
long key) {
java.util.Map map =
internalGetSrcOutputIndex().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearSrcOutputIndex() {
internalGetMutableSrcOutputIndex().getMutableMap()
.clear();
return this;
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public Builder removeSrcOutputIndex(
long key) {
internalGetMutableSrcOutputIndex().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableSrcOutputIndex() {
return internalGetMutableSrcOutputIndex().getMutableMap();
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public Builder putSrcOutputIndex(
long key,
int value) {
internalGetMutableSrcOutputIndex().getMutableMap()
.put(key, value);
return this;
}
/**
*
* A map from source node id to its output index to current node.
*
*
* map<int64, int32> src_output_index = 14;
*/
public Builder putAllSrcOutputIndex(
java.util.Map values) {
internalGetMutableSrcOutputIndex().getMutableMap()
.putAll(values);
return this;
}
private java.util.List shape_ = java.util.Collections.emptyList();
private void ensureShapeIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
shape_ = new java.util.ArrayList(shape_);
bitField0_ |= 0x00000100;
}
}
/**
* repeated int64 shape = 4;
*/
public java.util.List
getShapeList() {
return java.util.Collections.unmodifiableList(shape_);
}
/**
* repeated int64 shape = 4;
*/
public int getShapeCount() {
return shape_.size();
}
/**
* repeated int64 shape = 4;
*/
public long getShape(int index) {
return shape_.get(index);
}
/**
* repeated int64 shape = 4;
*/
public Builder setShape(
int index, long value) {
ensureShapeIsMutable();
shape_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 shape = 4;
*/
public Builder addShape(long value) {
ensureShapeIsMutable();
shape_.add(value);
onChanged();
return this;
}
/**
* repeated int64 shape = 4;
*/
public Builder addAllShape(
java.lang.Iterable extends java.lang.Long> values) {
ensureShapeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, shape_);
onChanged();
return this;
}
/**
* repeated int64 shape = 4;
*/
public Builder clearShape() {
shape_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList opTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureOpTypesIsMutable() {
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
opTypes_ = new com.google.protobuf.LazyStringArrayList(opTypes_);
bitField0_ |= 0x00000200;
}
}
/**
* repeated string op_types = 5;
*/
public com.google.protobuf.ProtocolStringList
getOpTypesList() {
return opTypes_.getUnmodifiableView();
}
/**
* repeated string op_types = 5;
*/
public int getOpTypesCount() {
return opTypes_.size();
}
/**
* repeated string op_types = 5;
*/
public java.lang.String getOpTypes(int index) {
return opTypes_.get(index);
}
/**
* repeated string op_types = 5;
*/
public com.google.protobuf.ByteString
getOpTypesBytes(int index) {
return opTypes_.getByteString(index);
}
/**
* repeated string op_types = 5;
*/
public Builder setOpTypes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOpTypesIsMutable();
opTypes_.set(index, value);
onChanged();
return this;
}
/**
* repeated string op_types = 5;
*/
public Builder addOpTypes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOpTypesIsMutable();
opTypes_.add(value);
onChanged();
return this;
}
/**
* repeated string op_types = 5;
*/
public Builder addAllOpTypes(
java.lang.Iterable values) {
ensureOpTypesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, opTypes_);
onChanged();
return this;
}
/**
* repeated string op_types = 5;
*/
public Builder clearOpTypes() {
opTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
* repeated string op_types = 5;
*/
public Builder addOpTypesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureOpTypesIsMutable();
opTypes_.add(value);
onChanged();
return this;
}
private java.lang.Object canonicalDevice_ = "";
/**
* string canonical_device = 6;
*/
public java.lang.String getCanonicalDevice() {
java.lang.Object ref = canonicalDevice_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
canonicalDevice_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string canonical_device = 6;
*/
public com.google.protobuf.ByteString
getCanonicalDeviceBytes() {
java.lang.Object ref = canonicalDevice_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
canonicalDevice_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string canonical_device = 6;
*/
public Builder setCanonicalDevice(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
canonicalDevice_ = value;
onChanged();
return this;
}
/**
* string canonical_device = 6;
*/
public Builder clearCanonicalDevice() {
canonicalDevice_ = getDefaultInstance().getCanonicalDevice();
onChanged();
return this;
}
/**
* string canonical_device = 6;
*/
public Builder setCanonicalDeviceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
canonicalDevice_ = value;
onChanged();
return this;
}
private java.lang.Object hostDevice_ = "";
/**
* string host_device = 7;
*/
public java.lang.String getHostDevice() {
java.lang.Object ref = hostDevice_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
hostDevice_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string host_device = 7;
*/
public com.google.protobuf.ByteString
getHostDeviceBytes() {
java.lang.Object ref = hostDevice_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostDevice_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string host_device = 7;
*/
public Builder setHostDevice(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostDevice_ = value;
onChanged();
return this;
}
/**
* string host_device = 7;
*/
public Builder clearHostDevice() {
hostDevice_ = getDefaultInstance().getHostDevice();
onChanged();
return this;
}
/**
* string host_device = 7;
*/
public Builder setHostDeviceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostDevice_ = value;
onChanged();
return this;
}
private long floatOps_ ;
/**
* int64 float_ops = 8;
*/
public long getFloatOps() {
return floatOps_;
}
/**
* int64 float_ops = 8;
*/
public Builder setFloatOps(long value) {
floatOps_ = value;
onChanged();
return this;
}
/**
* int64 float_ops = 8;
*/
public Builder clearFloatOps() {
floatOps_ = 0L;
onChanged();
return this;
}
private tensorflow.tfprof.TfprofLog.CodeDef trace_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder> traceBuilder_;
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public boolean hasTrace() {
return traceBuilder_ != null || trace_ != null;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public tensorflow.tfprof.TfprofLog.CodeDef getTrace() {
if (traceBuilder_ == null) {
return trace_ == null ? tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : trace_;
} else {
return traceBuilder_.getMessage();
}
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public Builder setTrace(tensorflow.tfprof.TfprofLog.CodeDef value) {
if (traceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trace_ = value;
onChanged();
} else {
traceBuilder_.setMessage(value);
}
return this;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public Builder setTrace(
tensorflow.tfprof.TfprofLog.CodeDef.Builder builderForValue) {
if (traceBuilder_ == null) {
trace_ = builderForValue.build();
onChanged();
} else {
traceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public Builder mergeTrace(tensorflow.tfprof.TfprofLog.CodeDef value) {
if (traceBuilder_ == null) {
if (trace_ != null) {
trace_ =
tensorflow.tfprof.TfprofLog.CodeDef.newBuilder(trace_).mergeFrom(value).buildPartial();
} else {
trace_ = value;
}
onChanged();
} else {
traceBuilder_.mergeFrom(value);
}
return this;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public Builder clearTrace() {
if (traceBuilder_ == null) {
trace_ = null;
onChanged();
} else {
trace_ = null;
traceBuilder_ = null;
}
return this;
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public tensorflow.tfprof.TfprofLog.CodeDef.Builder getTraceBuilder() {
onChanged();
return getTraceFieldBuilder().getBuilder();
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
public tensorflow.tfprof.TfprofLog.CodeDefOrBuilder getTraceOrBuilder() {
if (traceBuilder_ != null) {
return traceBuilder_.getMessageOrBuilder();
} else {
return trace_ == null ?
tensorflow.tfprof.TfprofLog.CodeDef.getDefaultInstance() : trace_;
}
}
/**
* .tensorflow.tfprof.CodeDef trace = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder>
getTraceFieldBuilder() {
if (traceBuilder_ == null) {
traceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
tensorflow.tfprof.TfprofLog.CodeDef, tensorflow.tfprof.TfprofLog.CodeDef.Builder, tensorflow.tfprof.TfprofLog.CodeDefOrBuilder>(
getTrace(),
getParentForChildren(),
isClean());
trace_ = null;
}
return traceBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, org.tensorflow.framework.AttrValue> attrs_;
private com.google.protobuf.MapField
internalGetAttrs() {
if (attrs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
AttrsDefaultEntryHolder.defaultEntry);
}
return attrs_;
}
private com.google.protobuf.MapField
internalGetMutableAttrs() {
onChanged();;
if (attrs_ == null) {
attrs_ = com.google.protobuf.MapField.newMapField(
AttrsDefaultEntryHolder.defaultEntry);
}
if (!attrs_.isMutable()) {
attrs_ = attrs_.copy();
}
return attrs_;
}
public int getAttrsCount() {
return internalGetAttrs().getMap().size();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public boolean containsAttrs(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetAttrs().getMap().containsKey(key);
}
/**
* Use {@link #getAttrsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getAttrs() {
return getAttrsMap();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public java.util.Map getAttrsMap() {
return internalGetAttrs().getMap();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public org.tensorflow.framework.AttrValue getAttrsOrDefault(
java.lang.String key,
org.tensorflow.framework.AttrValue defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetAttrs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public org.tensorflow.framework.AttrValue getAttrsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetAttrs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearAttrs() {
internalGetMutableAttrs().getMutableMap()
.clear();
return this;
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public Builder removeAttrs(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableAttrs().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableAttrs() {
return internalGetMutableAttrs().getMutableMap();
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public Builder putAttrs(
java.lang.String key,
org.tensorflow.framework.AttrValue value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableAttrs().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .tensorflow.AttrValue> attrs = 11;
*/
public Builder putAllAttrs(
java.util.Map values) {
internalGetMutableAttrs().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.Long, tensorflow.tfprof.TfprofLog.ExecProfile> execs_;
private com.google.protobuf.MapField
internalGetExecs() {
if (execs_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExecsDefaultEntryHolder.defaultEntry);
}
return execs_;
}
private com.google.protobuf.MapField
internalGetMutableExecs() {
onChanged();;
if (execs_ == null) {
execs_ = com.google.protobuf.MapField.newMapField(
ExecsDefaultEntryHolder.defaultEntry);
}
if (!execs_.isMutable()) {
execs_ = execs_.copy();
}
return execs_;
}
public int getExecsCount() {
return internalGetExecs().getMap().size();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public boolean containsExecs(
long key) {
return internalGetExecs().getMap().containsKey(key);
}
/**
* Use {@link #getExecsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getExecs() {
return getExecsMap();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public java.util.Map getExecsMap() {
return internalGetExecs().getMap();
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrDefault(
long key,
tensorflow.tfprof.TfprofLog.ExecProfile defaultValue) {
java.util.Map map =
internalGetExecs().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public tensorflow.tfprof.TfprofLog.ExecProfile getExecsOrThrow(
long key) {
java.util.Map map =
internalGetExecs().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExecs() {
internalGetMutableExecs().getMutableMap()
.clear();
return this;
}
/**
* map<int64, .tensorflow.tfprof.ExecProfile> execs = 12;
*/
public Builder removeExecs(
long key) {
internalGetMutableExecs().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExecs() {
return internalGetMutableExecs().getMutableMap();
}
/**
*