| 95 | } |
| 96 | |
| 97 | void cache_processor_for_pieces(const std::vector<SentencePiecePiece> & pieces, ProcessorPtr processor) { |
| 98 | const auto fingerprint = fingerprint_pieces(pieces); |
| 99 | std::lock_guard<std::mutex> lock(processor_cache_mutex()); |
| 100 | processor_cache()[fingerprint] = std::move(processor); |
| 101 | } |
| 102 | |
| 103 | } // namespace |
| 104 |
no test coverage detected