tensorflow:: TensorBuffer
This is an abstract class.#include <tensor.h>
Summary
Interface to access the raw ref-counted data buffer.
Inheritance
Inherits from: RefCounted
Constructors and Destructors |
|
---|---|
TensorBuffer(void *data_ptr)
|
|
~TensorBuffer()
|
Public functions |
|
---|---|
FillAllocationDescription(AllocationDescription *proto) const =0
|
virtual void
Fills metadata about the allocation into the proto.
|
OwnsMemory() const
|
virtual bool
Whether this TensorBuffer owns the underlying memory.
|
base() const
|
T *
Helper method to reinterpret the buffer as an array of
T . |
data() const
|
void *
|
root_buffer()=0
|
virtual TensorBuffer *
|
size() const =0
|
virtual size_t
Size (in bytes) of the buffer.
|
Public functions
FillAllocationDescription
virtual void FillAllocationDescription( AllocationDescription *proto ) const =0
Fills metadata about the allocation into the proto.
TensorBuffer
TensorBuffer( void *data_ptr )
base
T * base() const
Helper method to reinterpret the buffer as an array of T
.
data
void * data() const
root_buffer
virtual TensorBuffer * root_buffer()=0
If this TensorBuffer is sub-buffer of another TensorBuffer, returns that TensorBuffer.
Otherwise, returns this.
size
virtual size_t size() const =0
Size (in bytes) of the buffer.
~TensorBuffer
~TensorBuffer() override