Constructor
Description
Creates a dimension expansion rule.
Prototype
- In the constructed instance, the dimension expansion rule (mask_) and the expanded dimension (size_) are both 0.
ExpandDimsType() : size_(0U), mask_(0U)
- Creates a dimension expansion rule using a string.
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
expand_dims_type |
Input |
Dimension expansion rule described by a character 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
Restrictions
None
Example
ExpandDimsType type("1001"); // Set mask_ to 1001 and size_ to 4.