Commit 2a8e8d07 authored by Paul's avatar Paul
Browse files

Use std::transform

parent 9840f756
...@@ -626,10 +626,9 @@ struct find_slice_transpose ...@@ -626,10 +626,9 @@ struct find_slice_transpose
auto split = splits[i]; auto split = splits[i];
auto t = transposes[i]; auto t = transposes[i];
auto op = any_cast<op::slice>(split->get_operator()); auto op = any_cast<op::slice>(split->get_operator());
for(auto& axis : op.axes) std::transform(op.axes.begin(), op.axes.end(), op.axes.begin(), [&](auto axis) {
{ return iperm[axis];
axis = iperm[axis]; });
}
auto new_ins = m.insert_instruction(t, op, pre); auto new_ins = m.insert_instruction(t, op, pre);
if(t->get_operator() != pre->get_operator()) if(t->get_operator() != pre->get_operator())
{ {
......
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