diff --git a/onnxruntime/core/providers/cpu/tensor/utils.h b/onnxruntime/core/providers/cpu/tensor/utils.h index 5890412601..a59514d999 100644 --- a/onnxruntime/core/providers/cpu/tensor/utils.h +++ b/onnxruntime/core/providers/cpu/tensor/utils.h @@ -100,7 +100,7 @@ struct SliceSkips : std::vector { } }; -// This provides easy sequential iteration over a subset of a tensor given a span of starts & etents +// This provides easy sequential iteration over a subset of a tensor given a span of starts & extents template struct SliceIterator { SliceIterator(const Tensor& tensor, gsl::span starts, gsl::span extents) @@ -137,7 +137,7 @@ struct SliceIterator { } T* CopyInnermostAxis(T* output) { - gsl::copy(gsl::make_span(input_, inner_extent_), gsl::make_span(output, inner_extent_)); + std::copy(input_, input_ + inner_extent_, output); input_ += inner_extent_; output += inner_extent_; AdvanceOverInnerExtent();