Skip to content

Commit

Permalink
Replace boost::unordered_map with robin_map in `usdImaging/usdIma…
Browse files Browse the repository at this point in the history
…ging`
  • Loading branch information
nvmkuruc committed Nov 2, 2023
1 parent ceb3699 commit ef5c056
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions pxr/usdImaging/usdImaging/delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "pxr/base/work/loops.h"

#include "pxr/base/tf/envSetting.h"
#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/pyLock.h"
#include "pxr/base/tf/fileUtils.h"
#include "pxr/base/tf/ostreamMethods.h"
Expand Down
8 changes: 4 additions & 4 deletions pxr/usdImaging/usdImaging/instanceAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
#include "pxr/base/gf/vec4i.h"
#include "pxr/base/gf/vec4h.h"

#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/pxrTslRobinMap/robin_map.h"
#include "pxr/base/tf/type.h"

#include <boost/unordered_map.hpp>

#include <limits>
#include <queue>

Expand Down Expand Up @@ -953,7 +953,7 @@ struct UsdImagingInstanceAdapter::_IsInstanceTransformVaryingFn

// We keep a simple cache directly on _IsInstanceTransformVaryingFn because
// we only need it during initialization and resyncs (not in UpdateForTime).
boost::unordered_map<UsdPrim, bool, boost::hash<UsdPrim>> cache;
pxr_tsl::robin_map<UsdPrim, bool, TfHash> cache;
};

bool
Expand Down Expand Up @@ -2414,7 +2414,7 @@ struct UsdImagingInstanceAdapter::_ComputeInstanceMapVariabilityFn
// We keep a simple cache of visibility varying states directly on
// _ComputeInstanceMapVariabilityFn because we only need it for the
// variability calculation and during resyncs.
boost::unordered_map<UsdPrim, bool, boost::hash<UsdPrim>> varyingCache;
pxr_tsl::robin_map<UsdPrim, bool, TfHash> varyingCache;
const UsdImagingInstanceAdapter* adapter;
std::vector<_InstancerData::Visibility>* visibility;
};
Expand Down
2 changes: 2 additions & 0 deletions pxr/usdImaging/usdImaging/resolvedAttributeCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "pxr/base/tf/hash.h"
#include "pxr/base/work/utils.h"

#include "pxr/base/tf/hash.h"

#include <tbb/concurrent_unordered_map.h>
#include <functional>

Expand Down
1 change: 0 additions & 1 deletion pxr/usdImaging/usdSkelImaging/skeletonAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "pxr/usd/usdSkel/skeleton.h"
#include "pxr/usd/usdSkel/skeletonQuery.h"

#include <boost/unordered_map.hpp>
#include <unordered_map>


Expand Down

0 comments on commit ef5c056

Please sign in to comment.