コード例 #1
0
ファイル: NativeSort.cs プロジェクト: carlsonh/Data_Locality
 /// <summary>
 /// Sorts a list in ascending order.
 /// </summary>
 /// <typeparam name="T">Source type of elements</typeparam>
 /// <param name="list">List to perform sort.</param>
 public unsafe static void Sort <T>(this UnsafeList <T> list) where T : unmanaged, IComparable <T>
 {
     list.Sort(new DefaultComparer <T>());
 }
コード例 #2
0
 public unsafe static void Sort <T>(this UnsafeList list) where T : struct, IComparable <T>
 {
     list.Sort <T, DefaultComparer <T> >(new DefaultComparer <T>());
 }
コード例 #3
0
 /// <summary>
 /// Sorts the container in ascending order.
 /// </summary>
 /// <typeparam name="T">Source type of elements</typeparam>
 /// <param name="container">The container to perform sort.</param>
 /// <param name="inputDeps">The job handle or handles for any scheduled jobs that use this container.</param>
 /// <returns>A new job handle containing the prior handles as well as the handle for the job that sorts
 /// the container.</returns>
 public unsafe static JobHandle Sort <T>(this UnsafeList <T> container, JobHandle inputDeps)
     where T : unmanaged, IComparable <T>
 {
     return(container.Sort(new DefaultComparer <T>(), inputDeps));
 }