Commit 15d39100 authored by Jaikrishnan Menon's avatar Jaikrishnan Menon Committed by Scott Cyphers

Avoid a memcpy (#1358)

parent d1d8c4a7
...@@ -26,10 +26,13 @@ namespace ngraph ...@@ -26,10 +26,13 @@ namespace ngraph
{ {
template <typename ElementType> template <typename ElementType>
void result(const void* arg, void* out, size_t count) void result(const void* arg, void* out, size_t count)
{
if (arg != out)
{ {
memcpy(out, arg, sizeof(ElementType) * count); memcpy(out, arg, sizeof(ElementType) * count);
} }
} }
} }
} }
}
} }
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