mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 11:03:02 +08:00
Updating files modified in 2018 only. Older files remain with old style copyright header Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
36 lines
826 B
C++
36 lines
826 B
C++
/*
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <cstring>
|
|
#include <string>
|
|
#include <mutex>
|
|
|
|
#include "runtime/utilities/arrayref.h"
|
|
|
|
namespace OCLRT {
|
|
|
|
struct HardwareInfo;
|
|
class Program;
|
|
class BinaryCache {
|
|
public:
|
|
static const std::string getCachedFileName(const HardwareInfo &hwInfo, ArrayRef<const char> input,
|
|
ArrayRef<const char> options, ArrayRef<const char> internalOptions);
|
|
|
|
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;
|
|
};
|
|
|
|
} // namespace OCLRT
|