Commit 9e9070b6 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 60fb49dc
......@@ -774,16 +774,15 @@ struct gather
return {type, lens};
}
template<typename V, typename T>
T compute_data_index(const V &indices, const int axis_index, const T& out_idx) const
template <typename V, typename T>
T compute_data_index(const V& indices, const int axis_index, const T& out_idx) const
{
auto data_idx = out_idx;
std::size_t index{};
if(!indices.get_shape().scalar())
{
auto start_it = data_idx.begin() + axis_index;
auto end_it =
data_idx.begin() + axis_index + indices.get_shape().lens().size();
auto end_it = data_idx.begin() + axis_index + indices.get_shape().lens().size();
std::vector<std::size_t> ind_idx(start_it, end_it);
data_idx.erase(start_it, end_it);
index = indices(ind_idx.begin(), ind_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