Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

rkuester
Copy link
Contributor

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

BUG=#2636

@rkuester rkuester requested a review from a team as a code owner July 25, 2024 17:05
@rkuester
Copy link
Contributor Author

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 rkuester requested a review from rascani July 25, 2024 17:09
Copy link
Contributor

@rascani rascani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just a couple minor comments.

tensorflow/lite/micro/static_vector.h Outdated Show resolved Hide resolved
tensorflow/lite/micro/static_vector.h Outdated Show resolved Hide resolved
@rkuester rkuester requested a review from rascani July 27, 2024 00:11
rascani
rascani previously approved these changes Jul 27, 2024
Add a type, tflite::StaticVector, which behaves like std::vector, but
which avoids heap memory allocation.
@rkuester
Copy link
Contributor Author

rkuester commented Aug 1, 2024

These changes required #2648.

@rkuester rkuester marked this pull request as ready for review August 1, 2024 22:18
@rkuester rkuester requested a review from rascani August 1, 2024 22:18
@rkuester rkuester marked this pull request as draft August 1, 2024 23:51
@mergify mergify bot merged commit d3475aa into tensorflow:main Aug 7, 2024
82 of 83 checks passed
@rkuester rkuester deleted the compress branch August 7, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants