mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
fix: allowing neo ULT build with optimization enabled 5/n
- fix mismatched-new-delete warnings - fix initialization warnings - fix attempt to free a non-heap object warnings Related-To: NEO-8116 Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dec695f405
commit
1c1b2db9a9
@@ -29,7 +29,9 @@ OSTimeLinux::OSTimeLinux(OSInterface &osInterface, std::unique_ptr<DeviceTime> d
|
||||
}
|
||||
|
||||
bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
|
||||
struct timespec ts;
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
|
||||
if (getTimeFunc(CLOCK_MONOTONIC_RAW, &ts)) {
|
||||
return false;
|
||||
@@ -41,7 +43,9 @@ bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
|
||||
}
|
||||
|
||||
bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
|
||||
struct timespec ts;
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
|
||||
auto ret = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
||||
|
||||
@@ -51,7 +55,9 @@ bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
|
||||
}
|
||||
|
||||
double OSTimeLinux::getHostTimerResolution() const {
|
||||
struct timespec ts;
|
||||
struct timespec ts {
|
||||
0, 0
|
||||
};
|
||||
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user