Back to Tensorflow

tflite::MemoryAllocation

tensorflow/lite/g3doc/api_docs/cc/class/tflite/memory-allocation.html

2.21.01.2 KB
Original Source

tflite::MemoryAllocation

Summary

Inheritance

Inherits from: tflite::Allocation

|

Constructors and Destructors

| | --- | | MemoryAllocation(const void *ptr, size_t num_bytes, ErrorReporter *error_reporter)

Provides a (read-only) view of the provided buffer region as an allocation. | | ~MemoryAllocation()
|

|

Public functions

| | --- | | base() const override | const void * | | bytes() const override | size_t | | valid() const override | bool |

Public functions

MemoryAllocation

MemoryAllocation(
  const void *ptr,
  size_t num_bytes,[ErrorReporter](/lite/api_docs/cc/class/tflite/error-reporter.html#classtflite_1_1_error_reporter)*error_reporter
)

Provides a (read-only) view of the provided buffer region as an allocation.

Note: The caller retains ownership of ptr, and must ensure it remains valid for the lifetime of the class instance.

base

const void * base() const override

bytes

size_t bytes() const override

valid

bool valid() const override

~MemoryAllocation

~MemoryAllocation() override