* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#ifndef RUNTIME_OM2_OM2_AIPP_UTILS_H_
#define RUNTIME_OM2_OM2_AIPP_UTILS_H_
#include <string>
#include <vector>
#include "common/dynamic_aipp.h"
#include "common/ge_common/ge_types.h"
#include "common/helper/om2/json_file.h"
#include "common/om2/om2_model_data.h"
namespace gert {
namespace om2 {
constexpr size_t kAippDimPartsNum = 6U;
constexpr size_t kAippDimNameIdx = 2U;
constexpr size_t kAippDimSizeIdx = 3U;
constexpr size_t kAippDimDimNumIdx = 4U;
constexpr size_t kAippDimShapeIdx = 5U;
constexpr int32_t kAippDecimalRadix = 10;
ge::Status ParseAippDimInfo(const std::string &info_str, ge::InputOutputDims &dims_info);
ge::AippConfigInfo ParseAippConfigFromJson(const ge::JsonFile &entry);
ge::OriginInputInfo ParseOriginInputFromJson(const ge::JsonFile &entry);
std::vector<ge::InputOutputDims> ParseAippDimsFromJson(const ge::JsonFile &entry, const char *key);
ge::Status ParseAippJson(const ge::JsonFile &aipp_json, std::vector<Om2AippMeta> &aipp_infos, bool &has_aipp);
}
}
#endif