Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel_ROCM
Commits
5755f841
Commit
5755f841
authored
Jan 07, 2025
by
Ville Pietilä
Browse files
Optimize memory pool insertion.
parent
c6ba9545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
include/ck/utility/host_memory_allocator.hpp
include/ck/utility/host_memory_allocator.hpp
+4
-2
No files found.
include/ck/utility/host_memory_allocator.hpp
View file @
5755f841
...
...
@@ -128,7 +128,9 @@ namespace memory {
std
::
cout
<<
"[ DynamicMemPool ] Creating new pool queue for size "
<<
sizeInBytes
<<
std
::
endl
;
}
#endif
memory_pool_
[
sizeInBytes
].
push
(
p
);
std
::
queue
<
void
*>
q
;
q
.
push
(
p
);
memory_pool_
.
insert
({
sizeInBytes
,
std
::
move
(
q
)});
memPoolSizeInBytes_
+=
sizeInBytes
;
}
#ifdef ENABLE_MEM_POOL_LOGGING
...
...
@@ -230,7 +232,7 @@ namespace memory {
else
{
std
::
queue
<
void
*>
q
;
q
.
push
(
p
);
memory_pool_
[
sizeInBytes
]
=
std
::
move
(
q
);
memory_pool_
.
insert
({
sizeInBytes
,
std
::
move
(
q
)
})
;
#ifdef ENABLE_MEM_POOL_LOGGING
if
(
enableLogging_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment