Refine Tensor::SetShape api to avoid compile warning using const ref (#640)
* Move int4/uint4 to the end of DataType * Refine api Tensor::SetShape, using const ref avoid compile warning
This commit is contained in:
parent
6f34b66ae4
commit
7fc264a9e6
|
|
@ -35,7 +35,7 @@ struct TensorSpec {
|
|||
|
||||
TensorSpec& SetDataType(DataType datatype);
|
||||
|
||||
TensorSpec& SetShape(ShapeType& shape);
|
||||
TensorSpec& SetShape(const ShapeType& shape);
|
||||
|
||||
TensorSpec& SetAttribute(TensorAttribute attr);
|
||||
...
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ struct TensorSpec {
|
|||
|
||||
TensorSpec& SetDataType(DataType datatype);
|
||||
|
||||
TensorSpec& SetShape(ShapeType& shape);
|
||||
TensorSpec& SetShape(const ShapeType& shape);
|
||||
|
||||
TensorSpec& SetAttribute(TensorAttribute attr);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ namespace vx {
|
|||
|
||||
enum class DataType {
|
||||
UNKNOWN,
|
||||
INT4,
|
||||
UINT4,
|
||||
INT8,
|
||||
UINT8,
|
||||
INT16,
|
||||
|
|
@ -40,7 +38,9 @@ enum class DataType {
|
|||
INT64,
|
||||
FLOAT16,
|
||||
FLOAT32,
|
||||
BOOL8
|
||||
BOOL8,
|
||||
INT4,
|
||||
UINT4
|
||||
};
|
||||
|
||||
enum class QuantType { NONE, ASYMMETRIC, SYMMETRIC_PER_CHANNEL, DYNAMIC_FIXED_POINT };
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ TensorSpec& TensorSpec::SetDataType(DataType datatype) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
TensorSpec& TensorSpec::SetShape(ShapeType& shape) {
|
||||
TensorSpec& TensorSpec::SetShape(const ShapeType& shape) {
|
||||
this->shape_ = shape;
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue