FormatToAscendString
Function Usage
Converts a value of the Format type into a string.
To use this API, the type_utils.h header file must be included.
1 | #include "graph/utils/type_utils.h" |
Prototype
1 | static AscendString FormatToAscendString(const Format &format) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
format |
Input |
Format to be converted. For details about the supported formats, see Format. |
Returns
Format string after conversion, which is of the AscendString type.
Constraints
None
Examples
1 2 3 | ge::Format format = ge::Format::FORMAT_NHWC; auto format_str = ge::TypeUtils::FormatToAscendString(format); const char *ptr = format_str.GetString(); |
Parent topic: TypeUtils