| 1726 | } |
| 1727 | |
| 1728 | T* GetOp(const string& key) { |
| 1729 | #ifdef DNNL_AARCH64_USE_ACL |
| 1730 | mutex_lock lock(lru_mu_); |
| 1731 | #endif |
| 1732 | auto it = cache_.find(key); |
| 1733 | if (it == cache_.end()) { |
| 1734 | return nullptr; |
| 1735 | } |
| 1736 | |
| 1737 | // Move to the front of LRU list as the most recently accessed. |
| 1738 | lru_list_.erase(it->second.lru_iterator); |
| 1739 | lru_list_.push_front(it->first); |
| 1740 | it->second.lru_iterator = lru_list_.begin(); |
| 1741 | return it->second.op; |
| 1742 | } |
| 1743 | |
| 1744 | void SetOp(const string& key, T* op) { |
| 1745 | #ifdef DNNL_AARCH64_USE_ACL |