From 28bb96be2a8daf2d27ba4c3b263f26350a43a340 Mon Sep 17 00:00:00 2001 From: Tracy Sharpe <42477615+tracysh@users.noreply.github.com> Date: Fri, 30 Nov 2018 18:44:41 -0800 Subject: [PATCH] use std::copy to avoid gsl::span overhead (#71) --- onnxruntime/core/providers/cpu/tensor/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();