mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-07 17:15:29 +00:00
use std::copy to avoid gsl::span overhead (#71)
This commit is contained in:
parent
fd0d7c5fc0
commit
28bb96be2a
1 changed files with 2 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ struct SliceSkips : std::vector<int64_t> {
|
|||
}
|
||||
};
|
||||
|
||||
// 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 <typename T>
|
||||
struct SliceIterator {
|
||||
SliceIterator(const Tensor& tensor, gsl::span<const int64_t> starts, gsl::span<const int64_t> 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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue