tensorflow / tflite-micro

Infrastructure to enable deployment of ML models to low-power resource-constrained embedded targets (including microcontrollers and digital signal processors).
Apache License 2.0
1.93k stars 826 forks source link

feat: add fixed-capacity, statically-allocated type tflite::StaticVector #2642

Closed rkuester closed 3 months ago

rkuester commented 3 months ago

Add a type, tflite::StaticVector, which behaves like std::vector, but which avoids heap memory allocation.

BUG=#2636

rkuester commented 3 months ago

To my knowledge, we don't have any type like this yet—something that behaves like a std::vector, but can be statically allocated. Am I wrong?

This is used in upcoming PRs.

rkuester commented 3 months ago

These changes required #2648.