Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.tensorflow.framework.AllocatorMemoryUsed Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/framework/step_stats.proto
package org.tensorflow.framework;
/**
* Protobuf type {@code tensorflow.AllocatorMemoryUsed}
*/
public final class AllocatorMemoryUsed extends
org.nd4j.shade.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.AllocatorMemoryUsed)
AllocatorMemoryUsedOrBuilder {
private static final long serialVersionUID = 0L;
// Use AllocatorMemoryUsed.newBuilder() to construct.
private AllocatorMemoryUsed(org.nd4j.shade.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AllocatorMemoryUsed() {
allocatorName_ = "";
allocationRecords_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AllocatorMemoryUsed();
}
@java.lang.Override
public final org.nd4j.shade.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AllocatorMemoryUsed(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.nd4j.shade.protobuf.UnknownFieldSet.Builder unknownFields =
org.nd4j.shade.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();
allocatorName_ = s;
break;
}
case 16: {
totalBytes_ = input.readInt64();
break;
}
case 24: {
peakBytes_ = input.readInt64();
break;
}
case 32: {
liveBytes_ = input.readInt64();
break;
}
case 40: {
allocatorBytesInUse_ = input.readInt64();
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
allocationRecords_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
allocationRecords_.add(
input.readMessage(org.tensorflow.framework.AllocationRecord.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.nd4j.shade.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
allocationRecords_ = java.util.Collections.unmodifiableList(allocationRecords_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AllocatorMemoryUsed.class, org.tensorflow.framework.AllocatorMemoryUsed.Builder.class);
}
public static final int ALLOCATOR_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object allocatorName_;
/**
* string allocator_name = 1;
*/
public java.lang.String getAllocatorName() {
java.lang.Object ref = allocatorName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
allocatorName_ = s;
return s;
}
}
/**
* string allocator_name = 1;
*/
public org.nd4j.shade.protobuf.ByteString
getAllocatorNameBytes() {
java.lang.Object ref = allocatorName_;
if (ref instanceof java.lang.String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
allocatorName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
public static final int TOTAL_BYTES_FIELD_NUMBER = 2;
private long totalBytes_;
/**
*
* These are per-node allocator memory stats.
*
*
* int64 total_bytes = 2;
*/
public long getTotalBytes() {
return totalBytes_;
}
public static final int PEAK_BYTES_FIELD_NUMBER = 3;
private long peakBytes_;
/**
* int64 peak_bytes = 3;
*/
public long getPeakBytes() {
return peakBytes_;
}
public static final int LIVE_BYTES_FIELD_NUMBER = 4;
private long liveBytes_;
/**
*
* The bytes that are not deallocated.
*
*
* int64 live_bytes = 4;
*/
public long getLiveBytes() {
return liveBytes_;
}
public static final int ALLOCATION_RECORDS_FIELD_NUMBER = 6;
private java.util.List allocationRecords_;
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public java.util.List getAllocationRecordsList() {
return allocationRecords_;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public java.util.List
getAllocationRecordsOrBuilderList() {
return allocationRecords_;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public int getAllocationRecordsCount() {
return allocationRecords_.size();
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecord getAllocationRecords(int index) {
return allocationRecords_.get(index);
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecordOrBuilder getAllocationRecordsOrBuilder(
int index) {
return allocationRecords_.get(index);
}
public static final int ALLOCATOR_BYTES_IN_USE_FIELD_NUMBER = 5;
private long allocatorBytesInUse_;
/**
*
* These are snapshots of the overall allocator memory stats.
* The number of live bytes currently allocated by the allocator.
*
*
* int64 allocator_bytes_in_use = 5;
*/
public long getAllocatorBytesInUse() {
return allocatorBytesInUse_;
}
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(org.nd4j.shade.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getAllocatorNameBytes().isEmpty()) {
org.nd4j.shade.protobuf.GeneratedMessageV3.writeString(output, 1, allocatorName_);
}
if (totalBytes_ != 0L) {
output.writeInt64(2, totalBytes_);
}
if (peakBytes_ != 0L) {
output.writeInt64(3, peakBytes_);
}
if (liveBytes_ != 0L) {
output.writeInt64(4, liveBytes_);
}
if (allocatorBytesInUse_ != 0L) {
output.writeInt64(5, allocatorBytesInUse_);
}
for (int i = 0; i < allocationRecords_.size(); i++) {
output.writeMessage(6, allocationRecords_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getAllocatorNameBytes().isEmpty()) {
size += org.nd4j.shade.protobuf.GeneratedMessageV3.computeStringSize(1, allocatorName_);
}
if (totalBytes_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(2, totalBytes_);
}
if (peakBytes_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(3, peakBytes_);
}
if (liveBytes_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(4, liveBytes_);
}
if (allocatorBytesInUse_ != 0L) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeInt64Size(5, allocatorBytesInUse_);
}
for (int i = 0; i < allocationRecords_.size(); i++) {
size += org.nd4j.shade.protobuf.CodedOutputStream
.computeMessageSize(6, allocationRecords_.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 org.tensorflow.framework.AllocatorMemoryUsed)) {
return super.equals(obj);
}
org.tensorflow.framework.AllocatorMemoryUsed other = (org.tensorflow.framework.AllocatorMemoryUsed) obj;
if (!getAllocatorName()
.equals(other.getAllocatorName())) return false;
if (getTotalBytes()
!= other.getTotalBytes()) return false;
if (getPeakBytes()
!= other.getPeakBytes()) return false;
if (getLiveBytes()
!= other.getLiveBytes()) return false;
if (!getAllocationRecordsList()
.equals(other.getAllocationRecordsList())) return false;
if (getAllocatorBytesInUse()
!= other.getAllocatorBytesInUse()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ALLOCATOR_NAME_FIELD_NUMBER;
hash = (53 * hash) + getAllocatorName().hashCode();
hash = (37 * hash) + TOTAL_BYTES_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getTotalBytes());
hash = (37 * hash) + PEAK_BYTES_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getPeakBytes());
hash = (37 * hash) + LIVE_BYTES_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getLiveBytes());
if (getAllocationRecordsCount() > 0) {
hash = (37 * hash) + ALLOCATION_RECORDS_FIELD_NUMBER;
hash = (53 * hash) + getAllocationRecordsList().hashCode();
}
hash = (37 * hash) + ALLOCATOR_BYTES_IN_USE_FIELD_NUMBER;
hash = (53 * hash) + org.nd4j.shade.protobuf.Internal.hashLong(
getAllocatorBytesInUse());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
java.nio.ByteBuffer data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
java.nio.ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
org.nd4j.shade.protobuf.ByteString data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(byte[] data)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseDelimitedFrom(
java.io.InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.nd4j.shade.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.AllocatorMemoryUsed parseFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.nd4j.shade.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(org.tensorflow.framework.AllocatorMemoryUsed 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(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code tensorflow.AllocatorMemoryUsed}
*/
public static final class Builder extends
org.nd4j.shade.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.AllocatorMemoryUsed)
org.tensorflow.framework.AllocatorMemoryUsedOrBuilder {
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor;
}
@java.lang.Override
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.AllocatorMemoryUsed.class, org.tensorflow.framework.AllocatorMemoryUsed.Builder.class);
}
// Construct using org.tensorflow.framework.AllocatorMemoryUsed.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.nd4j.shade.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAllocationRecordsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
allocatorName_ = "";
totalBytes_ = 0L;
peakBytes_ = 0L;
liveBytes_ = 0L;
if (allocationRecordsBuilder_ == null) {
allocationRecords_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
allocationRecordsBuilder_.clear();
}
allocatorBytesInUse_ = 0L;
return this;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.StepStatsProtos.internal_static_tensorflow_AllocatorMemoryUsed_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstanceForType() {
return org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.AllocatorMemoryUsed build() {
org.tensorflow.framework.AllocatorMemoryUsed result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.AllocatorMemoryUsed buildPartial() {
org.tensorflow.framework.AllocatorMemoryUsed result = new org.tensorflow.framework.AllocatorMemoryUsed(this);
int from_bitField0_ = bitField0_;
result.allocatorName_ = allocatorName_;
result.totalBytes_ = totalBytes_;
result.peakBytes_ = peakBytes_;
result.liveBytes_ = liveBytes_;
if (allocationRecordsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
allocationRecords_ = java.util.Collections.unmodifiableList(allocationRecords_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.allocationRecords_ = allocationRecords_;
} else {
result.allocationRecords_ = allocationRecordsBuilder_.build();
}
result.allocatorBytesInUse_ = allocatorBytesInUse_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.nd4j.shade.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.AllocatorMemoryUsed) {
return mergeFrom((org.tensorflow.framework.AllocatorMemoryUsed)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.AllocatorMemoryUsed other) {
if (other == org.tensorflow.framework.AllocatorMemoryUsed.getDefaultInstance()) return this;
if (!other.getAllocatorName().isEmpty()) {
allocatorName_ = other.allocatorName_;
onChanged();
}
if (other.getTotalBytes() != 0L) {
setTotalBytes(other.getTotalBytes());
}
if (other.getPeakBytes() != 0L) {
setPeakBytes(other.getPeakBytes());
}
if (other.getLiveBytes() != 0L) {
setLiveBytes(other.getLiveBytes());
}
if (allocationRecordsBuilder_ == null) {
if (!other.allocationRecords_.isEmpty()) {
if (allocationRecords_.isEmpty()) {
allocationRecords_ = other.allocationRecords_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAllocationRecordsIsMutable();
allocationRecords_.addAll(other.allocationRecords_);
}
onChanged();
}
} else {
if (!other.allocationRecords_.isEmpty()) {
if (allocationRecordsBuilder_.isEmpty()) {
allocationRecordsBuilder_.dispose();
allocationRecordsBuilder_ = null;
allocationRecords_ = other.allocationRecords_;
bitField0_ = (bitField0_ & ~0x00000001);
allocationRecordsBuilder_ =
org.nd4j.shade.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAllocationRecordsFieldBuilder() : null;
} else {
allocationRecordsBuilder_.addAllMessages(other.allocationRecords_);
}
}
}
if (other.getAllocatorBytesInUse() != 0L) {
setAllocatorBytesInUse(other.getAllocatorBytesInUse());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.tensorflow.framework.AllocatorMemoryUsed parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.nd4j.shade.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.AllocatorMemoryUsed) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object allocatorName_ = "";
/**
* string allocator_name = 1;
*/
public java.lang.String getAllocatorName() {
java.lang.Object ref = allocatorName_;
if (!(ref instanceof java.lang.String)) {
org.nd4j.shade.protobuf.ByteString bs =
(org.nd4j.shade.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
allocatorName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string allocator_name = 1;
*/
public org.nd4j.shade.protobuf.ByteString
getAllocatorNameBytes() {
java.lang.Object ref = allocatorName_;
if (ref instanceof String) {
org.nd4j.shade.protobuf.ByteString b =
org.nd4j.shade.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
allocatorName_ = b;
return b;
} else {
return (org.nd4j.shade.protobuf.ByteString) ref;
}
}
/**
* string allocator_name = 1;
*/
public Builder setAllocatorName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
allocatorName_ = value;
onChanged();
return this;
}
/**
* string allocator_name = 1;
*/
public Builder clearAllocatorName() {
allocatorName_ = getDefaultInstance().getAllocatorName();
onChanged();
return this;
}
/**
* string allocator_name = 1;
*/
public Builder setAllocatorNameBytes(
org.nd4j.shade.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
allocatorName_ = value;
onChanged();
return this;
}
private long totalBytes_ ;
/**
*
* These are per-node allocator memory stats.
*
*
* int64 total_bytes = 2;
*/
public long getTotalBytes() {
return totalBytes_;
}
/**
*
* These are per-node allocator memory stats.
*
*
* int64 total_bytes = 2;
*/
public Builder setTotalBytes(long value) {
totalBytes_ = value;
onChanged();
return this;
}
/**
*
* These are per-node allocator memory stats.
*
*
* int64 total_bytes = 2;
*/
public Builder clearTotalBytes() {
totalBytes_ = 0L;
onChanged();
return this;
}
private long peakBytes_ ;
/**
* int64 peak_bytes = 3;
*/
public long getPeakBytes() {
return peakBytes_;
}
/**
* int64 peak_bytes = 3;
*/
public Builder setPeakBytes(long value) {
peakBytes_ = value;
onChanged();
return this;
}
/**
* int64 peak_bytes = 3;
*/
public Builder clearPeakBytes() {
peakBytes_ = 0L;
onChanged();
return this;
}
private long liveBytes_ ;
/**
*
* The bytes that are not deallocated.
*
*
* int64 live_bytes = 4;
*/
public long getLiveBytes() {
return liveBytes_;
}
/**
*
* The bytes that are not deallocated.
*
*
* int64 live_bytes = 4;
*/
public Builder setLiveBytes(long value) {
liveBytes_ = value;
onChanged();
return this;
}
/**
*
* The bytes that are not deallocated.
*
*
* int64 live_bytes = 4;
*/
public Builder clearLiveBytes() {
liveBytes_ = 0L;
onChanged();
return this;
}
private java.util.List allocationRecords_ =
java.util.Collections.emptyList();
private void ensureAllocationRecordsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
allocationRecords_ = new java.util.ArrayList(allocationRecords_);
bitField0_ |= 0x00000001;
}
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.AllocationRecord, org.tensorflow.framework.AllocationRecord.Builder, org.tensorflow.framework.AllocationRecordOrBuilder> allocationRecordsBuilder_;
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public java.util.List getAllocationRecordsList() {
if (allocationRecordsBuilder_ == null) {
return java.util.Collections.unmodifiableList(allocationRecords_);
} else {
return allocationRecordsBuilder_.getMessageList();
}
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public int getAllocationRecordsCount() {
if (allocationRecordsBuilder_ == null) {
return allocationRecords_.size();
} else {
return allocationRecordsBuilder_.getCount();
}
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecord getAllocationRecords(int index) {
if (allocationRecordsBuilder_ == null) {
return allocationRecords_.get(index);
} else {
return allocationRecordsBuilder_.getMessage(index);
}
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder setAllocationRecords(
int index, org.tensorflow.framework.AllocationRecord value) {
if (allocationRecordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocationRecordsIsMutable();
allocationRecords_.set(index, value);
onChanged();
} else {
allocationRecordsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder setAllocationRecords(
int index, org.tensorflow.framework.AllocationRecord.Builder builderForValue) {
if (allocationRecordsBuilder_ == null) {
ensureAllocationRecordsIsMutable();
allocationRecords_.set(index, builderForValue.build());
onChanged();
} else {
allocationRecordsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder addAllocationRecords(org.tensorflow.framework.AllocationRecord value) {
if (allocationRecordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocationRecordsIsMutable();
allocationRecords_.add(value);
onChanged();
} else {
allocationRecordsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder addAllocationRecords(
int index, org.tensorflow.framework.AllocationRecord value) {
if (allocationRecordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAllocationRecordsIsMutable();
allocationRecords_.add(index, value);
onChanged();
} else {
allocationRecordsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder addAllocationRecords(
org.tensorflow.framework.AllocationRecord.Builder builderForValue) {
if (allocationRecordsBuilder_ == null) {
ensureAllocationRecordsIsMutable();
allocationRecords_.add(builderForValue.build());
onChanged();
} else {
allocationRecordsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder addAllocationRecords(
int index, org.tensorflow.framework.AllocationRecord.Builder builderForValue) {
if (allocationRecordsBuilder_ == null) {
ensureAllocationRecordsIsMutable();
allocationRecords_.add(index, builderForValue.build());
onChanged();
} else {
allocationRecordsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder addAllAllocationRecords(
java.lang.Iterable values) {
if (allocationRecordsBuilder_ == null) {
ensureAllocationRecordsIsMutable();
org.nd4j.shade.protobuf.AbstractMessageLite.Builder.addAll(
values, allocationRecords_);
onChanged();
} else {
allocationRecordsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder clearAllocationRecords() {
if (allocationRecordsBuilder_ == null) {
allocationRecords_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
allocationRecordsBuilder_.clear();
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public Builder removeAllocationRecords(int index) {
if (allocationRecordsBuilder_ == null) {
ensureAllocationRecordsIsMutable();
allocationRecords_.remove(index);
onChanged();
} else {
allocationRecordsBuilder_.remove(index);
}
return this;
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecord.Builder getAllocationRecordsBuilder(
int index) {
return getAllocationRecordsFieldBuilder().getBuilder(index);
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecordOrBuilder getAllocationRecordsOrBuilder(
int index) {
if (allocationRecordsBuilder_ == null) {
return allocationRecords_.get(index); } else {
return allocationRecordsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public java.util.List
getAllocationRecordsOrBuilderList() {
if (allocationRecordsBuilder_ != null) {
return allocationRecordsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(allocationRecords_);
}
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecord.Builder addAllocationRecordsBuilder() {
return getAllocationRecordsFieldBuilder().addBuilder(
org.tensorflow.framework.AllocationRecord.getDefaultInstance());
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public org.tensorflow.framework.AllocationRecord.Builder addAllocationRecordsBuilder(
int index) {
return getAllocationRecordsFieldBuilder().addBuilder(
index, org.tensorflow.framework.AllocationRecord.getDefaultInstance());
}
/**
*
* The allocation and deallocation timeline.
*
*
* repeated .tensorflow.AllocationRecord allocation_records = 6;
*/
public java.util.List
getAllocationRecordsBuilderList() {
return getAllocationRecordsFieldBuilder().getBuilderList();
}
private org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.AllocationRecord, org.tensorflow.framework.AllocationRecord.Builder, org.tensorflow.framework.AllocationRecordOrBuilder>
getAllocationRecordsFieldBuilder() {
if (allocationRecordsBuilder_ == null) {
allocationRecordsBuilder_ = new org.nd4j.shade.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.AllocationRecord, org.tensorflow.framework.AllocationRecord.Builder, org.tensorflow.framework.AllocationRecordOrBuilder>(
allocationRecords_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
allocationRecords_ = null;
}
return allocationRecordsBuilder_;
}
private long allocatorBytesInUse_ ;
/**
*
* These are snapshots of the overall allocator memory stats.
* The number of live bytes currently allocated by the allocator.
*
*
* int64 allocator_bytes_in_use = 5;
*/
public long getAllocatorBytesInUse() {
return allocatorBytesInUse_;
}
/**
*
* These are snapshots of the overall allocator memory stats.
* The number of live bytes currently allocated by the allocator.
*
*
* int64 allocator_bytes_in_use = 5;
*/
public Builder setAllocatorBytesInUse(long value) {
allocatorBytesInUse_ = value;
onChanged();
return this;
}
/**
*
* These are snapshots of the overall allocator memory stats.
* The number of live bytes currently allocated by the allocator.
*
*
* int64 allocator_bytes_in_use = 5;
*/
public Builder clearAllocatorBytesInUse() {
allocatorBytesInUse_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.nd4j.shade.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.AllocatorMemoryUsed)
}
// @@protoc_insertion_point(class_scope:tensorflow.AllocatorMemoryUsed)
private static final org.tensorflow.framework.AllocatorMemoryUsed DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.AllocatorMemoryUsed();
}
public static org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.nd4j.shade.protobuf.Parser
PARSER = new org.nd4j.shade.protobuf.AbstractParser() {
@java.lang.Override
public AllocatorMemoryUsed parsePartialFrom(
org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.nd4j.shade.protobuf.InvalidProtocolBufferException {
return new AllocatorMemoryUsed(input, extensionRegistry);
}
};
public static org.nd4j.shade.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.nd4j.shade.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.framework.AllocatorMemoryUsed getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}