Commit 14d28cb3 authored by Paul's avatar Paul
Browse files

Format

parent d92520de
...@@ -71,20 +71,24 @@ struct pad_compiler : compiler<pad_compiler> ...@@ -71,20 +71,24 @@ struct pad_compiler : compiler<pad_compiler>
std::copy(padding.begin(), padding.begin() + offsets.size(), offsets.begin()); std::copy(padding.begin(), padding.begin() + offsets.size(), offsets.begin());
auto offset_lens = input_lens; auto offset_lens = input_lens;
std::transform(input_lens.begin(), input_lens.end(), offsets.begin(), offset_lens.begin(), [&](auto input, auto offset) { std::transform(input_lens.begin(),
return input+offset; input_lens.end(),
}); offsets.begin(),
offset_lens.begin(),
[&](auto input, auto offset) { return input + offset; });
auto vinputs = inputs; auto vinputs = inputs;
vinputs.push_back(inputs.front().with_lens(offset_lens)); vinputs.push_back(inputs.front().with_lens(offset_lens));
auto rinputs = reduce_dims(vinputs); auto rinputs = reduce_dims(vinputs);
auto rinput_lens = rinputs.front().lens(); auto rinput_lens = rinputs.front().lens();
auto roffset_lens = rinputs.back().lens(); auto roffset_lens = rinputs.back().lens();
std::vector<size_t> roffsets(roffset_lens.size()); std::vector<size_t> roffsets(roffset_lens.size());
std::transform(rinput_lens.begin(), rinput_lens.end(), roffset_lens.begin(), roffsets.begin(), [](auto input, auto offset_dim) { std::transform(rinput_lens.begin(),
return offset_dim - input; rinput_lens.end(),
}); roffset_lens.begin(),
roffsets.begin(),
[](auto input, auto offset_dim) { return offset_dim - input; });
rinputs.pop_back(); rinputs.pop_back();
hip_compile_options options; hip_compile_options options;
......
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