Skip to content

Commit 58e2f64

Browse files
author
Mateusz Kopciński
committed
small review changes
1 parent e1d2f8b commit 58e2f64

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-native-executorch/common/rnexecutorch/threads/HighPerformanceThreadPool.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class HighPerformanceThreadPool {
162162

163163
class WorkItem {
164164
public:
165-
WorkItem() {}
165+
WorkItem() = default;
166166
WorkItem(std::unique_ptr<ITask> task, Priority priority,
167167
std::chrono::steady_clock::time_point enqueueTime)
168168
: task(std::move(task)), priority(priority), enqueueTime(enqueueTime) {}
@@ -207,7 +207,7 @@ class HighPerformanceThreadPool {
207207
std::vector<CoreInfo> cores;
208208
const auto numOfCores = std::thread::hardware_concurrency();
209209

210-
for (int i = 0; std::cmp_less(i, numOfCores); ++i) {
210+
for (int32_t i = 0; std::cmp_less(i, numOfCores); ++i) {
211211
std::string path = "/sys/devices/system/cpu/cpu" + std::to_string(i) +
212212
"/cpufreq/cpuinfo_max_freq";
213213
std::ifstream file(path);
@@ -236,7 +236,7 @@ class HighPerformanceThreadPool {
236236
::executorch::extension::cpuinfo::get_num_performant_cores();
237237

238238
constexpr float kKiloToGigaRatio = 1e6;
239-
for (int i = 0; i < cores.size(); ++i) {
239+
for (int32_t i = 0; i < cores.size(); ++i) {
240240
if (i < numOfPerfCores) {
241241
performanceCores.push_back(cores[i].id);
242242
log(LOG_LEVEL::Debug, "Performance core:", cores[i].id, "(",
@@ -289,7 +289,7 @@ class HighPerformanceThreadPool {
289289
cpu_set_t cpuset;
290290
CPU_ZERO(&cpuset);
291291

292-
for (int core : performanceCores) {
292+
for (int32_t core : performanceCores) {
293293
CPU_SET(core, &cpuset);
294294
}
295295

0 commit comments

Comments
 (0)