#ifndef CPURESIZECACHE_HPP #define CPURESIZECACHE_HPP #include #include #include "MNN_generated.h" namespace MNN { // FIXME: Move outside class MNN_PUBLIC CPUResizeCache { public: CPUResizeCache() { // Do nothing } ~ CPUResizeCache() { // Do nothing } Tensor* findCacheTensor(const Tensor* src, MNN_DATA_FORMAT format) const; // Return cache tensor void pushCacheTensor(std::shared_ptr dst, const Tensor* src, MNN_DATA_FORMAT format); void reset(); void release(); private: std::map, std::shared_ptr> mFormatCache; }; } #endif