tlx
Loading...
Searching...
No Matches
PS5BigSortStep< Context, StringPtr > Class Template Reference

PS5BigSortStep Out-of-Place Parallel Sample Sort with Separate Jobs. More...

#include <parallel_sample_sort.hpp>

Inheritance diagram for PS5BigSortStep< Context, StringPtr >:
PS5SortStep

Public Types

typedef StringPtr::StringSet StringSet
typedef StringSet::Iterator StrIterator
typedef Context::key_type key_type

Public Member Functions

 PS5BigSortStep (Context &ctx, PS5SortStep *pstep, const StringPtr &strptr, size_t depth)
virtual ~PS5BigSortStep ()
void sample ()
void count (unsigned int p)
void count_finished ()
void distribute (unsigned int p)
void distribute_finished ()
void substep_all_done () final
 Pure virtual function called by substep when all substeps are done.
Public Member Functions inherited from PS5SortStep
void substep_notify_done ()
 Notify superstep that the currently substep is done.

Public Attributes

Context & ctx_
 context
PS5SortSteppstep_
 parent sort step for notification
StringPtr strptr_
 string pointers, size, and current sorting depth
size_t depth_
size_t parts_
 number of parts into which the strings were split
size_t psize_
 size of all parts except the last
std::atomic< size_t > pwork_
 number of threads still working
Context::Classify classifier_
 classifier instance and variables (contains splitter tree
unsigned char splitter_lcp_ [num_splitters_+1]
 LCPs of splitters, needed for recursive calls.
simple_vector< simple_vector< size_t > > bkt_
 individual bucket array of threads, keep bkt[0] for DistributeJob
simple_vector< simple_vector< std::uint16_t > > bktcache_
 bucket ids cache, created by classifier and later counted

Static Public Attributes

static const size_t treebits_
static const size_t num_splitters_
static const size_t bktnum_

Additional Inherited Members

Protected Member Functions inherited from PS5SortStep
 PS5SortStep ()
virtual ~PS5SortStep ()
void substep_add ()
 Register new substep.

Detailed Description

template<typename Context, typename StringPtr>
class tlx::sort_strings_detail::PS5BigSortStep< Context, StringPtr >

PS5BigSortStep Out-of-Place Parallel Sample Sort with Separate Jobs.

Definition at line 1097 of file parallel_sample_sort.hpp.

Member Typedef Documentation

◆ key_type

template<typename Context, typename StringPtr>
typedef Context::key_type key_type

Definition at line 1102 of file parallel_sample_sort.hpp.

◆ StringSet

template<typename Context, typename StringPtr>
typedef StringPtr::StringSet StringSet

Definition at line 1100 of file parallel_sample_sort.hpp.

◆ StrIterator

template<typename Context, typename StringPtr>
typedef StringSet::Iterator StrIterator

Definition at line 1101 of file parallel_sample_sort.hpp.

Constructor & Destructor Documentation

◆ PS5BigSortStep()

template<typename Context, typename StringPtr>
PS5BigSortStep ( Context & ctx,
PS5SortStep * pstep,
const StringPtr & strptr,
size_t depth )
inline

Definition at line 1138 of file parallel_sample_sort.hpp.

◆ ~PS5BigSortStep()

template<typename Context, typename StringPtr>
virtual ~PS5BigSortStep ( )
inlinevirtual

Definition at line 1161 of file parallel_sample_sort.hpp.

Member Function Documentation

◆ count()

template<typename Context, typename StringPtr>
void count ( unsigned int p)
inline

Definition at line 1197 of file parallel_sample_sort.hpp.

◆ count_finished()

template<typename Context, typename StringPtr>
void count_finished ( )
inline

Definition at line 1222 of file parallel_sample_sort.hpp.

◆ distribute()

template<typename Context, typename StringPtr>
void distribute ( unsigned int p)
inline

Definition at line 1249 of file parallel_sample_sort.hpp.

◆ distribute_finished()

template<typename Context, typename StringPtr>
void distribute_finished ( )
inline

Definition at line 1278 of file parallel_sample_sort.hpp.

◆ sample()

template<typename Context, typename StringPtr>
void sample ( )
inline

Definition at line 1166 of file parallel_sample_sort.hpp.

◆ substep_all_done()

template<typename Context, typename StringPtr>
void substep_all_done ( )
inlinefinalvirtual

Pure virtual function called by substep when all substeps are done.

Implements PS5SortStep.

Definition at line 1374 of file parallel_sample_sort.hpp.

Member Data Documentation

◆ bkt_

template<typename Context, typename StringPtr>
simple_vector<simple_vector<size_t> > bkt_

individual bucket array of threads, keep bkt[0] for DistributeJob

Definition at line 1131 of file parallel_sample_sort.hpp.

◆ bktcache_

template<typename Context, typename StringPtr>
simple_vector<simple_vector<std::uint16_t> > bktcache_

bucket ids cache, created by classifier and later counted

Definition at line 1133 of file parallel_sample_sort.hpp.

◆ bktnum_

template<typename Context, typename StringPtr>
const size_t bktnum_
static

Definition at line 1125 of file parallel_sample_sort.hpp.

◆ classifier_

template<typename Context, typename StringPtr>
Context::Classify classifier_

classifier instance and variables (contains splitter tree

Definition at line 1121 of file parallel_sample_sort.hpp.

◆ ctx_

template<typename Context, typename StringPtr>
Context& ctx_

context

Definition at line 1105 of file parallel_sample_sort.hpp.

◆ depth_

template<typename Context, typename StringPtr>
size_t depth_

Definition at line 1111 of file parallel_sample_sort.hpp.

◆ num_splitters_

template<typename Context, typename StringPtr>
const size_t num_splitters_
static

Definition at line 1124 of file parallel_sample_sort.hpp.

◆ parts_

template<typename Context, typename StringPtr>
size_t parts_

number of parts into which the strings were split

Definition at line 1114 of file parallel_sample_sort.hpp.

◆ psize_

template<typename Context, typename StringPtr>
size_t psize_

size of all parts except the last

Definition at line 1116 of file parallel_sample_sort.hpp.

◆ pstep_

template<typename Context, typename StringPtr>
PS5SortStep* pstep_

parent sort step for notification

Definition at line 1107 of file parallel_sample_sort.hpp.

◆ pwork_

template<typename Context, typename StringPtr>
std::atomic<size_t> pwork_

number of threads still working

Definition at line 1118 of file parallel_sample_sort.hpp.

◆ splitter_lcp_

template<typename Context, typename StringPtr>
unsigned char splitter_lcp_[num_splitters_+1]

LCPs of splitters, needed for recursive calls.

Definition at line 1128 of file parallel_sample_sort.hpp.

◆ strptr_

template<typename Context, typename StringPtr>
StringPtr strptr_

string pointers, size, and current sorting depth

Definition at line 1110 of file parallel_sample_sort.hpp.

◆ treebits_

template<typename Context, typename StringPtr>
const size_t treebits_
static

Definition at line 1123 of file parallel_sample_sort.hpp.


The documentation for this class was generated from the following file: