Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
00f79586
Commit
00f79586
authored
Jun 14, 2019
by
pruthvi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use unique_ptr to hold m_allocator in the cpu backend
parent
f305f60d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cpu_backend.cpp
src/ngraph/runtime/cpu/cpu_backend.cpp
+2
-2
cpu_backend.hpp
src/ngraph/runtime/cpu/cpu_backend.hpp
+1
-1
No files found.
src/ngraph/runtime/cpu/cpu_backend.cpp
View file @
00f79586
...
...
@@ -161,7 +161,7 @@ runtime::Allocator* runtime::cpu::CPU_Backend::get_host_memory_allocator()
{
if
(
m_allocator
)
{
return
m_allocator
;
return
m_allocator
.
get
()
;
}
else
{
...
...
@@ -172,7 +172,7 @@ runtime::Allocator* runtime::cpu::CPU_Backend::get_host_memory_allocator()
void
runtime
::
cpu
::
CPU_Backend
::
set_host_memory_allocator
(
std
::
unique_ptr
<
runtime
::
Allocator
>
allocator
)
{
m_allocator
=
allocator
.
get
(
);
m_allocator
=
std
::
move
(
allocator
);
}
vector
<
runtime
::
PerformanceCounter
>
runtime
::
cpu
::
CPU_Executable
::
get_performance_data
()
const
...
...
src/ngraph/runtime/cpu/cpu_backend.hpp
View file @
00f79586
...
...
@@ -70,7 +70,7 @@ namespace ngraph
private
:
std
::
unordered_map
<
std
::
shared_ptr
<
Function
>
,
std
::
shared_ptr
<
Executable
>>
m_exec_map
;
Allocator
*
m_allocator
;
std
::
unique_ptr
<
Allocator
>
m_allocator
;
};
class
CPU_BACKEND_API
CPU_Executable
:
public
runtime
::
Executable
...
...
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