Commit 3a18ebfd authored by charlie's avatar charlie
Browse files

Simplify constant iota

parent 58d151ba
...@@ -69,8 +69,7 @@ struct parse_gemm : op_parser<parse_gemm> ...@@ -69,8 +69,7 @@ struct parse_gemm : op_parser<parse_gemm>
trans_b = parser.parse_value(info.attributes.at("transB")).at<bool>(); trans_b = parser.parse_value(info.attributes.at("transB")).at<bool>();
} }
std::vector<int64_t> perm(2); std::vector<int64_t> perm = {0, 1};
std::iota(perm.begin(), perm.end(), int64_t{0});
// swap the last two elements // swap the last two elements
std::swap(*perm.rbegin(), *(perm.rbegin() + 1)); std::swap(*perm.rbegin(), *(perm.rbegin() + 1));
......
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