ByteStorage public API.
更多...
#include <OnnxByteStorage.h>
|
| | ByteStorage () |
| | Constructs a ByteStorage.
|
| |
| | ByteStorage (std::vector< uint8_t > v) |
| | Constructs a ByteStorage.
|
| |
| | ByteStorage (OnnxBuffer b) |
| | Constructs a ByteStorage.
|
| |
| void | retainAcrossRuns () |
| | Retain across runs.
|
| |
| const OnnxBuffer & | buffer () const |
| | Buffer.
|
| |
| size_t | size () const |
| | Returns the size of size.
|
| |
| bool | empty () const |
| | Empty.
|
| |
| const uint8_t * | data () const |
| | Borrow CPU data until this storage is mutated or destroyed; device-thread only for lazy data. @lifetime Borrowed until mutation or destruction; use the provider thread for GPU readback.
|
| |
| uint8_t * | data () |
| | Borrow mutable CPU data until mutation/destruction; detaches graph aliases before writing. @lifetime Borrowed until mutation or destruction; use the provider thread for GPU readback.
|
| |
| uint8_t | operator[] (size_t i) const |
| | Operator [].
|
| |
| uint8_t & | operator[] (size_t i) |
| | Operator [].
|
| |
| auto | begin () |
| | Begins begin.
|
| |
| auto | end () |
| | Ends end.
|
| |
| auto | begin () const |
| | Begins begin.
|
| |
| auto | end () const |
| | Ends end.
|
| |
| void | resize (size_t n) |
| | Resize.
|
| |
| template<class I > |
| void | assign (I a, I b) |
| | Copy borrowed iterators into owning CPU storage. @lifetime Input iterators are borrowed only for this call; all prior data pointers are invalidated.
|
| |
| | operator std::span< const uint8_t > () const |
| |
| | operator std::vector< uint8_t > () const |
| |
◆ ByteStorage() [1/3]
| eve::tensor::onnx_detail::ByteStorage::ByteStorage |
( |
| ) |
|
|
inline |
◆ ByteStorage() [2/3]
| eve::tensor::onnx_detail::ByteStorage::ByteStorage |
( |
std::vector< uint8_t > |
v | ) |
|
|
inline |
◆ ByteStorage() [3/3]
| eve::tensor::onnx_detail::ByteStorage::ByteStorage |
( |
OnnxBuffer |
b | ) |
|
|
inline |
◆ assign()
template<class I >
| void eve::tensor::onnx_detail::ByteStorage::assign |
( |
I |
a, |
|
|
I |
b |
|
) |
| |
|
inline |
Copy borrowed iterators into owning CPU storage. @lifetime Input iterators are borrowed only for this call; all prior data pointers are invalidated.
Assign.
在文件 OnnxByteStorage.h 第 79 行定义.
引用了 a , 以及 b.
◆ begin() [1/2]
| auto eve::tensor::onnx_detail::ByteStorage::begin |
( |
| ) |
|
|
inline |
◆ begin() [2/2]
| auto eve::tensor::onnx_detail::ByteStorage::begin |
( |
| ) |
const |
|
inline |
◆ buffer()
| const OnnxBuffer & eve::tensor::onnx_detail::ByteStorage::buffer |
( |
| ) |
const |
|
inline |
◆ data() [1/2]
| uint8_t * eve::tensor::onnx_detail::ByteStorage::data |
( |
| ) |
|
|
inline |
Borrow mutable CPU data until mutation/destruction; detaches graph aliases before writing. @lifetime Borrowed until mutation or destruction; use the provider thread for GPU readback.
- 异常
-
| std::runtime_error | On readback failure. Internal executor converts this to Result. |
在文件 OnnxByteStorage.h 第 56 行定义.
◆ data() [2/2]
| const uint8_t * eve::tensor::onnx_detail::ByteStorage::data |
( |
| ) |
const |
|
inline |
Borrow CPU data until this storage is mutated or destroyed; device-thread only for lazy data. @lifetime Borrowed until mutation or destruction; use the provider thread for GPU readback.
- 异常
-
| std::runtime_error | On readback failure. Internal executor converts this to Result. |
在文件 OnnxByteStorage.h 第 52 行定义.
◆ empty()
| bool eve::tensor::onnx_detail::ByteStorage::empty |
( |
| ) |
const |
|
inline |
◆ end() [1/2]
| auto eve::tensor::onnx_detail::ByteStorage::end |
( |
| ) |
|
|
inline |
◆ end() [2/2]
| auto eve::tensor::onnx_detail::ByteStorage::end |
( |
| ) |
const |
|
inline |
◆ operator std::span< const uint8_t >()
| eve::tensor::onnx_detail::ByteStorage::operator std::span< const uint8_t > |
( |
| ) |
const |
|
inline |
◆ operator std::vector< uint8_t >()
| eve::tensor::onnx_detail::ByteStorage::operator std::vector< uint8_t > |
( |
| ) |
const |
|
inline |
◆ operator[]() [1/2]
| uint8_t & eve::tensor::onnx_detail::ByteStorage::operator[] |
( |
size_t |
i | ) |
|
|
inline |
◆ operator[]() [2/2]
| uint8_t eve::tensor::onnx_detail::ByteStorage::operator[] |
( |
size_t |
i | ) |
const |
|
inline |
◆ resize()
| void eve::tensor::onnx_detail::ByteStorage::resize |
( |
size_t |
n | ) |
|
|
inline |
◆ retainAcrossRuns()
| void eve::tensor::onnx_detail::ByteStorage::retainAcrossRuns |
( |
| ) |
|
|
inline |
◆ size()
| size_t eve::tensor::onnx_detail::ByteStorage::size |
( |
| ) |
const |
|
inline |
该类的文档由以下文件生成: