private ArrayView <int> AllocateTempRadixSortView <T, TRadixSortOperation>(ArrayView <T> input) where T : unmanaged where TRadixSortOperation : struct, IRadixSortOperation <T> { var tempSize = Accelerator.ComputeRadixSortTempStorageSize <T, TRadixSortOperation>(input.Length); return(bufferCache.Allocate <int>(tempSize)); }
private ArrayView <Index> AllocateTempRadixSortView <T>(ArrayView <T> input) where T : struct { var tempSize = Accelerator.ComputeRadixSortTempStorageSize(input.Length); if (tempSize < 1) { throw new ArgumentOutOfRangeException(nameof(input)); } return(bufferCache.Allocate <Index>(tempSize)); }