Skip to content

Commit

Permalink
erase empty elements to prevent the map size growing
Browse files Browse the repository at this point in the history
close issue ROCm#48
  • Loading branch information
yan-ming committed May 4, 2016
1 parent f168e44 commit 783ae6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/hsa/mcwamp_hsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ class HSAQueue final : public KalmarQueue

// clear data in kernelBufferMap
kernelBufferMap[ker].clear();
kernelBufferMap.erase(ker);

delete(dispatch);
}
Expand Down Expand Up @@ -697,6 +698,7 @@ class HSAQueue final : public KalmarQueue

// clear data in kernelBufferMap
kernelBufferMap[ker].clear();
kernelBufferMap.erase(ker);

return sp_dispatch;
}
Expand Down

0 comments on commit 783ae6a

Please sign in to comment.