onnxruntime/winml/lib/Api/VectorBackedBuffer.h
Justin Chu eeef157888
Format c++ code under winml/ (#16660)
winml/ was previously excluded from lintrunner config. This change
includes the directory and adds the clang-format config file specific to
winml/ that fits existing style.

---------

Signed-off-by: Justin Chu <justinchu@microsoft.com>
2023-07-25 21:56:50 -07:00

26 lines
584 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "robuffer.h"
#include "winrt/Windows.Storage.Streams.h"
namespace _winml {
class vector_backed_buffer
: public winrt::implements<vector_backed_buffer, wss::IBuffer, Windows::Storage::Streams::IBufferByteAccess> {
public:
vector_backed_buffer(size_t size);
uint32_t Capacity() const;
uint32_t Length() const;
void Length(uint32_t /*value*/);
STDMETHOD(Buffer)(uint8_t** value);
private:
std::vector<BYTE> buffer_;
};
} // namespace _winml