mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-26 03:00:54 +00:00
Replace std::exclusive_scan() with for loop because std::exclusive_scan() is not implemented in GCC 7. (#13045)
This commit is contained in:
parent
c7a4093db8
commit
6ea8780886
1 changed files with 8 additions and 2 deletions
|
|
@ -49,8 +49,14 @@ bool MatchKernelDefTypes(const Node& node,
|
|||
const auto actual_input_arg_offsets = [&actual_input_arg_counts]() {
|
||||
InlinedVector<int> offsets{};
|
||||
offsets.reserve(actual_input_arg_counts.size());
|
||||
std::exclusive_scan(actual_input_arg_counts.begin(), actual_input_arg_counts.end(),
|
||||
std::back_inserter(offsets), 0);
|
||||
// std::exclusive_scan() is not supported until GCC 9.3
|
||||
// std::exclusive_scan(actual_input_arg_counts.begin(), actual_input_arg_counts.end(),
|
||||
// std::back_inserter(offsets), 0);
|
||||
int current_offset = 0;
|
||||
for (size_t i = 0; i < actual_input_arg_counts.size(); ++i) {
|
||||
offsets.push_back(current_offset);
|
||||
current_offset += actual_input_arg_counts[i];
|
||||
}
|
||||
return offsets;
|
||||
}();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue