aboutsummaryrefslogtreecommitdiff
path: root/ethosu/tensor_allocator
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/tensor_allocator')
-rw-r--r--ethosu/tensor_allocator/search_allocator.cpp2
-rw-r--r--ethosu/tensor_allocator/tensor_allocatormodule.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/tensor_allocator/search_allocator.cpp b/ethosu/tensor_allocator/search_allocator.cpp
index ce5c46de..c7c418a0 100644
--- a/ethosu/tensor_allocator/search_allocator.cpp
+++ b/ethosu/tensor_allocator/search_allocator.cpp
@@ -31,7 +31,7 @@ SearchAllocator::SearchAllocator(const std::vector<LiveRange> &live_ranges, uint
uint32_t max_end_time = 0;
for (size_t i = 0; i < lrs.size(); ++i) {
auto &lr = lrs[i];
- lr.id = i;
+ lr.id = static_cast<int>(i);
max_end_time = std::max(max_end_time, lr.end_time);
}
lrs_at_time.resize(max_end_time + 1);
diff --git a/ethosu/tensor_allocator/tensor_allocatormodule.cpp b/ethosu/tensor_allocator/tensor_allocatormodule.cpp
index 79ee95ad..02488add 100644
--- a/ethosu/tensor_allocator/tensor_allocatormodule.cpp
+++ b/ethosu/tensor_allocator/tensor_allocatormodule.cpp
@@ -53,7 +53,7 @@ static PyObject *method_allocate (PyObject *self, PyObject *args)
}
/* Unpack the length of the input integer list. */
- int input_length = PyObject_Length (input_list_object);
+ int input_length = static_cast<int>(PyObject_Length (input_list_object));
if (input_length < 0) {
input_length = 0;
}