Compute Library
 22.08
CpuElementwiseBase Class Reference

#include <CpuElementwise.h>

Collaboration diagram for CpuElementwiseBase:
[legend]

Public Member Functions

void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Detailed Description

Definition at line 33 of file CpuElementwise.h.

Member Function Documentation

◆ run()

void run ( ITensorPack tensors)
overridevirtual

Run the kernels contained in the function.

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

Reimplemented from INEOperator.

Definition at line 33 of file CpuElementwise.cpp.

References arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, ITensorPack::get_const_tensor(), ITensor::info(), and INEOperator::run().

34 {
35  // If the kernel has been configured, use the window from the kernel.
36  if(_kernel->is_window_configured())
37  {
38  ICpuOperator::run(tensors);
39  return;
40  }
41 
42  auto src0_info = tensors.get_const_tensor(TensorType::ACL_SRC_0)->info();
43  auto src1_info = tensors.get_const_tensor(TensorType::ACL_SRC_1)->info();
44  auto shape_and_window = compute_output_shape_and_window(src0_info->tensor_shape(), src1_info->tensor_shape());
45  ICpuOperator::run(tensors, shape_and_window.second);
46 }
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Definition: INEOperator.cpp:40

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