IsPrivateFormat

Description

Checks whether the input format is a private format.

Prototype

bool IsPrivateFormat(Format format)

Parameters

Parameter

Input/Output

Description

format

Input

Data format to be checked. The data type is op::Format (ge::Format).

For details about ge::Format, see ge::Format in Basic Data Structures and APIs.

Returns

If format is a private format, true is returned. Otherwise, false is returned.

Constraints

None.

Example

1
2
3
4
5
6
// Check whether the storage format of the input is private. If yes, a return statement is executed.
void Func(const aclTensor *input) {
    if (IsPrivateFormat(input->GetStorageFormat())) {
        return;
    }
}