onnxruntime/winml/lib/Api.Image/inc/DisjointBufferHelpers.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

20 lines
No EOL
471 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <gsl/gsl>
namespace _winml {
void LoadSpanFromDisjointBuffers(
size_t num_buffers,
std::function<gsl::span<byte>(size_t)> get_buffer,
gsl::span<byte>& buffer_span);
void StoreSpanIntoDisjointBuffers(
size_t num_buffers,
std::function<gsl::span<byte>(size_t)> get_buffer,
gsl::span<byte>& buffer_span);
} // namespace _winml