Compute Library
 21.05
CLLogicalAnd Class Reference

#include <CLLogicalAnd.h>

Collaboration diagram for CLLogicalAnd:
[legend]

Public Member Functions

 CLLogicalAnd ()=default
 Default Constructor. More...
 
void configure (const CLCompileContext &compile_context, ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output)
 Initialise the kernel's inputs, output and conversion policy. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from ICLOperator
 ICLOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLOperator (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLOperator (ICLOperator &&)=default
 Default move constructor. More...
 
ICLOperatoroperator= (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLOperatoroperator= (ICLOperator &&)=default
 Default move assignment operator. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. 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...
 

Static Public Member Functions

static Status validate (const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output)
 Static function to check if given info will lead to a valid configuration of arm_compute::opencl::kernels::ClLogicalBinaryKernel. More...
 

Detailed Description

Definition at line 39 of file CLLogicalAnd.h.

Constructor & Destructor Documentation

◆ CLLogicalAnd()

CLLogicalAnd ( )
default

Default Constructor.

Member Function Documentation

◆ configure()

void configure ( const CLCompileContext compile_context,
ITensorInfo input1,
ITensorInfo input2,
ITensorInfo output 
)

Initialise the kernel's inputs, output and conversion policy.

Parameters
[in]compile_contextThe compile context to be used.
[in,out]input1First tensor input. Data types supported: U8. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[in,out]input2Second tensor input. Data types supported: same as input1. The input tensor is [in, out] because its TensorInfo might be modified inside the kernel in case of broadcasting of dimension 0.
[out]outputOutput tensor. Data types supported: same as input1.

Definition at line 34 of file CLLogicalAnd.cpp.

35 {
36  auto k = std::make_unique<arm_compute::opencl::kernels::ClLogicalBinaryKernel>();
37  k->configure(compile_context, LogicalOperation::And, input1, input2, output);
38  _kernel = std::move(k);
39 }

References arm_compute::And.

◆ run()

void run ( ITensorPack tensors)
overridevirtual

Run the kernels contained in the function.

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

Implements IOperator.

Definition at line 46 of file CLLogicalAnd.cpp.

47 {
48  ICLOperator::run(tensors);
49 }
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Definition: CLOperator.cpp:38

References ICLOperator::run().

◆ validate()

Status validate ( const ITensorInfo input1,
const ITensorInfo input2,
const ITensorInfo output 
)
static

Static function to check if given info will lead to a valid configuration of arm_compute::opencl::kernels::ClLogicalBinaryKernel.

Parameters
[in]input1First tensor input info. Data types supported: U8.
[in]input2Second tensor input info. Data types supported: same as input1.
[in]outputOutput tensor info. Data types supported: same as input1.
Returns
a status

Definition at line 41 of file CLLogicalAnd.cpp.

42 {
44 }
static Status validate(LogicalOperation op, const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst)
Static function to check if the given configuration is valid for this kernel.

References arm_compute::And, and ClLogicalBinaryKernel::validate().

Referenced by CLLogicalAnd::validate().


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