public void Sort(int threadnum = -1) { #if NO_SUPPORT_PARALLEL_LIB #else parallelOption.MaxDegreeOfParallelism = threadnum; if (threadnum > 0) { lcts = new LimitedConcurrencyLevelTaskScheduler(threadnum * 2); parallelOption.TaskScheduler = lcts; } #endif QuickSort(0, Count - 1); }
public DoubleArrayTrieBuilder(int thread_num) { array = null; thread_num_ = thread_num; #if NO_SUPPORT_PARALLEL_LIB #else lcts = new LimitedConcurrencyLevelTaskScheduler(thread_num_ * 2); parallelOption = new ParallelOptions(); parallelOption.TaskScheduler = lcts; #endif lastQPS = 0.0; lastQPSDelta = 0.0; }