|
template<typename T > |
T * | ptr () const |
|
void * | ptr () const |
|
int64_t | size (int index) const |
|
size_t | bytes () const |
|
bool | empty () const |
|
DataType | dtype () const |
|
bool | device () const |
|
void | reference (void *data, std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
void | to_device_ (void *stream=nullptr) |
|
void | to_host_ (void *stream=nullptr) |
|
Tensor | to_device (void *stream=nullptr) const |
|
Tensor | to_host (void *stream=nullptr) const |
|
Tensor | to_float (void *stream=nullptr) const |
|
Tensor | to_half (void *stream=nullptr) const |
|
void | create_ (std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
bool | save (const std::string &file, void *stream=nullptr) const |
|
void | print (const char *prefix="Tensor", size_t offset=0, size_t num_per_line=10, size_t lines=1) const |
|
void | memset (unsigned char value=0, void *stream=nullptr) |
|
void | arange (void *stream=nullptr) |
|
void | release () |
|
void | self_byte_check (size_t type_bytes) const |
|
Tensor | clone (void *stream) const |
|
void | copy_from_host (const void *data, void *stream) |
|
void | copy_from_device (const void *data, void *stream) |
|
unsigned int | offset (unsigned int idim) const |
|
| Tensor ()=default |
|
| Tensor (std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
|
static Tensor | create (std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
static Tensor | from_data_reference (void *data, std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
static Tensor | from_data (void *data, std::vector< int64_t > shape, DataType dtype, bool device=true, void *stream=nullptr) |
|
static Tensor | load (const std::string &file, bool device=true, void *stream=nullptr) |
|
static Tensor | loadbinary (const std::string &file, std::vector< int64_t > shape, DataType dtype, bool device=true) |
|
static bool | save (const Tensor &tensor, const std::string &file, void *stream=nullptr) |
|
◆ Tensor() [1/2]
ds3d::v2xinfer::Tensor::Tensor |
( |
| ) |
|
|
default |
◆ Tensor() [2/2]
ds3d::v2xinfer::Tensor::Tensor |
( |
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
◆ arange()
void ds3d::v2xinfer::Tensor::arange |
( |
void * |
stream = nullptr | ) |
|
◆ bytes()
size_t ds3d::v2xinfer::Tensor::bytes |
( |
| ) |
const |
|
inline |
◆ clone()
Tensor ds3d::v2xinfer::Tensor::clone |
( |
void * |
stream | ) |
const |
◆ copy_from_device()
void ds3d::v2xinfer::Tensor::copy_from_device |
( |
const void * |
data, |
|
|
void * |
stream |
|
) |
| |
◆ copy_from_host()
void ds3d::v2xinfer::Tensor::copy_from_host |
( |
const void * |
data, |
|
|
void * |
stream |
|
) |
| |
◆ create()
static Tensor ds3d::v2xinfer::Tensor::create |
( |
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
|
static |
◆ create_()
void ds3d::v2xinfer::Tensor::create_ |
( |
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
◆ device()
bool ds3d::v2xinfer::Tensor::device |
( |
| ) |
const |
|
inline |
◆ dtype()
DataType ds3d::v2xinfer::Tensor::dtype |
( |
| ) |
const |
|
inline |
◆ empty()
bool ds3d::v2xinfer::Tensor::empty |
( |
| ) |
const |
|
inline |
◆ from_data()
static Tensor ds3d::v2xinfer::Tensor::from_data |
( |
void * |
data, |
|
|
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true , |
|
|
void * |
stream = nullptr |
|
) |
| |
|
static |
◆ from_data_reference()
static Tensor ds3d::v2xinfer::Tensor::from_data_reference |
( |
void * |
data, |
|
|
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
|
static |
◆ load()
static Tensor ds3d::v2xinfer::Tensor::load |
( |
const std::string & |
file, |
|
|
bool |
device = true , |
|
|
void * |
stream = nullptr |
|
) |
| |
|
static |
◆ loadbinary()
static Tensor ds3d::v2xinfer::Tensor::loadbinary |
( |
const std::string & |
file, |
|
|
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
|
static |
◆ memset()
void ds3d::v2xinfer::Tensor::memset |
( |
unsigned char |
value = 0 , |
|
|
void * |
stream = nullptr |
|
) |
| |
◆ offset()
unsigned int ds3d::v2xinfer::Tensor::offset |
( |
unsigned int |
idim | ) |
const |
◆ print()
void ds3d::v2xinfer::Tensor::print |
( |
const char * |
prefix = "Tensor" , |
|
|
size_t |
offset = 0 , |
|
|
size_t |
num_per_line = 10 , |
|
|
size_t |
lines = 1 |
|
) |
| const |
◆ ptr() [1/2]
template<typename T >
T* ds3d::v2xinfer::Tensor::ptr |
( |
| ) |
const |
|
inline |
◆ ptr() [2/2]
void* ds3d::v2xinfer::Tensor::ptr |
( |
| ) |
const |
|
inline |
◆ reference()
void ds3d::v2xinfer::Tensor::reference |
( |
void * |
data, |
|
|
std::vector< int64_t > |
shape, |
|
|
DataType |
dtype, |
|
|
bool |
device = true |
|
) |
| |
◆ release()
void ds3d::v2xinfer::Tensor::release |
( |
| ) |
|
◆ save() [1/2]
bool ds3d::v2xinfer::Tensor::save |
( |
const std::string & |
file, |
|
|
void * |
stream = nullptr |
|
) |
| const |
◆ save() [2/2]
static bool ds3d::v2xinfer::Tensor::save |
( |
const Tensor & |
tensor, |
|
|
const std::string & |
file, |
|
|
void * |
stream = nullptr |
|
) |
| |
|
static |
◆ self_byte_check()
void ds3d::v2xinfer::Tensor::self_byte_check |
( |
size_t |
type_bytes | ) |
const |
◆ size()
int64_t ds3d::v2xinfer::Tensor::size |
( |
int |
index | ) |
const |
|
inline |
◆ to_device()
Tensor ds3d::v2xinfer::Tensor::to_device |
( |
void * |
stream = nullptr | ) |
const |
◆ to_device_()
void ds3d::v2xinfer::Tensor::to_device_ |
( |
void * |
stream = nullptr | ) |
|
◆ to_float()
Tensor ds3d::v2xinfer::Tensor::to_float |
( |
void * |
stream = nullptr | ) |
const |
◆ to_half()
Tensor ds3d::v2xinfer::Tensor::to_half |
( |
void * |
stream = nullptr | ) |
const |
◆ to_host()
Tensor ds3d::v2xinfer::Tensor::to_host |
( |
void * |
stream = nullptr | ) |
const |
◆ to_host_()
void ds3d::v2xinfer::Tensor::to_host_ |
( |
void * |
stream = nullptr | ) |
|
◆ data
std::shared_ptr<TensorData> ds3d::v2xinfer::Tensor::data |
◆ ndim
size_t ds3d::v2xinfer::Tensor::ndim = 0 |
◆ numel
size_t ds3d::v2xinfer::Tensor::numel = 0 |
◆ shape
std::vector<int64_t> ds3d::v2xinfer::Tensor::shape |
The documentation for this struct was generated from the following file: