/* * Copyright (C) 2017-2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "runtime/utilities/arrayref.h" #include #include #include #include namespace NEO { struct HardwareInfo; class Program; class BinaryCache { public: static const std::string getCachedFileName(const HardwareInfo &hwInfo, ArrayRef input, ArrayRef options, ArrayRef internalOptions); BinaryCache(); virtual ~BinaryCache(); virtual bool cacheBinary(const std::string kernelFileHash, const char *pBinary, uint32_t binarySize); virtual bool loadCachedBinary(const std::string kernelFileHash, Program &program); protected: static std::mutex cacheAccessMtx; std::string clCacheLocation; }; } // namespace NEO