Constructor
Function Usage
Creates a dimension expansion rule.
Prototype
- In the constructed instance, the dimension expansion rule (mask_) and the expanded dimension (size_) are both 0.
1ExpandDimsType() : size_(0U), mask_(0U)
- Creates a dimension expansion rule using a string.
1explicit ExpandDimsType(const ge::char_t *const expand_dims_type)
- Creates a dimension expansion rule based on the int64_t bit field definition.
1explicit ExpandDimsType(const int64_t reshape_type_mask)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
expand_dims_type |
Input |
Dimension expansion rule described by a string. The maximum length of the string is 56 bytes. |
reshape_type_mask |
Input |
Dimension expansion rule of the int64_t type. The value contains 64 bits. For details about the bit field definition of int, see int64_t bit field definition. For simplicity, the sequence of the dimension expansion rule is opposite to that of the string. For example, if the dimension expansion rule described by the string is "1100", the corresponding dimension expansion rule is "0011". When converted to a number, it represents the binary '0011', which is 3 in decimal. For details about concepts and description methods of dimension expansion rules, see Overview. |
Returns
An ExpandDimsType object
Constraints
None
Examples
1 | ExpandDimsType type("1001"); // Set mask_ to 1001 and size_ to 4. |