Compute Library
 22.05
NESynthetizeFunctionWithZeroConstantKernelBorder< K > Class Template Reference

As above but this also setups a Zero border on the input tensor of the kernel's bordersize. More...

#include <Helper.h>

Collaboration diagram for NESynthetizeFunctionWithZeroConstantKernelBorder< K >:
[legend]

Public Member Functions

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

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

As above but this also setups a Zero border on the input tensor of the kernel's bordersize.

Definition at line 109 of file Helper.h.

Member Function Documentation

◆ configure()

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

Configure the kernel.

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

Definition at line 118 of file Helper.h.

References GemmTuner::args, arm_compute::test::validation::b, arm_compute::CONSTANT, and arm_compute::test::validation::k.

119  {
120  auto k = std::make_unique<K>();
121  k->configure(first, std::forward<Args>(args)...);
122  _kernel = std::move(k);
123 
124  auto b = std::make_unique<NEFillBorderKernel>();
125  b->configure(first, BorderSize(_kernel->border_size()), BorderMode::CONSTANT, PixelValue());
126  _border_handler = std::move(b);
127  }
SimpleTensor< float > b
Definition: DFT.cpp:157

◆ run()

void run ( ITensorPack tensors)
inlinevirtual

Run the kernels contained in the function.

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

Reimplemented from INEOperator.

Definition at line 129 of file Helper.h.

References Window::DimY, Window::DimZ, Scheduler::get(), IScheduler::schedule(), and IScheduler::schedule_op().

130  {
131  NEScheduler::get().schedule(_border_handler.get(), Window::DimZ);
132  NEScheduler::get().schedule_op(_kernel.get(), Window::DimY, _kernel->window(), tensors);
133  }
virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
virtual void schedule(ICPPKernel *kernel, const Hints &hints)=0
Runs the kernel in the same thread as the caller synchronously.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
static IScheduler & get()
Access the scheduler singleton.
Definition: Scheduler.cpp:94

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