Commit d644f619 authored by pruthvi's avatar pruthvi

fix clang error

parent 23c3d356
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include "ngraph/runtime/allocator.hpp" #include "ngraph/runtime/allocator.hpp"
ngraph::runtime::Allocator::~Allocator() {}
class DefaultNgraphAllocator : public ngraph::runtime::Allocator class DefaultNgraphAllocator : public ngraph::runtime::Allocator
{ {
public: public:
......
...@@ -37,6 +37,7 @@ namespace ngraph ...@@ -37,6 +37,7 @@ namespace ngraph
class ngraph::runtime::Allocator class ngraph::runtime::Allocator
{ {
public: public:
virtual ~Allocator() = 0;
/// \brief allocates memory with the given size and alignment requirement /// \brief allocates memory with the given size and alignment requirement
/// \param size exact size of bytes to allocate /// \param size exact size of bytes to allocate
/// \param alignment specifies the alignment. Must be a valid alignment supported by the implementation. /// \param alignment specifies the alignment. Must be a valid alignment supported by the implementation.
......
...@@ -124,17 +124,17 @@ public: ...@@ -124,17 +124,17 @@ public:
virtual Allocator* get_host_memory_allocator() virtual Allocator* get_host_memory_allocator()
{ {
return ngraph::runtime::get_ngraph_allocator(); return ngraph::runtime::get_ngraph_allocator();
}; }
/// \brief Set the host memory allocator to be used by the backend /// \brief Set the host memory allocator to be used by the backend
/// \param pointer to host memory allocator object /// \param allocator is pointer to host memory allocator object
virtual void set_host_memory_allocator(Allocator* allocator){}; virtual void set_host_memory_allocator(Allocator* allocator){}
/// \brief Returns memory allocator used by backend for device allocations /// \brief Returns memory allocator used by backend for device allocations
virtual Allocator* get_device_memory_allocator() virtual Allocator* get_device_memory_allocator()
{ {
return ngraph::runtime::get_ngraph_allocator(); return ngraph::runtime::get_ngraph_allocator();
}; }
/// \brief method for each supported backend to determine if the passed pointer is in device pinned memory or not /// \brief method for each supported backend to determine if the passed pointer is in device pinned memory or not
/// \param ptr pointer to the memory to determine if its in device memory or not /// \param ptr pointer to the memory to determine if its in device memory or not
......
...@@ -156,7 +156,7 @@ runtime::Allocator* runtime::cpu::CPU_Backend::get_host_memory_allocator() ...@@ -156,7 +156,7 @@ runtime::Allocator* runtime::cpu::CPU_Backend::get_host_memory_allocator()
} }
else else
{ {
runtime::get_ngraph_allocator(); return runtime::get_ngraph_allocator();
} }
} }
......
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