atb/operation_infra.h
功能
定义ATB的OperationInfra类。该接口类定义了加速库插件算子的基类,基类提供了一些内置公共接口供用户编写自己的插件算子。
定义
class OperationInfra : public Operation {
public:
    OperationInfra();
    OperationInfra(const OperationInfra &other);
    OperationInfra& operator = (const OperationInfra &other);
    ~OperationInfra() override;
    void SetExecuteStreamId(uint32_t streamId);
    uint32_t GetExecuteStreamId() const;
    aclrtStream GetExecuteStream(Context *context);
private:
    std::unique_ptr<OperationImpl> impl_;
};
参数列表
成员名称  | 
参数  | 
返回值  | 
描述  | 
|---|---|---|---|
OperationInfra  | 
-  | 
-  | 
构造函数。  | 
OperationInfra  | 
other  | 
-  | 
拷贝构造函数。 
  | 
operator =  | 
other  | 
OperationInfra&  | 
赋值构造函数。 
 如果执行成功,返回对象本身。  | 
~OperationInfra  | 
-  | 
-  | 
析构函数。  | 
SetExecuteStreamId  | 
streamId  | 
-  | 
设置该Operation需要使用的stream的id,id为context中的stream序号,该接口需要配合GetExecuteStream接口使用。 
  | 
GetExecuteStreamId  | 
-  | 
uint32_t  | 
获取当前Operation使用的stream的id。 如果执行成功,返回stream的id,id为context中的stream序号。  | 
GetExecuteStream  | 
context  | 
aclrtStream  | 
获取当前Operation使用的stream。 
 如果执行成功,返回当前Operation使用的stream。  |