blob: 60c6fb6747b0ed525528c00b79578ff6d633b3b9 [file] [log] [blame]
#include "caffe2/core/context.h"
#include "caffe2/core/typeid.h"
#include "caffe2/core/tensor.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