Skip to content
heliaRT
API reference
HELIA HUB

LinearMemoryPlanner

Sequential buffer placement without reuse.

Machine-readable model

class

The simplest possible memory planner that just lays out all buffers at increasing offsets without trying to reuse memory.

tensorflow/lite/micro/memory_planner/linear_memory_planner.h:26

class LinearMemoryPlanner : public tflite::MicroMemoryPlanner

The simplest possible memory planner that just lays out all buffers at increasing offsets without trying to reuse memory.

method

Pass information about a buffer's size and lifetime to the layout algorithm.

tensorflow/lite/micro/memory_planner/linear_memory_planner.h:31

TfLiteStatus tflite::LinearMemoryPlanner::AddBuffer(int size, int first_time_used, int last_time_used)

Pass information about a buffer’s size and lifetime to the layout algorithm. The order this is called implicitly assigns an index to the result, so the buffer information that’s passed into the N-th call of this method will be used as the buffer_index argument to GetOffsetForBuffer().

Parameters of AddBuffer
NameTypeDefaultDescription
sizeintRequired
first_time_usedintRequired
last_time_usedintRequired
method

Calculated layout offset for the N-th buffer added to the planner.

tensorflow/lite/micro/memory_planner/linear_memory_planner.h:36

TfLiteStatus tflite::LinearMemoryPlanner::GetOffsetForBuffer(int buffer_index, int *offset)

Calculated layout offset for the N-th buffer added to the planner.

Parameters of GetOffsetForBuffer
NameTypeDefaultDescription
buffer_indexintRequired
offsetint *Required