LibreOffice Module comphelper (master) 1
Namespaces | Macros | Functions | Variables
parallelsort.hxx File Reference
#include <comphelper/threadpool.hxx>
#include <tools/cpuid.hxx>
#include <memory>
#include <iterator>
#include <thread>
#include <algorithm>
#include <cmath>
#include <random>
#include <functional>
#include <iostream>
#include <chrono>
Include dependency graph for parallelsort.hxx:

Go to the source code of this file.

Namespaces

namespace  comphelper
 

Macros

#define PARALLELSORT_ENABLEPZ   0
 

Functions

static comphelper::ThreadPoolcomphelper::rTPool (comphelper::ThreadPool::getSharedOptimalPool())
 
template<class RandItr , class Compare = std::less<>>
void comphelper::parallelSort (const RandItr aBegin, const RandItr aEnd, Compare aComp=Compare())
 

Variables

const size_t comphelper::nThreadCountGlobal = std::thread::hardware_concurrency()
 
const bool comphelper::bHyperThreadingActive = cpuid::hasHyperThreading()
 
static thread_local std::mt19937 comphelper::aGenerator { std::random_device{}() }
 

Macro Definition Documentation

◆ PARALLELSORT_ENABLEPZ

#define PARALLELSORT_ENABLEPZ   0

Definition at line 34 of file parallelsort.hxx.

Variable Documentation

◆ maBinEnds

size_t maBinEnds[nMaxTreeArraySize]

Definition at line 171 of file parallelsort.hxx.

◆ maDividers

ValueType maDividers[nMaxTreeArraySize]
private

Definition at line 165 of file parallelsort.hxx.

◆ maFunc

const std::function<void()> maFunc
private

Definition at line 108 of file parallelsort.hxx.

◆ maLabels

uint8_t maLabels[mnMaxStaticSize]
private

Definition at line 164 of file parallelsort.hxx.

◆ maSepBinEnds

size_t maSepBinEnds[nMaxTreeArraySize *nMaxTreeArraySize]
private

Definition at line 167 of file parallelsort.hxx.

◆ maTag

std::shared_ptr<comphelper::ThreadTaskTag> maTag
private

Definition at line 122 of file parallelsort.hxx.

◆ mbDummy

bool mbDummy
private

Definition at line 88 of file parallelsort.hxx.

◆ mbThreaded

bool mbThreaded
private

Definition at line 168 of file parallelsort.hxx.

◆ mnDividers

const size_t mnDividers
private

Definition at line 162 of file parallelsort.hxx.

◆ mnMaxStaticSize

constexpr size_t mnMaxStaticSize = 1024 * 50
staticconstexprprivate

Definition at line 163 of file parallelsort.hxx.

◆ mnTreeArraySize

const size_t mnTreeArraySize
private

Definition at line 161 of file parallelsort.hxx.

◆ pLabels

std::unique_ptr<uint8_t[]> pLabels
private

Definition at line 166 of file parallelsort.hxx.