mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 12:33:12 +08:00
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>
18 lines
397 B
C++
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
|