mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Change-Id: I31ca317d10697ab884e04f443c8ccfdd6ca9d2ae Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
28 lines
774 B
C++
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
|