atb/operation_infra.h
Description
Defines the OperationInfra class of the ATB. This API class defines the base class of the plugin operators of the ATB. The base class provides some built-in public APIs for users to compile their own plugin operators.
Definition
1 2 3 4 5 6 7 8 9 10 11 12 | 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_; }; |
Parameters
Member |
Parameter |
Return Value |
Description |
|---|---|---|---|
OperationInfra |
- |
- |
Constructor. |
OperationInfra |
other |
- |
Copy constructor.
|
operator = |
other |
OperationInfra& |
Assignment constructor.
Successful execution returns the object itself. |
~OperationInfra |
- |
- |
Destructor. |
SetExecuteStreamId |
streamId |
- |
Used to set the ID of the stream used by the operation. The ID is the stream sequence number in the context. This API must be used together with the GetExecuteStream API.
|
GetExecuteStreamId |
- |
uint32_t |
Used to obtain the ID of the stream used by the current operation. Successful execution returns the ID of the stream. The ID is the stream sequence number in the context. |
GetExecuteStream |
context |
aclrtStream |
Used to obtain the stream used by the current operation.
Successful execution returns the stream used by the current operation. |