/*** Reduce Functions ***/ public FloatTensor Reduce( Func <float, float, long, float[], float> reducer, Func <float, long, float> mapper ) { int[] outDims = { 1 }; float[] output = new float[1]; output[0] = mapper(MultiThread.Reduce <float>(data, reducer), Size); return(new FloatTensor(ctrl, outDims, output)); }
/*** Reduce Functions ***/ public FloatTensor Reduce( Func <float, float, int, float[], float> reducer, Func <float, int, float> mapper ) { int[] outDims = { 1 }; var output = new float[1]; output[0] = mapper(MultiThread.Reduce(data, reducer), Size); return(new FloatTensor(controller, outDims, output)); }
/*** Reduce Functions ***/ public FloatTensor Reduce( Func <float, float, int, float[], float> reducer, Func <float, int, float> mapper ) { int[] outDims = { 1 }; var output = new float[1]; output[0] = mapper(MultiThread.Reduce(data, reducer), Size); return(factory.Create(_shape: outDims, _data: output)); }