mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-06 00:03:22 +00:00
* Mention OrtCreateSessionFromArray in C API doc * Part 2 of renaming AllocatorInfo to MemoryInfo. * pr comments * fix comment
21 lines
491 B
C++
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
|