MCPcopy Create free account
hub / github.com/RenderKit/embree / sort

Method sort

common/algorithms/parallel_sort.h:275–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 : radixCount(nullptr), src(src), tmp(tmp), N(N) {}
274
275 void sort(const size_t blockSize)
276 {
277 assert(blockSize > 0);
278
279 /* perform single threaded sort for small N */
280 if (N<=blockSize) // handles also special case of 0!
281 {
282 /* do inplace sort inside destination array */
283 std::sort(src,src+N,compare<Ty>);
284 }
285
286 /* perform parallel sort for large N */
287 else
288 {
289 const size_t numThreads = min((N+blockSize-1)/blockSize,TaskScheduler::threadCount(),size_t(MAX_TASKS));
290 tbbRadixSort(numThreads);
291 }
292 }
293
294 ~ParallelRadixSort()
295 {

Callers 2

merge_json.pyFile · 0.80
radix_sortFunction · 0.80

Calls 2

sortFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected