---
title: GraphPp构造函数和析构函数
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/dfrefc_23_0047.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/dfrefc_23_0047.html
indexId: 417ce89ebe5d8bf27ff6f65d74c3f2bd71cc9fec148723223171cfae9d24ec7369
---
# GraphPp构造函数和析构函数

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

GraphPp构造函数和析构函数，构造函数会返回一个GraphPp对象。


#### 函数原型

```
GraphPp(const char_t *pp_name, const GraphBuilder &builder)
~GraphPp() override
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| pp\_name | 输入 | GraphPp的名称，需要全图唯一。 |
| builder | 输入 | GE Graph的构建方法：std::function<ge::Graph()> GE Graph的构建具体请参考《图开发(https://www.hiascend.com/document/detail/zh/canncommercial/900/programug/graphdevg/atlasag\_25\_0081.html)》。 |


#### 返回值

返回一个GraphPp对象。


#### 异常处理

无。


#### 约束说明

无。
