Skip to content

Commit 090df6c

Browse files
authored
Merge of #3120
2 parents bbf70db + 1b8da3d commit 090df6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tensorflow/lite/micro/micro_profiler.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
1+
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.
22
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -14,9 +14,11 @@ limitations under the License.
1414
==============================================================================*/
1515
#include "tensorflow/lite/micro/micro_profiler.h"
1616

17+
#include <algorithm>
1718
#include <cinttypes>
1819
#include <cstdint>
1920
#include <cstring>
21+
#include <iterator>
2022

2123
#include "tensorflow/lite/kernels/internal/compatibility.h"
2224
#include "tensorflow/lite/micro/micro_log.h"
@@ -122,9 +124,7 @@ int MicroProfiler::FindExistingOrNextPosition(const char* tag_name) {
122124
}
123125

124126
void MicroProfiler::ClearEvents() {
125-
for (int i = 0; i < num_events_; i++) {
126-
total_ticks_per_tag_[i].tag = nullptr;
127-
}
127+
std::fill_n(std::begin(total_ticks_per_tag_), num_events_, TicksPerTag{});
128128

129129
num_events_ = 0;
130130
}

0 commit comments

Comments
 (0)