-
Notifications
You must be signed in to change notification settings - Fork 50
Reuse temporary memory allocations #478
Reuse temporary memory allocations #478
Conversation
c891716
to
d76c669
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
d76c669
to
2f5fe4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for you work @pgorlani it looks very good to me!
I have some minor comments on it.
2f5fe4d
to
9b4ca54
Compare
9d515e3
into
codeplaysoftware:master
temp_usm_size_map_t temp_usm_size_map_; | ||
|
||
template <typename container_t> | ||
void release_buff_mem_(const container_t& mem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late comment. I think this one should be swapped with the release_usm_mem_
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in aa1fdf1.
Temp_Mem_Pool(queue_t q) | ||
: q_(q), | ||
temp_buffer_map_tot_byte_size_(0), | ||
temp_usm_map_tot_byte_size_(0) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the temp_usm_map_tot_byte_size_
is undefined if SB_ENABLE_USM is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in aa1fdf1.
This patch introduces a pool of temporary memory allocations within the
sb_handler
, which allows reusing them in order to save re-allocation time.