Skip to content

Commit

Permalink
Appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Atanas Dimitrov committed Sep 16, 2024
1 parent 1a9a495 commit ceff3bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/cpu/math/cumsum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ CumSum<T>::CumSum(const OpKernelInfo& info) : OpKernel(info), exclusive_(), reve

template <typename T>
Status CumSum<T>::Compute(OpKernelContext* ctx) const {
const Tensor* input = ctx->Input<Tensor>(0); // input tensor
const Tensor* input = ctx->Input<Tensor>(0); // input tensor
size_t rank = input->Shape().NumDimensions(); // the rank of the input/output
if (rank == 0)
return ORT_MAKE_STATUS(ONNXRUNTIME, INVALID_ARGUMENT, "Cannot apply CumSum operator on a scalar");
Expand All @@ -172,7 +172,7 @@ Status CumSum<T>::Compute(OpKernelContext* ctx) const {
const auto input_shape = input->Shape().GetDims();
const size_t axis = onnxruntime::narrow<size_t>(axis_input);
const int64_t dim = input->Shape()[axis]; // dimension size for the axis
const int64_t upper_dim_count = // number of slices we can walk through iteratively
const int64_t upper_dim_count = // number of slices we can walk through iteratively
std::accumulate(input_shape.begin(), input_shape.begin() + axis, static_cast<int64_t>(1), std::multiplies<int64_t>());

Check warning on line 176 in onnxruntime/core/providers/cpu/math/cumsum.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/cpu/math/cumsum.cc:176: Lines should be <= 120 characters long [whitespace/line_length] [2]
const int64_t lower_dim_size = // sizes of the slices we can treat as 1D arrays
std::accumulate(input_shape.begin() + axis + 1, input_shape.end(), static_cast<int64_t>(1), std::multiplies<int64_t>());

Check warning on line 178 in onnxruntime/core/providers/cpu/math/cumsum.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/cpu/math/cumsum.cc:178: Lines should be <= 120 characters long [whitespace/line_length] [2]
Expand Down

0 comments on commit ceff3bb

Please sign in to comment.