diff options
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/Helpers.h | 6 | ||||
-rw-r--r-- | arm_compute/core/Helpers.inl | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arm_compute/core/Helpers.h b/arm_compute/core/Helpers.h index d056f937da..48ac38b170 100644 --- a/arm_compute/core/Helpers.h +++ b/arm_compute/core/Helpers.h @@ -376,7 +376,7 @@ public: * * @return The current position of the iterator in bytes relative to the first element. */ - constexpr int offset() const; + constexpr size_t offset() const; /** Return a pointer to the current pixel. * @@ -403,8 +403,8 @@ private: { } - int _dim_start; - int _stride; + size_t _dim_start; + size_t _stride; }; std::array<Dimension, Coordinates::num_max_dimensions> _dims; diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl index 07b4132bea..df0c929372 100644 --- a/arm_compute/core/Helpers.inl +++ b/arm_compute/core/Helpers.inl @@ -158,7 +158,7 @@ inline Iterator::Iterator(const ITensor *tensor, const Window &win) for(unsigned int n = 0; n < info->num_dimensions(); ++n) { _dims[n]._stride = win[n].step() * strides[n]; - std::get<0>(_dims)._dim_start += strides[n] * win[n].start(); + std::get<0>(_dims)._dim_start += static_cast<size_t>(strides[n]) * win[n].start(); } //Copy the starting point to all the dimensions: @@ -182,7 +182,7 @@ inline void Iterator::increment(const size_t dimension) } } -inline constexpr int Iterator::offset() const +inline constexpr size_t Iterator::offset() const { return _dims.at(0)._dim_start; } |