IsPrivateFormat

Function Usage

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 (that is, ge::Format).

NOTE:

For details about ge::Format, see "ge::Format" in Basic Data Structures and API Reference.

Returns

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

Constraints

None

Examples

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;
    }
}