GetPrimaryFormat

Function Usage

Obtains the root format, during which the C0 information is removed and only the format information is retained. For example, convert FORMAT_FRACTAL_Z_C04 to FORMAT_FRACTAL_Z.

Prototype

int32_t GetPrimaryFormat(int32_t format)

Format GetPrimaryFormat(Format format)

Parameters

Parameter

Input/Output

Description

format

Input

Format of the original data.

Returns

Format after the C0 information is removed.

Constraints

None

Example

1
2
3
4
5
6
// If the storage format of the input is fractal Z, a return statement is executed.
void Func(const aclTensor *input) {
    if (GetPrivateFormat(input->GetStorageFormat()) == FORMAT_FRACTAL_Z){
        return;
    }
}