mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Add AIL functionality
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ab73b61b77
commit
2afb785bba
13
shared/source/ail/windows/CMakeLists.txt
Normal file
13
shared/source/ail/windows/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2021 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(NEO_CORE_AIL_WINDOWS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ail_configuration_windows.cpp
|
||||
)
|
||||
|
||||
set_property(GLOBAL PROPERTY NEO_CORE_AIL_WINDOWS ${NEO_CORE_AIL_WINDOWS})
|
||||
add_subdirectories()
|
||||
24
shared/source/ail/windows/ail_configuration_windows.cpp
Normal file
24
shared/source/ail/windows/ail_configuration_windows.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/ail/ail_configuration.h"
|
||||
#include "shared/source/os_interface/windows/sys_calls.h"
|
||||
|
||||
namespace NEO {
|
||||
bool AILConfiguration::initProcessExecutableName() {
|
||||
const DWORD length = MAX_PATH;
|
||||
WCHAR processFilenameW[length];
|
||||
char processFilename[length] = "";
|
||||
auto status = SysCalls::getModuleFileName(nullptr, processFilenameW, MAX_PATH);
|
||||
|
||||
if (status != 0) {
|
||||
std::wcstombs(processFilename, processFilenameW, MAX_PATH);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user