Files
compute-runtime/shared/test/common/mocks/mock_deferrable_deletion.cpp
HeFan2017 c268e30189 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-03 13:51:15 +01:00

18 lines
397 B
C++

/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/mocks/mock_deferrable_deletion.h"
namespace NEO {
bool MockDeferrableDeletion::apply() {
applyCalled++;
return (applyCalled < trialTimes) ? false : true;
}
MockDeferrableDeletion::~MockDeferrableDeletion() {
EXPECT_EQ(trialTimes, applyCalled);
}
} // namespace NEO