public ValueMemoryOwner <TResult> ToArray(ArrayPool <TResult> pool, bool clearOnDispose = default) { var result = pool.RentSliced(count, clearOnDispose); ArrayExtensions.CopyRange(start, count, result.Memory.Span, vectorSelector, selector); return(result); }
public TResult[] ToArray() { var result = Utils.AllocateUninitializedArray <TResult>(count); ArrayExtensions.CopyRange(start, count, result.AsSpan(), vectorSelector, selector); return(result); }