Skip to content

Commit 0526882

Browse files
committed
Switch to std unordered_map
1 parent f5c4a65 commit 0526882

File tree

17 files changed

+47
-46
lines changed

17 files changed

+47
-46
lines changed

src/Core/Algorithms/Field/CalculateNodeLocationFrequencyAlgorithm.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <Core/Datatypes/Legacy/Field/VField.h>
3535
#include <Core/Datatypes/Legacy/Field/VMesh.h>
3636
#include <Core/Datatypes/Mesh/VirtualMeshFacade.h>
37-
#include <boost/unordered_map.hpp>
37+
#include <unordered_map>
3838

3939
using namespace SCIRun::Core::Algorithms;
4040
using namespace SCIRun::Core::Algorithms::Fields;
@@ -74,7 +74,7 @@ FieldHandle CalculateNodeLocationFrequencyAlgo::runImpl(FieldHandle input) const
7474
THROW_ALGORITHM_INPUT_ERROR("Could not allocate output field");
7575

7676
auto facade(input->mesh()->getFacade());
77-
boost::unordered_map<Point, unsigned int, PointHash> pointFreq;
77+
std::unordered_map<Point, unsigned int, PointHash> pointFreq;
7878
for (const auto& node : facade->nodes())
7979
{
8080
pointFreq[node.point()]++;

src/Core/Algorithms/Legacy/DataIO/STLUtils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
#define CORE_ALGORITHMS_DATAIO_STLUTILS_H 1
3131

3232
/// TODO: use std::unordered_map when porting to SCIRun 5
33-
#include <boost/unordered_map.hpp>
33+
#include <unordered_map>
3434
#include <boost/shared_array.hpp>
3535

36+
#include <boost/unordered_map.hpp>
3637
#include <functional>
3738
#include <list>
3839

@@ -72,7 +73,7 @@ struct SCISHARE Facet
7273
};
7374

7475
// point(vertex) lookup table
75-
typedef boost::unordered_map< Geometry::Point, unsigned int, PointHash > PointTable;
76+
typedef std::unordered_map< Geometry::Point, unsigned int, PointHash > PointTable;
7677
typedef std::list<Facet> FacetList;
7778

7879
/// compute face normal:

src/Core/Algorithms/Legacy/DataIO/TriSurfSTLASCIIConverter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AsciiConverterPrivate
5656
{
5757
public:
5858
// // point(vertex) lookup table
59-
// typedef boost::unordered_map< Point, unsigned int, PointHash > PointTable;
59+
// typedef std::unordered_map< Point, unsigned int, PointHash > PointTable;
6060
// typedef std::list<Facet> FacetList;
6161

6262
explicit AsciiConverterPrivate(LoggerHandle pr)

src/Core/Algorithms/Legacy/DataIO/TriSurfSTLBinaryConverter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include <locale>
4444

4545
/// TODO: use std::unordered_map when porting to SCIRun 5
46-
//#include <boost/unordered_map.hpp>
46+
//#include <unordered_map>
4747
using namespace SCIRun;
4848
using namespace SCIRun::Core::Algorithms;
4949
using namespace SCIRun::Core::Logging;

src/Core/Algorithms/Legacy/Fields/ClipMesh/ClipMeshByIsovalue.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <Core/Datatypes/Matrix.h>
3636
#include <Core/Datatypes/SparseRowMatrixFromMap.h>
3737
#include <Core/Datatypes/Legacy/Field/FieldInformation.h>
38-
#include <boost/unordered_map.hpp>
38+
#include <unordered_map>
3939

4040
#include <algorithm>
4141
#include <set>
@@ -94,8 +94,8 @@ namespace detail
9494
}
9595
};
9696

97-
typedef boost::unordered_map<VField::index_type, VMesh::Node::index_type> node_hash_type;
98-
typedef boost::unordered_map<edgepair_t, VMesh::Node::index_type, edgepairhash> edge_hash_type;
97+
typedef std::unordered_map<VField::index_type, VMesh::Node::index_type> node_hash_type;
98+
typedef std::unordered_map<edgepair_t, VMesh::Node::index_type, edgepairhash> edge_hash_type;
9999

100100
bool operator==(const edgepair_t &a, const edgepair_t &b)
101101
{
@@ -132,7 +132,7 @@ namespace detail
132132
}
133133
};
134134

135-
typedef boost::unordered_map<facetriple_t, VMesh::Node::index_type, facetriplehash> face_hash_type;
135+
typedef std::unordered_map<facetriple_t, VMesh::Node::index_type, facetriplehash> face_hash_type;
136136

137137
}
138138

@@ -1000,7 +1000,7 @@ bool ClipMeshByIsovalueAlgoHex::run(const AlgorithmBase* algo, FieldHandle input
10001000
// Create a map to help differentiate between new nodes created for
10011001
// the inserted sheet, and the nodes on the stair stepped boundary.
10021002
std::map<VMesh::Node::index_type, VMesh::Node::index_type> clipped_to_original_nodemap;
1003-
typedef boost::unordered_map<VField::index_type, VMesh::Node::index_type> hash_type;
1003+
typedef std::unordered_map<VField::index_type, VMesh::Node::index_type> hash_type;
10041004

10051005
hash_type nodemap;
10061006

src/Core/Algorithms/Legacy/Fields/DomainFields/GetDomainBoundaryAlgo.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include <Core/Datatypes/PropertyManagerExtensions.h>
3939
#include <Core/Logging/Log.h>
4040

41-
#include <boost/unordered_map.hpp>
41+
#include <unordered_map>
4242

4343
using namespace SCIRun;
4444
using namespace SCIRun::Core::Algorithms;
@@ -85,7 +85,7 @@ GetDomainBoundaryAlgo::GetDomainBoundaryAlgo()
8585
bool
8686
GetDomainBoundaryAlgo::runImpl(FieldHandle input, SparseRowMatrixHandle domainlink, FieldHandle& output) const
8787
{
88-
typedef boost::unordered_multimap<index_type,pointtype> pointhash_map_type;
88+
typedef std::unordered_multimap<index_type,pointtype> pointhash_map_type;
8989

9090
ScopedAlgorithmStatusReporter asr(this, "GetDomainBoundary");
9191
using namespace Parameters;

src/Core/Algorithms/Legacy/Fields/MarchingCubes/BaseMC.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
#include <Core/Datatypes/SparseRowMatrix.h>
4545
#include <Core/Datatypes/Legacy/Field/Field.h>
46-
#include <boost/unordered_map.hpp>
46+
#include <unordered_map>
4747

4848
#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
4949
#include <Core/Geom/GeomObj.h>
@@ -92,12 +92,12 @@ namespace SCIRun {
9292
{
9393
size_t operator()(const edgepair_t &a) const
9494
{
95-
boost::hash<size_t> h;
95+
std::hash<size_t> h;
9696
return h((a.first << 3) ^ a.second);
9797
}
9898
};
9999

100-
typedef boost::unordered_map<edgepair_t, SCIRun::index_type, edgepairhash> edge_hash_type;
100+
typedef std::unordered_map<edgepair_t, SCIRun::index_type, edgepairhash> edge_hash_type;
101101

102102
std::vector<SCIRun::index_type> cell_map_; // Unique cells when surfacing node data.
103103
std::vector<SCIRun::index_type> node_map_; // Unique nodes when surfacing cell data.

src/Core/Algorithms/Legacy/Fields/MeshDerivatives/ExtractSimpleIsosurfaceAlgo.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include <Core/Algorithms/Base/AlgorithmPreconditions.h>
3939
#include <Core/Datatypes/PropertyManagerExtensions.h>
4040

41-
#include <boost/unordered_map.hpp>
41+
#include <unordered_map>
4242

4343
using namespace SCIRun;
4444
using namespace SCIRun::Core::Algorithms;

src/Core/Algorithms/Legacy/Fields/MeshDerivatives/GetCentroids.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <Core/GeometryPrimitives/Vector.h>
3535
#include <Core/Algorithms/Base/AlgorithmVariableNames.h>
3636
#include <Core/Algorithms/Base/AlgorithmPreconditions.h>
37-
#include <boost/unordered_map.hpp>
37+
#include <unordered_map>
3838
#include <Core/Algorithms/Legacy/Fields/RegisterWithCorrespondences.h>
3939

4040
using namespace SCIRun;

src/Core/Algorithms/Legacy/Fields/MeshDerivatives/GetFieldBoundaryAlgo.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <Core/Algorithms/Base/AlgorithmPreconditions.h>
3838
#include <Core/Datatypes/PropertyManagerExtensions.h>
3939

40-
#include <boost/unordered_map.hpp>
40+
#include <unordered_map>
4141

4242
using namespace SCIRun;
4343
using namespace SCIRun::Core::Algorithms;
@@ -65,7 +65,7 @@ GetFieldBoundaryAlgo::run(FieldHandle input, FieldHandle& output, MatrixHandle&
6565
ScopedAlgorithmStatusReporter asr(this, "GetFieldBoundary");
6666

6767
/// Define types we need for mapping
68-
using hash_map_type = boost::unordered_map<index_type,index_type,IndexHash>;
68+
using hash_map_type = std::unordered_map<index_type,index_type,IndexHash>;
6969

7070
hash_map_type node_map;
7171
hash_map_type elem_map;
@@ -308,7 +308,7 @@ GetFieldBoundaryAlgo::run(FieldHandle input, FieldHandle& output) const
308308
ScopedAlgorithmStatusReporter asr(this, "GetFieldBoundary");
309309

310310
/// Define types we need for mapping
311-
using hash_map_type = boost::unordered_map<index_type,index_type,IndexHash>;
311+
using hash_map_type = std::unordered_map<index_type,index_type,IndexHash>;
312312

313313
hash_map_type node_map;
314314
hash_map_type elem_map;

0 commit comments

Comments
 (0)