mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
Related-To: NEO-3832 Change-Id: I9c97a20a6a611118eb14348a8c6960115a20777d Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com> Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
28 lines
780 B
C++
28 lines
780 B
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "core/helpers/debug_helpers.h"
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
|
#include "runtime/os_interface/os_library.h"
|
|
|
|
namespace Os {
|
|
extern const char *gmmDllName;
|
|
extern const char *gmmInitFuncName;
|
|
extern const char *gmmDestroyFuncName;
|
|
} // namespace Os
|
|
|
|
namespace NEO {
|
|
|
|
void GmmHelper::loadLib() {
|
|
gmmLib.reset(OsLibrary::load(Os::gmmDllName));
|
|
UNRECOVERABLE_IF(!gmmLib);
|
|
initGmmFunc = reinterpret_cast<decltype(&InitializeGmm)>(gmmLib->getProcAddress(Os::gmmInitFuncName));
|
|
destroyGmmFunc = reinterpret_cast<decltype(&GmmDestroy)>(gmmLib->getProcAddress(Os::gmmDestroyFuncName));
|
|
UNRECOVERABLE_IF(!initGmmFunc || !destroyGmmFunc);
|
|
}
|
|
} // namespace NEO
|