Skip to content

Commit

Permalink
[ndslice] fix slice perfomance
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Apr 13, 2016
1 parent d980ea5 commit 604b82b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/experimental/ndslice/slice.d
Expand Up @@ -559,9 +559,9 @@ auto slice(
Flag!`replaceArrayWithPointer` replaceArrayWithPointer = Yes.replaceArrayWithPointer,
size_t N, Range)(auto ref Slice!(N, Range) slice)
{
import std.array: array;
import std.experimental.ndslice.selection: byElement;
return slice.byElement.array.sliced!replaceArrayWithPointer(slice.shape);
auto ret = .slice!(Unqual!(slice.DeepElemType), replaceArrayWithPointer)(slice.shape);
ret[] = slice;
return ret;
}

///
Expand Down

0 comments on commit 604b82b

Please sign in to comment.