Files
compute-runtime/shared/test/common/mocks/mock_timestamp_packet.h
Dominik Dabek eebf2bbd26 performance(ocl): timestamp packet count per gfx
Add support for different timestamp packet counts per gfx family.
Change all packet counts to 1 except for xe-hpc.

Related-To: NEO-8154

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
2023-09-25 20:34:58 +02:00

34 lines
836 B
C++

/*
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/timestamp_packet.h"
namespace NEO {
class MockTimestampPackets32 : public TimestampPackets<uint32_t, TimestampPacketConstants::preferredPacketCount> {
public:
using typename TimestampPackets<uint32_t, TimestampPacketConstants::preferredPacketCount>::Packet;
using TimestampPackets<uint32_t, TimestampPacketConstants::preferredPacketCount>::packets;
void setTagToReadyState() {
initialize();
uint32_t zeros[4] = {};
for (uint32_t i = 0; i < TimestampPacketConstants::preferredPacketCount; i++) {
assignDataToAllTimestamps(i, zeros);
}
}
void setToNonReadyState() {
packets[0].contextEnd = 1;
}
};
} // namespace NEO