mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
rose: role aliasing improvements
These changes improve the performance of the role aliasing passes on very large cases and fix a couple of small errors in the left and right merge passes as well.
This commit is contained in:
committed by
Matthew Barr
parent
a55bbe657c
commit
988ea6b4e1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/unordered/unordered_map.hpp>
|
||||
#include <boost/unordered/unordered_set.hpp>
|
||||
@@ -318,6 +319,12 @@ public:
|
||||
friend void swap(flat_set &a, flat_set &b) {
|
||||
a.swap(b);
|
||||
}
|
||||
|
||||
// Free hash function.
|
||||
friend size_t hash_value(const flat_set &a) {
|
||||
using boost::hash_value;
|
||||
return hash_value(a.data);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -604,6 +611,12 @@ public:
|
||||
friend void swap(flat_map &a, flat_map &b) {
|
||||
a.swap(b);
|
||||
}
|
||||
|
||||
// Free hash function.
|
||||
friend size_t hash_value(const flat_map &a) {
|
||||
using boost::hash_value;
|
||||
return hash_value(a.data);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user