---
title: atb/operation_infra.h
description: "```"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendtb/ascendtb_0085.html
sourcePath: /source/zh/canncommercial/900/API/ascendtb/ascendtb_0085.html
indexId: c399773c411e803e2831864d0e2657fbf0bc43438479142cdd8044af8c7fe24f61
---
# atb/operation_infra.h

#### 定义

```
class OperationInfra : public Operation {
public:
OperationInfra();
OperationInfra(const OperationInfra &other);
OperationInfra& operator = (const OperationInfra &other);
~
OperationInfra();
void SetExecuteStreamId(uint32_t streamId);
uint32_t GetExecuteStreamId() const;
aclrtStream GetExecuteStream(Context *context);
private:
std::unique_ptr<OperationImpl> impl_;
};
```


#### 参数列表

| 成员名称 | 参数 | 返回值 | 描述 |
| --- | --- | --- | --- |
| OperationInfra | \- | \- | 构造函数。 |
| OperationInfra | other | \- | 拷贝构造函数。 other：拷贝的对象。 |
| operator = | other | OperationInfra& | 赋值构造函数。 other：赋值的对象。 如果执行成功，返回对象本身。 |
| ~OperationInfra | \- | \- | 析构函数。 |
| SetExecuteStreamId | streamId | \- | 设置该Operation需要使用的stream的id，id为context中的stream序号，该接口需要配合GetExecuteStream接口使用。 streamId：需要设置的stream的id。 |
| GetExecuteStreamId | \- | uint32\_t | 获取当前Operation使用的stream的id。 如果执行成功，返回stream的id，id为context中的stream序号。 |
| GetExecuteStream | context | aclrtStream | 获取当前Operation使用的stream。 context：Operation使用的Context。 如果执行成功，返回当前Operation使用的stream。 |
