#ifndef MEDIAPIPE_FRAMEWORK_FORMATS_TENSOR_AHWB_USAGE_H_ #define MEDIAPIPE_FRAMEWORK_FORMATS_TENSOR_AHWB_USAGE_H_ #include <functional> #include <list> #include <vector> #include "absl/functional/any_invocable.h" namespace mediapipe { // Holds AHWB on-complete function and release callbacks. This is used // to manage resources and perform synchronization when using AHWB with of // asynchronous inference operations (e.g. with DarwiNN interpreter). struct TensorAhwbUsage { … }; // Blocks until all usages are force completed and erases them from the list. void CompleteAndEraseUsages(std::list<TensorAhwbUsage>& ahwb_usages); // Removes already completed usages from the list. void EraseCompletedUsages(std::list<TensorAhwbUsage>& ahwb_usages); // Returns true if the usages are incomplete. bool HasIncompleteUsages(const std::list<TensorAhwbUsage>& ahwb_usages); } // namespace mediapipe #endif // MEDIAPIPE_FRAMEWORK_FORMATS_TENSOR_AHWB_USAGE_H_