Commit 1ac8d820 authored by Robert Kimball's avatar Robert Kimball

address PR review comments

parent 9a7203ce
......@@ -276,6 +276,7 @@ void StaticCompiler::add_header_search_path(const string& path)
if (error_code ec = code.getError())
{
// throw up
throw runtime_error("could not find file '" + file + "'");
}
s_header_cache.add_file(mapped_name, code.get());
......
......@@ -187,7 +187,7 @@ vector<char> ngraph::file_util::read_file_contents(const string& path)
if (f)
{
char* p = data.data();
int remainder = static_cast<int>(file_size);
size_t remainder = file_size;
size_t offset = 0;
while (f && remainder > 0)
{
......
......@@ -1384,7 +1384,7 @@ void Emitter::generate_call(const std::vector<TensorViewInfo>& inputs,
static string format_name(const string& name)
{
string rc;
if (name.size() > 0)
if (name.empty())
{
rc = " " + name;
}
......
......@@ -83,7 +83,7 @@
using namespace std;
using namespace ngraph::runtime::cpu;
static std::string s_output_dir = "cpu_codegen";
static const std::string s_output_dir = "cpu_codegen";
class StaticInitializers
{
......
......@@ -41,8 +41,3 @@ runtime::cpu::MemoryHandler::~MemoryHandler()
free(m_allocated_buffer_pool);
}
}
void* runtime::cpu::MemoryHandler::get_ptr(size_t offset) const
{
return m_aligned_buffer_pool + offset;
}
......@@ -34,8 +34,7 @@ public:
MemoryHandler(size_t pool_size, size_t alignment);
~MemoryHandler();
void* get_ptr(size_t offset) const;
void* get_ptr(size_t offset) const { return m_aligned_buffer_pool + offset; }
private:
char* m_allocated_buffer_pool;
char* m_aligned_buffer_pool;
......
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