Files
compute-runtime/opencl/test/unit_test/helpers/built_ins_helper.cpp
Mateusz Jablonski 9dbeeea18f Clang-format: restore sorting includes
Change-Id: I34eb993b562c77f56d8fbd51a02ee266c1f76678
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-24 10:22:30 +01:00

43 lines
1.3 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "opencl/source/helpers/built_ins_helper.h"
#include "shared/source/device/device.h"
#include "opencl/source/compiler_interface/default_cl_cache_config.h"
#include "opencl/test/unit_test/mocks/mock_builtins.h"
#include "opencl/test/unit_test/mocks/mock_compilers.h"
#include "opencl/test/unit_test/mocks/mock_program.h"
#include "opencl/test/unit_test/mocks/mock_sip.h"
namespace NEO {
namespace MockSipData {
std::unique_ptr<MockSipKernel> mockSipKernel;
SipKernelType calledType = SipKernelType::COUNT;
bool called = false;
} // namespace MockSipData
const SipKernel &initSipKernel(SipKernelType type, Device &device) {
MockSipData::calledType = type;
MockSipData::mockSipKernel->type = type;
MockSipData::called = true;
return *MockSipData::mockSipKernel;
}
Program *createProgramForSip(ExecutionEnvironment &executionEnvironment,
Context *context,
std::vector<char> &binary,
size_t size,
cl_int *errcodeRet,
Device *device) {
GlobalMockSipProgram::sipProgram->incRefApi();
GlobalMockSipProgram::sipProgram->resetAllocationState();
return GlobalMockSipProgram::sipProgram;
}
} // namespace NEO