Compute Library
 22.02
IOperator Class Reference

Base class specifying the operator interface. More...

#include <IOperator.h>

Collaboration diagram for IOperator:
[legend]

Public Member Functions

 IOperator (IContext *ctx)
 Explict Operator Constructor. More...
 
virtual ~IOperator ()
 Destructor. More...
 
bool is_valid () const
 Checks if an operator is valid. More...
 
virtual StatusCode run (IQueue &queue, ITensorPack &tensors)
 Run the kernels contained in the function. More...
 
virtual StatusCode run (ITensorPack &tensors)
 Run the kernels contained in the function. More...
 
virtual StatusCode prepare (ITensorPack &tensors)
 Prepare the operator for execution. More...
 
virtual MemoryRequirements workspace () const
 Return the memory requirements required by the workspace. More...
 
void set_internal_operator (std::unique_ptr< experimental::IOperator > op)
 

Additional Inherited Members

- Data Fields inherited from AclOperator_
arm_compute::detail::Header header { arm_compute::detail::ObjectType::Operator, nullptr }
 

Detailed Description

Base class specifying the operator interface.

Definition at line 58 of file IOperator.h.

Constructor & Destructor Documentation

◆ IOperator()

IOperator ( IContext ctx)
explicit

Explict Operator Constructor.

Parameters
[in]ctxContext to be used by the operator

◆ ~IOperator()

virtual ~IOperator ( )
virtual

Destructor.

Member Function Documentation

◆ is_valid()

bool is_valid ( ) const

Checks if an operator is valid.

Returns
True if successful otherwise false

◆ prepare()

virtual StatusCode prepare ( ITensorPack tensors)
virtual

Prepare the operator for execution.

Any one off pre-processing step required by the function is handled here

Parameters
[in]tensorsVector that contains the preparation tensors.
Note
Prepare stage might not need all the function's buffers' backing memory to be available in order to execute

◆ run() [1/2]

virtual StatusCode run ( IQueue queue,
ITensorPack tensors 
)
virtual

Run the kernels contained in the function.

Parameters
[in]queueQueue to use
[in]tensorsVector that contains the tensors to operate on

◆ run() [2/2]

virtual StatusCode run ( ITensorPack tensors)
virtual

Run the kernels contained in the function.

Parameters
[in]tensorsVector that contains the tensors to operate on

◆ set_internal_operator()

void set_internal_operator ( std::unique_ptr< experimental::IOperator op)
inline

Definition at line 97 of file IOperator.h.

98  {
99  _op = std::move(op);
100  }

◆ workspace()

virtual MemoryRequirements workspace ( ) const
virtual

Return the memory requirements required by the workspace.


The documentation for this class was generated from the following file: