From e10f309f85e39ee3ee0a2985ec19d29cefea220a Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Tue, 31 Dec 2019 18:26:21 +0200 Subject: [PATCH] Uncommented relevant code. --- .../Selection/NDArray.Indexing.Selection.Getter.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs index 537fe206..091dde0a 100644 --- a/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs +++ b/src/NumSharp.Core/Selection/NDArray.Indexing.Selection.Getter.cs @@ -572,8 +572,8 @@ protected static unsafe NDArray FetchIndicesNDNonLinear(NDArray source, var indexGetters = PrepareIndexGetters(source.Shape, indices); //compute coordinates - for (int i = 0; i < size; i++) - //Parallel.For(0, size, i => //TODO: make parallel.for + //for (int i = 0; i < size; i++) + Parallel.For(0, size, i => //TODO: make parallel.for { int* index = stackalloc int[srcDims]; @@ -588,11 +588,10 @@ protected static unsafe NDArray FetchIndicesNDNonLinear(NDArray source, //assign ret[i] = from; #else - dst[i] = source[index, srcDims]; + ret[i] = source[index, srcDims]; #endif - } - - //}); + }); + //} return ret.flat.reshape(retShape).MakeGeneric(); }