Compute Library
 23.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.

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  }

References GemmTuner::args, ClFill::configure(), CLFillBorderKernel::configure(), arm_compute::CONSTANT, CLKernelLibrary::get(), CLScheduler::get(), and CLKernelLibrary::get_compile_context().

◆ 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.

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  }

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


The documentation for this class was generated from the following file:
GemmTuner.args
args
Definition: GemmTuner.py:679
arm_compute::BorderMode::CONSTANT
@ CONSTANT
Pixels outside the image are assumed to have a constant value.
arm_compute::opencl::ClFill::configure
void configure(const CLCompileContext &compile_context, ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
Initialise the kernel's tensor and filling value.
Definition: ClFill.cpp:34
arm_compute::experimental::ICLOperator::run
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Definition: CLOperator.cpp:37
arm_compute::CLKernelLibrary::get
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Definition: CLKernelLibrary.cpp:41
ARM_COMPUTE_ERROR_ON_MSG
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
arm_compute::ACL_DST
@ ACL_DST
Definition: Types.h:55
arm_compute::CLKernelLibrary::get_compile_context
CLCompileContext & get_compile_context()
Gets the compile context used.
Definition: CLKernelLibrary.cpp:134
arm_compute::CLScheduler::get
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:112
arm_compute::CLScheduler::enqueue_op
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
Definition: CLScheduler.cpp:238
arm_compute::ACL_SRC
@ ACL_SRC
Definition: Types.h:44
arm_compute::CLFillBorderKernel::configure
void configure(const CLCompileContext &compile_context, ICLTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value=PixelValue())
Initialise the kernel's input, output and border mode.
Definition: CLFillBorderKernel.cpp:67