mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Cleaned up files: opencl/source/api/api.h opencl/source/os_interface/windows/d3d_sharing_functions.h opencl/test/unit_test/aub_tests/command_stream/aub_mem_dump_tests.h opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h shared/source/os_interface/linux/device_time_drm.h shared/source/os_interface/linux/os_time_linux.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
28 lines
633 B
C++
28 lines
633 B
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace NEO {
|
|
|
|
template <typename BaseType, uint32_t ordinal>
|
|
struct DestructorCounted : public BaseType {
|
|
template <typename... Args>
|
|
DestructorCounted(uint32_t &destructorId, Args &&...args) : BaseType(std::forward<Args>(args)...),
|
|
destructorId(destructorId) {}
|
|
|
|
~DestructorCounted() override {
|
|
EXPECT_EQ(ordinal, destructorId);
|
|
destructorId++;
|
|
}
|
|
|
|
private:
|
|
uint32_t &destructorId;
|
|
};
|
|
} // namespace NEO
|