| 53 | } |
| 54 | |
| 55 | Module findModule(const int device, const size_t& key) { |
| 56 | shared_lock<shared_timed_mutex> readLock(getCacheMutex(device)); |
| 57 | auto& cache = getCache(device); |
| 58 | auto iter = cache.find(key); |
| 59 | if (iter != cache.end()) { return iter->second; } |
| 60 | return Module{}; |
| 61 | } |
| 62 | |
| 63 | Kernel getKernel(const string& kernelName, span<const common::Source> sources, |
| 64 | span<const TemplateArg> targs, span<const string> options, |