Ocloc: Remove unneeded code from generated cpp file
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
parent
903e3c725a
commit
8980b2b817
|
@ -1932,7 +1932,7 @@ TEST_F(OfflineCompilerTests, WhenFclNotNeededThenDontLoadIt) {
|
|||
EXPECT_TRUE(offlineCompiler.igcFacade->isInitialized());
|
||||
}
|
||||
|
||||
TEST_F(OfflineCompilerTests, WhenParsingBinToCharArrayThenCorrectResult) {
|
||||
TEST_F(OfflineCompilerTests, WhenParsingBinToCharArrayThenCorrectFileIsGenerated) {
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-file",
|
||||
|
@ -1960,17 +1960,7 @@ TEST_F(OfflineCompilerTests, WhenParsingBinToCharArrayThenCorrectResult) {
|
|||
"uint32_t SchedulerBinary_" +
|
||||
familyNameWithType + "[10] = {\n"
|
||||
" 0x40032302, 0x90800756, 0x05340301, 0x66097860, 0x101010ff, 0x40032302, 0x90800756, 0x05340301, \n"
|
||||
" 0x66097860, 0xff000000};\n\n"
|
||||
"#include \"shared/source/built_ins/registry/built_ins_registry.h\"\n\n"
|
||||
"namespace NEO {\n"
|
||||
"static RegisterEmbeddedResource registerSchedulerBin(\n"
|
||||
" \"" +
|
||||
gEnvironment->familyNameWithType + "_0_scheduler.builtin_kernel.bin\",\n"
|
||||
" (const char *)SchedulerBinary_" +
|
||||
familyNameWithType + ",\n"
|
||||
" SchedulerBinarySize_" +
|
||||
familyNameWithType + ");\n"
|
||||
"}\n";
|
||||
" 0x66097860, 0xff000000};\n";
|
||||
EXPECT_EQ(retArray, target);
|
||||
|
||||
delete pOfflineCompiler;
|
||||
|
|
|
@ -869,16 +869,6 @@ std::string OfflineCompiler::parseBinAsCharArray(uint8_t *binary, size_t size, s
|
|||
}
|
||||
out << "};" << std::endl;
|
||||
|
||||
out << std::endl
|
||||
<< "#include \"shared/source/built_ins/registry/built_ins_registry.h\"\n"
|
||||
<< std::endl;
|
||||
out << "namespace NEO {" << std::endl;
|
||||
out << "static RegisterEmbeddedResource register" << builtinName << "Bin(" << std::endl;
|
||||
out << " \"" << familyNameWithType << "_0_" << fileName.c_str() << ".builtin_kernel.bin\"," << std::endl;
|
||||
out << " (const char *)" << builtinName << "Binary_" << familyNameWithType << "," << std::endl;
|
||||
out << " " << builtinName << "BinarySize_" << familyNameWithType << ");" << std::endl;
|
||||
out << "}" << std::endl;
|
||||
|
||||
return out.str();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue