mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
refactor: move tag initialization to allocator [1/n]
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2062c13704
commit
b1dea19fbd
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user