untangle function object code for stxxl comperators

This commit is contained in:
Dennis Luxen
2014-08-29 12:07:00 +02:00
parent becb6cf5bf
commit d1454075ab
5 changed files with 24 additions and 16 deletions
+4 -1
View File
@@ -82,7 +82,10 @@ void ExtractionContainers::PrepareData(const std::string &output_file_name,
std::cout << "[extractor] Sorting all nodes ... " << std::flush;
TIMER_START(sorting_nodes);
stxxl::sort(all_nodes_list.begin(), all_nodes_list.end(), CmpNodeByID(), stxxl_memory);
stxxl::sort(all_nodes_list.begin(),
all_nodes_list.end(),
ExternalMemoryNodeSTXXLCompare(),
stxxl_memory);
TIMER_STOP(sorting_nodes);
std::cout << "ok, after " << TIMER_SEC(sorting_nodes) << "s" << std::endl;
+1
View File
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "InternalExtractorEdge.h"
#include "ExtractorStructs.h"
#include "../DataStructures/ExternalMemoryNode.h"
#include "../DataStructures/Restriction.h"
#include "../Util/FingerPrint.h"
-11
View File
@@ -89,15 +89,4 @@ struct Cmp
value_type min_value() { return 0x0; }
};
struct CmpNodeByID
{
using value_type = ExternalMemoryNode;
bool operator()(const ExternalMemoryNode &left, const ExternalMemoryNode &right) const
{
return left.node_id < right.node_id;
}
value_type max_value() { return ExternalMemoryNode::max_value(); }
value_type min_value() { return ExternalMemoryNode::min_value(); }
};
#endif /* EXTRACTORSTRUCTS_H_ */