Files
compute-runtime/opencl/test/unit_test/helpers/test_files.cpp
Mateusz Jablonski 7df9945ebe Add absolute include paths
Change-Id: I67a6919bbbff1d30c7d6cdb257b41c87bad51e7f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-23 23:49:12 +01:00

33 lines
937 B
C++

/*
* Copyright (C) 2017-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "test_files.h"
#include "shared/source/helpers/file_io.h"
#include "config.h"
std::string testFiles("test_files/" NEO_ARCH "/");
std::string clFiles("test_files/");
std::string binaryNameSuffix("");
void retrieveBinaryKernelFilename(std::string &outputFilename, const std::string &kernelName, const std::string &extension, const std::string &options) {
if (outputFilename.length() > 0) {
outputFilename.clear();
}
outputFilename.reserve(2 * testFiles.length());
outputFilename.append(testFiles);
outputFilename.append(kernelName);
outputFilename.append(binaryNameSuffix);
outputFilename.append(extension);
outputFilename.append(options);
if (!fileExists(outputFilename) && (extension == ".bc")) {
retrieveBinaryKernelFilename(outputFilename, kernelName, ".spv", options);
}
}