载入中...
搜索中...
未找到
eve::tensor::onnx_detail::ByteStorage类 参考

ByteStorage public API. 更多...

#include <OnnxByteStorage.h>

Public 成员函数

 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 public API.

在文件 OnnxByteStorage.h 第 10 行定义.

构造及析构函数说明

◆ ByteStorage() [1/3]

eve::tensor::onnx_detail::ByteStorage::ByteStorage ( )
inline

Constructs a ByteStorage.

在文件 OnnxByteStorage.h 第 34 行定义.

◆ ByteStorage() [2/3]

eve::tensor::onnx_detail::ByteStorage::ByteStorage ( std::vector< uint8_t >  v)
inline

Constructs a ByteStorage.

在文件 OnnxByteStorage.h 第 36 行定义.

◆ ByteStorage() [3/3]

eve::tensor::onnx_detail::ByteStorage::ByteStorage ( OnnxBuffer  b)
inline

Constructs a ByteStorage.

在文件 OnnxByteStorage.h 第 40 行定义.

成员函数说明

◆ 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

Begins begin.

在文件 OnnxByteStorage.h 第 62 行定义.

◆ begin() [2/2]

auto eve::tensor::onnx_detail::ByteStorage::begin ( ) const
inline

Begins begin.

在文件 OnnxByteStorage.h 第 66 行定义.

◆ buffer()

const OnnxBuffer & eve::tensor::onnx_detail::ByteStorage::buffer ( ) const
inline

Buffer.

在文件 OnnxByteStorage.h 第 44 行定义.

被这些函数引用 eve::tensor::onnx_detail::executeQuant().

◆ 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_errorOn 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_errorOn readback failure. Internal executor converts this to Result.

在文件 OnnxByteStorage.h 第 52 行定义.

◆ empty()

bool eve::tensor::onnx_detail::ByteStorage::empty ( ) const
inline

Empty.

在文件 OnnxByteStorage.h 第 48 行定义.

引用了 size.

◆ end() [1/2]

auto eve::tensor::onnx_detail::ByteStorage::end ( )
inline

Ends end.

在文件 OnnxByteStorage.h 第 64 行定义.

◆ end() [2/2]

auto eve::tensor::onnx_detail::ByteStorage::end ( ) const
inline

Ends end.

在文件 OnnxByteStorage.h 第 68 行定义.

◆ operator std::span< const uint8_t >()

eve::tensor::onnx_detail::ByteStorage::operator std::span< const uint8_t > ( ) const
inline

在文件 OnnxByteStorage.h 第 82 行定义.

◆ operator std::vector< uint8_t >()

eve::tensor::onnx_detail::ByteStorage::operator std::vector< uint8_t > ( ) const
inline

在文件 OnnxByteStorage.h 第 83 行定义.

◆ operator[]() [1/2]

uint8_t & eve::tensor::onnx_detail::ByteStorage::operator[] ( size_t  i)
inline

Operator [].

在文件 OnnxByteStorage.h 第 60 行定义.

◆ operator[]() [2/2]

uint8_t eve::tensor::onnx_detail::ByteStorage::operator[] ( size_t  i) const
inline

Operator [].

在文件 OnnxByteStorage.h 第 58 行定义.

◆ resize()

void eve::tensor::onnx_detail::ByteStorage::resize ( size_t  n)
inline

Resize.

在文件 OnnxByteStorage.h 第 70 行定义.

引用了 n , 以及 v.

◆ retainAcrossRuns()

void eve::tensor::onnx_detail::ByteStorage::retainAcrossRuns ( )
inline

Retain across runs.

在文件 OnnxByteStorage.h 第 42 行定义.

◆ size()

size_t eve::tensor::onnx_detail::ByteStorage::size ( ) const
inline

Returns the size of size.

在文件 OnnxByteStorage.h 第 46 行定义.


该类的文档由以下文件生成: