Files
compute-runtime/shared/source/ail/ail_configuration.cpp
Andrzej Koska f1a38cbe49 Add AIL for Davinci Resolve
This AIL allows the Davinci Resolve to use overlapping buffers
outside of the specification

Related-To: NEO-5871
Signed-off-by: Andrzej Koska andrzej.koska@intel.com
2022-11-30 11:50:44 +01:00

28 lines
731 B
C++

/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/ail/ail_configuration.h"
#include "shared/source/helpers/hash.h"
#include "shared/source/helpers/hw_info.h"
#include <map>
#include <string>
#include <string_view>
namespace NEO {
bool AILConfiguration::isKernelHashCorrect(const std::string &kernelsSources, uint64_t expectedHash) const {
const auto hash = Hash::hash(kernelsSources.c_str(), kernelsSources.length());
return hash == expectedHash;
}
bool AILConfiguration::sourcesContainKernel(const std::string &kernelsSources, std::string_view kernelName) const {
return (kernelsSources.find(kernelName) != std::string::npos);
}
} // namespace NEO