Unverified Commit 08059c40 authored by Brian Pickrell's avatar Brian Pickrell Committed by GitHub
Browse files

add const

parent 6be7f1fb
...@@ -132,7 +132,7 @@ struct reduce_op : op_name<Derived> ...@@ -132,7 +132,7 @@ struct reduce_op : op_name<Derived>
{ {
auto lens = s.lens(); auto lens = s.lens();
auto tuned_axes = tune_axes(lens.size()); auto tuned_axes = tune_axes(lens.size());
for(auto& axis : tuned_axes) for(const auto& axis : tuned_axes)
{ {
lens[axis] = 1; lens[axis] = 1;
} }
...@@ -146,7 +146,7 @@ struct reduce_op : op_name<Derived> ...@@ -146,7 +146,7 @@ struct reduce_op : op_name<Derived>
const std::vector<T>& in_lens, const std::vector<T>& in_lens,
std::vector<T>& out_lens) const std::vector<T>& out_lens) const
{ {
for(auto axis : tuned_axes) for(const auto& axis : tuned_axes)
{ {
out_lens[axis] = in_lens[axis]; out_lens[axis] = in_lens[axis];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment