SHL 2.2.x
|
Functions | |
int | csinn_tensor_size (struct csinn_tensor *tensor) |
Get the number of elements in the tensor. More... | |
int | csinn_tensor_byte_size (struct csinn_tensor *tensor) |
Get the number of bytes of elements in the tensor. More... | |
struct csinn_tensor * | csinn_alloc_tensor (struct csinn_session *session) |
Allocate a tensor structure. More... | |
void | csinn_realloc_quant_info (struct csinn_tensor *tensor, int quant_info_num) |
Reallocate a specified amount of quantitative information. More... | |
void | csinn_tensor_copy (struct csinn_tensor *dest, struct csinn_tensor *src) |
Copying tensor, excluding data in tensor. More... | |
void | csinn_free_tensor (struct csinn_tensor *tensor) |
Release a tensor structure. More... | |
int | csinn_tensor_layout_convert (struct csinn_tensor *dest, struct csinn_tensor *src) |
Convert the layout of source and target tensor. More... | |
int | csinn_tensor_data_convert (struct csinn_tensor *dest, struct csinn_tensor *src) |
Numerical conversion according to the data type of source and target tensor. More... | |
int csinn_tensor_size | ( | struct csinn_tensor * | tensor | ) |
Get the number of elements in the tensor.
[in] | tensor | The tensor to be counted |
int csinn_tensor_byte_size | ( | struct csinn_tensor * | tensor | ) |
Get the number of bytes of elements in the tensor.
[in] | tensor | The tensor to be counted |
struct csinn_tensor * csinn_alloc_tensor | ( | struct csinn_session * | session | ) |
Allocate a tensor structure.
[in] | session | Reference session. If no reference is required, NULL can be passed in |
csinn_tensor*
void csinn_realloc_quant_info | ( | struct csinn_tensor * | tensor, |
int | quant_info_num | ||
) |
Reallocate a specified amount of quantitative information.
[in,out] | tensor | The tensor to be operated |
[in] | quant_info_num | Number of quantitative information |
void csinn_tensor_copy | ( | struct csinn_tensor * | dest, |
struct csinn_tensor * | src | ||
) |
Copying tensor, excluding data in tensor.
[out] | dest | Target tensor |
[in] | src | Source tensor |
void csinn_free_tensor | ( | struct csinn_tensor * | tensor | ) |
Release a tensor structure.
[in] | tensor | The tensor to be released |
int csinn_tensor_layout_convert | ( | struct csinn_tensor * | dest, |
struct csinn_tensor * | src | ||
) |
Convert the layout of source and target tensor.
[out] | dest | Target tensor |
[in] | src | Source tensor |
int csinn_tensor_data_convert | ( | struct csinn_tensor * | dest, |
struct csinn_tensor * | src | ||
) |
Numerical conversion according to the data type of source and target tensor.
[out] | dest | Target tensor |
[in] | src | Source tensor |