Files
compute-runtime/runtime/gmm_helper/gmm_interface.cpp
Mateusz Jablonski 13921f698e Move files to core
- OsLibrary class
- sku_info directory
- gmm_lib.h header

Change-Id: Ia86280e61cd2913c546afc40c3751b42e04ab137
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-11-19 16:19:52 +01:00

28 lines
777 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/helpers/debug_helpers.h"
#include "core/os_interface/os_library.h"
#include "runtime/gmm_helper/gmm_helper.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