mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
do not sleep in ULTs
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3724807eed
commit
9ad3f6190f
@@ -118,6 +118,8 @@ set(NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/register_offsets.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/registered_method_dispatcher.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sleep.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sleep.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_base.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_bdw.inl
|
||||
|
||||
19
shared/source/helpers/sleep.cpp
Normal file
19
shared/source/helpers/sleep.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <thread>
|
||||
|
||||
namespace NEO {
|
||||
template <class T>
|
||||
void sleep(const T &sleepDuration) {
|
||||
std::this_thread::sleep_for(sleepDuration);
|
||||
}
|
||||
|
||||
template void sleep<std::chrono::microseconds>(const std::chrono::microseconds &);
|
||||
template void sleep<std::chrono::milliseconds>(const std::chrono::milliseconds &);
|
||||
template void sleep<std::chrono::seconds>(const std::chrono::seconds &);
|
||||
} // namespace NEO
|
||||
13
shared/source/helpers/sleep.h
Normal file
13
shared/source/helpers/sleep.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <thread>
|
||||
|
||||
namespace NEO {
|
||||
template <class T>
|
||||
void sleep(const T &sleepDuration);
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user