@Namespace(value="tensorflow") @NoOffset @Properties(inherit=tensorflow.class) public class TensorBuffer extends Pointer
Interface to access the raw ref-counted data buffer.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
TensorBuffer(Pointer data_ptr) |
Modifier and Type | Method and Description |
---|---|
Pointer |
data()
\brief data() points to a memory region of size() bytes.
|
void |
FillAllocationDescription(AllocationDescription proto)
\brief Fills metadata about the allocation into the proto.
|
boolean |
OwnsMemory()
\brief Whether this TensorBuffer owns the underlying memory.
|
TensorBuffer |
root_buffer()
\brief If this TensorBuffer is sub-buffer of another TensorBuffer,
returns that TensorBuffer.
|
long |
size()
\brief Size (in bytes) of the buffer.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public TensorBuffer(Pointer data_ptr)
public Pointer data()
data()
method is not virtual for performance reasons.
It can be called multiple times when the contents of a Tensor
are
accessed, and so making it non-virtual allows the body to be inlined.@Virtual(value=true) @Cast(value="size_t") @Const(value={false,false,true}) public long size()
@Virtual(value=true) public TensorBuffer root_buffer()
@Virtual(value=true) @Const(value={false,false,true}) public void FillAllocationDescription(AllocationDescription proto)
Copyright © 2022. All rights reserved.