onnxruntime/winml/lib/Api.Image/inc/DisjointBufferHelpers.h
Sheil Kumar 671fa60327
Enable direct tensorization and detensorization to many buffers in WinML (#5791)
* switch to work PC

* back with iterable of buffers

* add raw api tests

* tensorization

* last test

* all tests pass!

* small cleanup

* whitespace

* newline

* whitespace

* refactor common code into DisjointBufferHelpers

* remove unused file

* warning

* skip gpu tests when hardware not available

* Add error condition when createreference is invoked

* add null check to cretereference

* uncomment out check

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-11-16 10:06:22 -08:00

16 lines
No EOL
349 B
C++

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