From 113eb547643314d589579c2c97b162a6809397c2 Mon Sep 17 00:00:00 2001 From: Takuro Iizuka Date: Mon, 29 Jan 2024 16:05:51 -0800 Subject: [PATCH] Fixed minor issue --- include/ion/port.h | 6 +++--- src/builder.cc | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/ion/port.h b/include/ion/port.h index 66a4c0f5..87fd62ab 100644 --- a/include/ion/port.h +++ b/include/ion/port.h @@ -60,8 +60,8 @@ class Port { Halide::Type type; int32_t dimensions; - std::unordered_map params; - std::unordered_map instances; + std::unordered_map params; + std::unordered_map instances; Impl(); Impl(const std::string& pid, const std::string& pn, const Halide::Type& t, int32_t d); @@ -213,7 +213,7 @@ class Port { std::vector as_instance() const { std::vector instances; for (const auto& [i, instance] : impl_->instances) { - if (instances.size() <= i) { + if (instances.size() <= static_cast(i)) { instances.resize(i+1, nullptr); } instances[i] = instance; diff --git a/src/builder.cc b/src/builder.cc index f5eb3dbc..29305f0f 100644 --- a/src/builder.cc +++ b/src/builder.cc @@ -1,10 +1,6 @@ #include #include -#ifdef __linux__ -#include -#endif - #include #include "ion/builder.h" @@ -303,7 +299,7 @@ Halide::Pipeline Builder::build(bool implicit_output) { bb->bind_input(arginfo.name, fs); } else { // access to Port[index] - if (index>=fs.size()){ + if (index>=static_cast(fs.size())){ throw std::runtime_error("Port index out of range: " + port.pred_name()); } bb->bind_input(arginfo.name, {fs[index]});