refactor: move tag initialization to allocator [1/n]

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-12-16 11:01:27 +00:00
committed by Compute-Runtime-Automation
parent 2062c13704
commit b1dea19fbd
13 changed files with 54 additions and 38 deletions

View File

@@ -29,6 +29,8 @@ class LinearStream;
template <typename TSize, uint32_t packetCount>
class TimestampPackets : public TagTypeBase {
public:
using ValueT = TSize;
static constexpr AllocationType getAllocationType() {
return AllocationType::timestampPacketTagBuffer;
}
@@ -37,12 +39,12 @@ class TimestampPackets : public TagTypeBase {
static constexpr size_t getSinglePacketSize() { return sizeof(Packet); }
void initialize() {
void initialize(TSize initValue) {
for (auto &packet : packets) {
packet.contextStart = TimestampPacketConstants::initValue;
packet.globalStart = TimestampPacketConstants::initValue;
packet.contextEnd = TimestampPacketConstants::initValue;
packet.globalEnd = TimestampPacketConstants::initValue;
packet.contextStart = initValue;
packet.globalStart = initValue;
packet.contextEnd = initValue;
packet.globalEnd = initValue;
}
}