Skip to content

Commit

Permalink
[prefast:Warning]: C26451 (microsoft#14628)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
  • Loading branch information
wejoncy authored and preetha-intel committed Feb 15, 2023
1 parent afb528d commit 112a46f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion onnxruntime/core/providers/cpu/tensor/upsample_antialias.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ void ComputeInterpolationAtLevel2(int64_t num_channels, int64_t input_height, in
static_cast<double>(output_height * 2),
[&](std::ptrdiff_t first, std::ptrdiff_t last) {
if (output_height == input_height) {
std::copy_n(Xdata_span.begin() + narrow<size_t>(first * input_width), narrow<size_t>((last - first) * output_width),
auto workload_in_thread = narrow<size_t>(last) - narrow<size_t>(first);
std::copy_n(Xdata_span.begin() + narrow<size_t>(first * input_width), narrow<size_t>(workload_in_thread * output_width),
Ydata_span.begin() + narrow<size_t>(first * output_width));
return;
}
Expand Down

0 comments on commit 112a46f

Please sign in to comment.