Unverified Commit 1d66e7d6 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Merge branch 'master' into bob/gcpu

parents 9d9f42bc 505a0c3d
pytest
tox
pydocstyle==3.0.0
flake8
flake8-commas
flake8-comprehensions
......
......@@ -49,7 +49,8 @@ public:
}
};
std::unique_ptr<ngraph::runtime::Allocator> ngraph::runtime::create_default_allocator()
ngraph::runtime::Allocator* ngraph::runtime::get_default_allocator()
{
return std::unique_ptr<DefaultAllocator>(new DefaultAllocator());
static std::unique_ptr<DefaultAllocator> allocator(new DefaultAllocator());
return allocator.get();
}
......@@ -30,7 +30,7 @@ namespace ngraph
class DefaultAllocator;
/// \brief Create a default allocator that calls into system
/// allocation libraries
std::unique_ptr<Allocator> create_default_allocator();
ngraph::runtime::Allocator* get_default_allocator();
}
}
......
......@@ -185,7 +185,7 @@ runtime::Allocator* runtime::cpu::CPU_Backend::get_host_memory_allocator()
{
if (!m_allocator)
{
m_allocator = create_default_allocator();
return runtime::get_default_allocator();
}
return m_allocator.get();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment