Skip to content

Commit

Permalink
DRD: Use alternative unordered_map constructor for setting allocator.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrprice authored and mpflanzer committed Jul 7, 2015
1 parent af40f99 commit 8e77bd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/RaceDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ void RaceDetector::workGroupBegin(const WorkGroup *workGroup)
state.numWorkItems = wgsize.x*wgsize.y*wgsize.z;

// Re-use pool allocator for all access maps
AccessMap tmp(state.wgGlobal.get_allocator());
AccessMap tmp(0, AccessMap::hasher(), AccessMap::key_equal(),
state.wgGlobal.get_allocator());
state.wiGlobal.resize(state.numWorkItems+1, tmp);
state.wiLocal.resize(state.numWorkItems+1, tmp);
}
Expand Down Expand Up @@ -395,7 +396,8 @@ void RaceDetector::syncWorkItems(const Memory *memory,
WorkGroupState& state,
vector<AccessMap>& accesses)
{
AccessMap wgAccesses(state.wgGlobal.get_allocator());
AccessMap wgAccesses(0, AccessMap::hasher(), AccessMap::key_equal(),
state.wgGlobal.get_allocator());

for (size_t i = 0; i < state.numWorkItems + 1; i++)
{
Expand Down

0 comments on commit 8e77bd5

Please sign in to comment.