Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Fix bug in TensorCircularBuffer::Clear() #86

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

xiaomengy
Copy link
Contributor

@xiaomengy xiaomengy commented Oct 18, 2022

This PR fixed the crash issue for TensorCircularBuffer::Clear() and also add a Reset() function for CircularBuffers. The differences of Clear() and Reset() are listed below. The related issue is #85

  • Clear() will only make the TensorCircularBuffer's size == 0, but will not reset the internal status such as initialized_ and schema_. Clear() will be more efficient for adding the same data schema multiple times.
  • Reset() will call Clear() and then reset all of the internal status such as initialized_ and schema_.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 18, 2022
@xiaomengy xiaomengy merged commit c43d0f1 into facebookresearch:main Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants