mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +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>
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/execution_environment/execution_environment.h"
|
|
#include "runtime/helpers/built_ins_helper.h"
|
|
#include "runtime/program/program.h"
|
|
|
|
namespace OCLRT {
|
|
const SipKernel &initSipKernel(SipKernelType type, Device &device) {
|
|
return device.getExecutionEnvironment()->getBuiltIns()->getSipKernel(type, device);
|
|
}
|
|
Program *createProgramForSip(ExecutionEnvironment &executionEnvironment,
|
|
Context *context,
|
|
std::vector<char> &binary,
|
|
size_t size,
|
|
cl_int *errcodeRet) {
|
|
|
|
cl_int retVal = 0;
|
|
auto program = Program::createFromGenBinary(executionEnvironment,
|
|
nullptr,
|
|
binary.data(),
|
|
size,
|
|
true,
|
|
&retVal);
|
|
DEBUG_BREAK_IF(retVal != 0);
|
|
return program;
|
|
}
|
|
} // namespace OCLRT
|