mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
* Remove APIs unavailable in Store in #8349, #8178, #8065 * Add UWP stubs of C runtime functions * Remove UWP incompatible tests from UWP build * Remove incompatible tests from Store * Use UWP stubs in store only * Skip partition check outside of Windows * Remove unused WRL include * Workaround Windows header not including what it uses * Fix precompiled header name clash * Workaround SDK bugs * DXCore workaround in Win7 * Fix warning * Fix more warnings * Bump WinML to target Windows 8 * Fix more warnings * Remove unnecessary workarounds * Remove Desktop only APIs from DML adapter
29 lines
No EOL
718 B
C++
29 lines
No EOL
718 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
#include "lib/Api/pch/pch.h"
|
|
|
|
#include "VectorBackedBuffer.h"
|
|
|
|
namespace _winml {
|
|
|
|
vector_backed_buffer::vector_backed_buffer(size_t size) : buffer_(size) {}
|
|
|
|
uint32_t vector_backed_buffer::Capacity() const {
|
|
return static_cast<uint32_t>(buffer_.size());
|
|
}
|
|
|
|
uint32_t vector_backed_buffer::Length() const {
|
|
throw winrt::hresult_error(E_NOTIMPL);
|
|
}
|
|
|
|
void vector_backed_buffer::Length(uint32_t /*value*/) {
|
|
throw winrt::hresult_error(E_NOTIMPL);
|
|
}
|
|
|
|
STDMETHODIMP vector_backed_buffer::Buffer(uint8_t** value) {
|
|
RETURN_HR_IF_NULL(E_POINTER, value);
|
|
*value = buffer_.data();
|
|
return S_OK;
|
|
}
|
|
|
|
} // namespace _winml
|