FleCSI Core API Version: 2.3.2
 
Loading...
Searching...
No Matches
sort< FieldRef > Struct Template Reference

Sort object implementing a distributed sort and load balancing. More...

Public Member Functions

void operator() ()
 Sort values of an index space based on a field in this index space.
 
 sort (FieldRef fr, std::vector< field_id_t > ignored_fields={}, const double eps=0.005)
 The sort uses a copy plan on the index space of the provided field fr.
 

Detailed Description

template<typename FieldRef>
struct flecsi::util::sort< FieldRef >

Sort object implementing a distributed sort and load balancing.

Template Parameters
FieldRefThe field reference of the field containing the keys.

Constructor & Destructor Documentation

◆ sort()

template<typename FieldRef >
sort ( FieldRef fr,
std::vector< field_id_t > ignored_fields = {},
const double eps = 0.005 )

The sort uses a copy plan on the index space of the provided field fr.

This might prevent other copy plans from being used on this index space. By default all the fields on the same index space as the field reference fr will be sorted and resized. In order to ignore fields on this index space, one can specify the ignored_fields parameter with the ids of fields to not include in the sort. The fields that are not initialized need to be ignored. The sort triggers ghost copies as usual. If this is inappropriate it can be avoided by using the correct permissions on the task preceding the call to the sort.

Parameters
epsThe percent of error in load balancing > 0.0
ignored_fieldsFields to be ignored during the sort on this index space

Member Function Documentation

◆ operator()()

template<typename FieldRef >
void operator() ( )

Sort values of an index space based on a field in this index space.

The partitions might be resized to fit the new distribution. Based on: Histogram Sort with Sampling (HSS) Birpul Harsh & al.