onnxruntime/winml/lib/Api/impl/IData.h
Sheil Kumar 84c1340f9b
Refactor implementation of Tensor<T> and underlying buffer stores to improve binary size and maintainability (#5836)
* refactor tensor buffers to make cleaner

* refactor to make tensor backing buffer implementation smaller and cleaner

* missed virtual on destructor

* remove unnecessary static_pointer_cast

* add string vector accessor

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-11-18 14:56:47 -08:00

25 lines
No EOL
683 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "IEngine.h"
// ILotusValueProviderPrivate exposes a private Lotus interface to the engine so that it can retrieve tensor
// resources stored in winrt structures.
namespace _winml {
struct idata {
virtual ~idata(){}
virtual size_t num_elements() = 0;
virtual size_t size_in_bytes() = 0;
virtual size_t num_buffers() = 0;
virtual std::vector<wss::IBuffer>& buffers() = 0;
virtual gsl::span<byte> buffer(bool should_sync_buffer) = 0;
virtual bool flush() = 0;
virtual void set(size_t data_size, const byte* data) = 0;
};
} // namespace _winml