提交 0897d18a 编写于 作者: L liaogang

Fix string.h for memcpy

上级 00500eeb
...@@ -16,7 +16,7 @@ limitations under the License. */ ...@@ -16,7 +16,7 @@ limitations under the License. */
#include "paddle/memory/detail/buddy_allocator.h" #include "paddle/memory/detail/buddy_allocator.h"
#include "paddle/memory/detail/system_allocator.h" #include "paddle/memory/detail/system_allocator.h"
#include <stdlib.h> // for memcpy #include <cstring> // for memcpy
namespace paddle { namespace paddle {
namespace memory { namespace memory {
...@@ -50,7 +50,7 @@ template <> ...@@ -50,7 +50,7 @@ template <>
void Copy<platform::CPUPlace, platform::CPUPlace>(platform::CPUPlace, void* dst, void Copy<platform::CPUPlace, platform::CPUPlace>(platform::CPUPlace, void* dst,
platform::CPUPlace, platform::CPUPlace,
const void* src, size_t num) { const void* src, size_t num) {
memcpy(dst, src, num); std::memcpy(dst, src, num);
} }
#ifndef PADDLE_ONLY_CPU #ifndef PADDLE_ONLY_CPU
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册