Files
compute-runtime/shared/test/common/mocks/mock_deferrable_deletion.h
HeFan2017 2ea734491a Deferred deletion of allocations in main thread
Add a clearQueueTillFirstFailure interface to DeferredDeleter, which
iterates the queue from the front and delete the allocations in the
queue till a failure. It is called by defer deletion of allocations
occupied by mutliple contexts to unlock the execution in main thread

Related-To: NEO-7532

Signed-off-by: HeFan2017 <fan.f.he@intel.com>
2023-01-13 09:20:35 +01:00

27 lines
488 B
C++

/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/memory_manager/deferrable_deletion.h"
#include "gtest/gtest.h"
namespace NEO {
class MockDeferrableDeletion : public DeferrableDeletion {
public:
bool apply() override;
~MockDeferrableDeletion() override;
void setTrialTimes(int times) { trialTimes = times; }
int applyCalled = 0;
private:
int trialTimes = 1;
};
} // namespace NEO