Files
compute-runtime/runtime/gmm_helper/gmm_interface.cpp
Dunajski, Bartosz dfc50f3a75 Move gmm_helper to core
Change-Id: I31ca317d10697ab884e04f443c8ccfdd6ca9d2ae
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-12-04 15:25:32 +01:00

28 lines
774 B
C++

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