17#ifndef __CIRCLE_EVAL_DIFF_TENSOR_H__
18#define __CIRCLE_EVAL_DIFF_TENSOR_H__
41 uint32_t
rank(
void)
const {
return _dims.size(); }
42 void rank(uint32_t value) { _dims.resize(value); }
47 void shape(std::initializer_list<uint32_t> dims)
59 std::vector<loco::Dimension> _dims;
69 template <loco::DataType DT> uint32_t
size(
void)
const;
70 template <loco::DataType DT>
void size(uint32_t
size);
73 uint8_t *
buffer(
void) {
return _data.data(); }
74 uint32_t
byte_size(
void)
const {
return _data.size(); }
77 std::vector<uint8_t> _data;
The value of one dimension in a tensor shape.
std::shared_ptr< Tensor > createEmptyTensor(const luci::CircleNode *node)
DataType
"scalar" value type
void dtype(const loco::DataType &dtype)
const loco::DataType & dtype(void) const
const loco::DataTypeImpl< DT >::Type & at(uint32_t n) const
uint32_t size(void) const
uint32_t byte_size(void) const
void shape(std::initializer_list< uint32_t > dims)
loco::Dimension & dim(uint32_t axis)
const loco::Dimension & dim(uint32_t axis) const
uint32_t rank(void) const
void rank(uint32_t value)
C++ scalar type corresponding to each DataType.