blob: 8c4dd98efa816830a3f81f5244d7000eb8aee90f [file] [log] [blame]
#include "caffe2/core/context.h"
namespace caffe2 {
static std::unique_ptr<CPUAllocator> g_cpu_allocator(new DefaultCPUAllocator());
CPUAllocator* GetCPUAllocator() {
return g_cpu_allocator.get();
}
void SetCPUAllocator(CPUAllocator* alloc) {
g_cpu_allocator.reset(alloc);
}
} // namespace caffe2