mrkn commented on a change in pull request #9395:
URL: https://github.com/apache/arrow/pull/9395#discussion_r569854972



##########
File path: cpp/src/arrow/tensor.cc
##########
@@ -40,40 +41,69 @@ using internal::checked_cast;
 
 namespace internal {
 
-void ComputeRowMajorStrides(const FixedWidthType& type, const 
std::vector<int64_t>& shape,
-                            std::vector<int64_t>* strides) {
+Status ComputeRowMajorStrides(const FixedWidthType& type,
+                              const std::vector<int64_t>& shape,
+                              std::vector<int64_t>* strides) {
   const int byte_width = GetByteWidth(type);
-  int64_t remaining = byte_width;
-  for (int64_t dimsize : shape) {
-    remaining *= dimsize;
+  const auto ndim = shape.size();

Review comment:
       OK, I'll replace `auto` with `size_t`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to