Class Type
Defined in File type.h
Inheritance Relationships
Base Type
public mindspore::api::Value
(Class Value)
Derived Type
public mindspore::api::TensorType
(Class TensorType)
Class Documentation
-
class Type : public mindspore::api::Value
Type defines the type of a value.
Subclassed by mindspore::api::TensorType
Public Functions
-
TypeId type_id() const
Get the id of the Type object.
- Returns
The id of the Type object.
-
TypeId number_type() const
Get the number type of the Type object.
- Returns
The number type of this Type object, kTypeUnknown if this is not a number type.
Public Static Functions
-
static TypePtr GetType(TypeId id)
Get the Type according to a TypeId.
- Parameters
id – [in] The id of the type.
- Returns
The pointer to the Type.
-
static size_t GetSize(TypeId id)
Get data size in bytes for the type according to a TypeId.
- Parameters
id – [in] The id of the type.
- Returns
The data size in bytes for the Type.
-
TypeId type_id() const