Commit d0c53a98 authored by Paul's avatar Paul
Browse files

Formatting

parent 2ed09f15
......@@ -28,7 +28,7 @@ struct reduce_sum
check_shapes{inputs, *this}.has(1);
auto s = inputs.at(0);
auto lens = s.lens();
for(auto axis:axes)
for(auto axis : axes)
lens[axis] = 1;
return {s.type(), lens};
}
......@@ -36,10 +36,10 @@ struct reduce_sum
argument compute(const shape& output_shape, std::vector<argument> args) const
{
argument result{output_shape};
visit_all(result, args[0])([&](auto output, auto input){
visit_all(result, args[0])([&](auto output, auto input) {
shape_for_each(input.get_shape(), [&](auto&& in_idx) {
auto out_idx = in_idx;
for(auto axis:axes)
for(auto axis : axes)
out_idx[axis] = 0;
output(out_idx.begin(), out_idx.end()) += input(in_idx.begin(), in_idx.end());
});
......
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