* Copyright (c) 2025 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 GE_GRAPH_COMMON_OMG_UTIL_H_
#define GE_GRAPH_COMMON_OMG_UTIL_H_
#include <string>
#include <vector>
#include "framework/common/framework_types_internal.h"
#include "framework/common/util.h"
#include "graph/node.h"
namespace ge {
static constexpr int64_t kBufferPoolMemAlignSize = 512;
static constexpr uint32_t kBufferPoolNodeOutIndex = 0U;
static constexpr uint32_t kEventReuseThreshold = 65500U;
Status GetOriginalType(const ge::NodePtr &node, std::string &type);
Status SetStreamLabel(const ge::NodePtr &node, const std::string &label);
Status SetCycleEvent(const ge::NodePtr &node);
Status SetActiveLabelList(const ge::NodePtr &node, const std::vector<std::string> &active_label_list);
Status SetSwitchBranchNodeLabel(const ge::NodePtr &node, const std::string &branch_label);
Status SetSwitchTrueBranchFlag(const ge::NodePtr &node, const bool value);
Status SetOriginalNodeName(const ge::NodePtr &node, const std::string &orig_name);
Status SetCyclicDependenceFlag(const ge::NodePtr &node);
Status SetNextIteration(const NodePtr &node, const NodePtr &next_node);
void AlignMemSize(int64_t &mem_size, const int64_t align_size);
Status GetMemorySize(const NodePtr &node, int64_t &output_size);
void SetControlFlowGroup(const NodePtr &node, const int64_t group);
}
#endif