onnxruntime/onnxruntime/test/framework/dummy_allocator.cc
Pranav Sharma f8c3442880
Part 2 of renaming AllocatorInfo to MemoryInfo. (#1804)
* Mention OrtCreateSessionFromArray in C API doc

* Part 2 of renaming AllocatorInfo to MemoryInfo.

* pr comments

* fix comment
2019-09-12 08:19:29 -07:00

21 lines
491 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "dummy_allocator.h"
#include "core/session/onnxruntime_cxx_api.h"
namespace onnxruntime {
namespace test {
DummyAllocator::DummyAllocator() : memory_info_{kDummyAllocator, OrtAllocatorType::OrtDeviceAllocator} {
}
void* DummyAllocator::Alloc(size_t size) {
return malloc(size);
}
void DummyAllocator::Free(void* p) {
free(p);
}
} // namespace test
} // namespace onnxruntime