mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Create WddmResidencyController to encapsulate basic residency data
Change-Id: I6dd94405ca5ea3a13b137c1e0ead72e615d36e00 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
88bd89cb58
commit
b2dd8a9a1d
28
runtime/os_interface/windows/wddm_residency_controller.h
Normal file
28
runtime/os_interface/windows/wddm_residency_controller.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace OCLRT {
|
||||
|
||||
class WddmResidencyController {
|
||||
public:
|
||||
WddmResidencyController();
|
||||
|
||||
void acquireLock();
|
||||
void releaseLock();
|
||||
|
||||
uint64_t getLastTrimFenceValue() { return lastTrimFenceValue; }
|
||||
void setLastTrimFenceValue(uint64_t value) { lastTrimFenceValue = value; }
|
||||
|
||||
protected:
|
||||
std::atomic<bool> lock;
|
||||
uint64_t lastTrimFenceValue;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
Reference in New Issue
Block a user