Files
compute-runtime/runtime/os_interface/windows/deferrable_deletion_win.h
Mateusz Jablonski 7747db13e1 Deferred deleter: move to next deletion if current deletion cannot be applied
Change-Id: I7067bc2bc74f92518a33ccb9f9dce9b57cc28637
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-03 15:24:35 +01:00

36 lines
919 B
C++

/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/memory_manager/deferrable_deletion.h"
#include "runtime/os_interface/os_context.h"
#include "runtime/os_interface/windows/windows_wrapper.h"
#include <d3dkmthk.h>
namespace OCLRT {
class Wddm;
using OsContextWin = OsContext::OsContextImpl;
class DeferrableDeletionImpl : public DeferrableDeletion {
public:
DeferrableDeletionImpl(Wddm *wddm, D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle);
bool apply() override;
~DeferrableDeletionImpl();
DeferrableDeletionImpl(const DeferrableDeletionImpl &) = delete;
DeferrableDeletionImpl &operator=(const DeferrableDeletionImpl &) = delete;
protected:
Wddm *wddm;
D3DKMT_HANDLE *handles = nullptr;
uint32_t allocationCount;
D3DKMT_HANDLE resourceHandle;
};
} // namespace OCLRT