Compute Library
 22.11
CLSynthetizeOperatorInitOutputWithZeroAndWithZeroConstantBorder< K, bordersize > Class Template Reference

As above but this also initializes to zero the input tensor. More...

#include <Helper.h>

Collaboration diagram for CLSynthetizeOperatorInitOutputWithZeroAndWithZeroConstantBorder< K, bordersize >:
[legend]

Public Member Functions

template<typename T , typename... Args>
void configure (T first, T second, Args &&... args)
 Configure the kernel. More...
 
void run (ITensorPack &tensors) override final
 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 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

template<typename K, int bordersize>
class arm_compute::test::CLSynthetizeOperatorInitOutputWithZeroAndWithZeroConstantBorder< K, bordersize >

As above but this also initializes to zero the input tensor.

Definition at line 86 of file Helper.h.

Member Function Documentation

◆ configure()

void configure ( first,
second,
Args &&...  args 
)
inline

Configure the kernel.

Parameters
[in]firstFirst input argument.
[in]secondSecond input argument.
[in]argsRest of the configuration arguments.

Definition at line 96 of file Helper.h.

References GemmTuner::args, arm_compute::CONSTANT, CLKernelLibrary::get(), CLScheduler::get(), CLKernelLibrary::get_compile_context(), and arm_compute::test::validation::k.

97  {
99  auto k = std::make_unique<K>();
100  k->set_target(CLScheduler::get().target());
101  k->configure(cctx, first, second, std::forward<Args>(args)...);
102  _kernel = std::move(k);
103  _border_handler.configure(cctx, first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue());
104  _fill.configure(cctx, second, PixelValue());
105  }
void configure(const CLCompileContext &compile_context, ICLTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value=PixelValue())
Initialise the kernel&#39;s input, output and border mode.
static CLScheduler & get()
Access the scheduler singleton.
void configure(const CLCompileContext &compile_context, ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
Initialise the kernel&#39;s tensor and filling value.
Definition: ClFill.cpp:35
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
CLCompileContext & get_compile_context()
Gets the compile context used.

◆ run()

void run ( ITensorPack tensors)
inlinefinaloverridevirtual

Run the kernels contained in the function.

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

Reimplemented from ICLOperator.

Definition at line 108 of file Helper.h.

References arm_compute::ACL_DST, arm_compute::ACL_SRC, ARM_COMPUTE_ERROR_ON_MSG, CLScheduler::enqueue_op(), and CLScheduler::get().

109  {
110  ARM_COMPUTE_ERROR_ON_MSG(!_kernel, "The CL kernel or function isn't configured");
111 
112  ITensorPack fill_pack = { { ACL_SRC, tensors.get_tensor(TensorType::ACL_DST) } };
113  _fill.run(fill_pack);
114  CLScheduler::get().enqueue_op(_border_handler, tensors);
115  CLScheduler::get().enqueue_op(*_kernel, tensors);
116  }
static CLScheduler & get()
Access the scheduler singleton.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Definition: CLOperator.cpp:38

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