Compute Library
 22.11
CLSynthetizeOperator< K > Class Template Reference

This template synthetizes a simple IOperator which runs the given kernel K. More...

#include <Helper.h>

Collaboration diagram for CLSynthetizeOperator< K >:
[legend]

Public Member Functions

template<typename... Args>
void configure (Args &&... args)
 Configure the kernel. More...
 
template<typename... Args>
void configure (GPUTarget gpu_target, Args &&... args)
 Configure the kernel setting the GPU target as well. 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

template<typename... Args>
static Status validate (Args &&... args)
 Validate input arguments. More...
 

Detailed Description

template<typename K>
class arm_compute::test::CLSynthetizeOperator< K >

This template synthetizes a simple IOperator which runs the given kernel K.

Definition at line 46 of file Helper.h.

Member Function Documentation

◆ configure() [1/2]

void configure ( Args &&...  args)
inline

Configure the kernel.

Parameters
[in]argsConfiguration arguments.

Definition at line 54 of file Helper.h.

55  {
56  auto k = std::make_unique<K>();
57  k->configure(CLKernelLibrary::get().get_compile_context(), std::forward<Args>(args)...);
58  _kernel = std::move(k);
59  }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.

◆ configure() [2/2]

void configure ( GPUTarget  gpu_target,
Args &&...  args 
)
inline

Configure the kernel setting the GPU target as well.

Parameters
[in]gpu_targetGPUTarget to set
[in]argsConfiguration arguments.

Definition at line 66 of file Helper.h.

67  {
68  auto k = std::make_unique<K>();
69  k->set_target(gpu_target);
70  k->configure(CLKernelLibrary::get().get_compile_context(), std::forward<Args>(args)...);
71  _kernel = std::move(k);
72  }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.

◆ validate()

static Status validate ( Args &&...  args)
inlinestatic

Validate input arguments.

Parameters
[in]argsConfiguration arguments.

Definition at line 78 of file Helper.h.

79  {
80  return K::validate(std::forward<Args>(args)...);
81  }
Status validate(const OperatorGraph &op_graph)
Return the validity of op_graph, usually after performing an operation (e.g.

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