24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_TEST_CL_HELPER_H
25 #define ARM_COMPUTE_TEST_CL_HELPER_H
53 template <
typename... Args>
56 auto k = std::make_unique<K>();
58 _kernel = std::move(k);
65 template <
typename... Args>
68 auto k = std::make_unique<K>();
69 k->set_target(gpu_target);
71 _kernel = std::move(k);
77 template <
typename... Args>
85 template <
typename K,
int bordersize>
95 template <
typename T,
typename... Args>
99 auto k = std::make_unique<K>();
101 k->configure(cctx, first, second, std::forward<Args>(
args)...);
102 _kernel = std::move(k);
113 _fill.
run(fill_pack);
121 std::unique_ptr<ICLKernel> _kernel{};
125 template <
typename K>
133 template <
typename... Args>
136 auto k = std::make_unique<K>();
137 k->configure(std::forward<Args>(
args)...);
138 _kernel = std::move(k);
145 template <
typename... Args>
148 auto k = std::make_unique<K>();
149 k->set_target(gpu_target);
150 k->configure(std::forward<Args>(
args)...);
151 _kernel = std::move(k);
157 template <
typename... Args>
165 template <
typename K,
int bordersize>
174 template <
typename T,
typename... Args>
177 auto k = std::make_unique<K>();
178 k->configure(first, std::forward<Args>(
args)...);
179 _kernel = std::move(k);
185 template <
typename K,
int bordersize>
195 template <
typename T,
typename... Args>
198 auto k = std::make_unique<K>();
200 k->configure(first, second, std::forward<Args>(
args)...);
201 _kernel = std::move(k);
219 std::unique_ptr<ICLKernel> _kernel{};
223 template <
typename K>
232 template <
typename T,
typename... Args>
235 auto k = std::make_unique<K>();
237 _kernel = std::move(k);
239 auto b = std::make_unique<CLFillBorderKernel>();
241 _border_handler = std::move(
b);
251 std::unique_ptr<ICLKernel> _border_handler{
nullptr };
252 std::unique_ptr<ICLKernel> _kernel{};
void configure(T first, T second, Args &&... args)
Configure the kernel.
This template synthetizes a simple IOperator which runs the given kernel K.
@ CONSTANT
Pixels outside the image are assumed to have a constant value.
void run(ITensorPack &tensors) override final
Run the kernels contained in the function.
void configure(T first, Args &&... args)
Configure the kernel.
void run() override
Run the kernels contained in the function.
Class describing the value of a pixel for any image format.
Container for 2D border size.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
static Status validate(Args &&... args)
Validate input arguments.
void configure(const CLCompileContext &compile_context, ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
Initialise the kernel's tensor and filling value.
Base class for all functions.
void configure(GPUTarget gpu_target, Args &&... args)
Configure the kernel setting the GPU target as well.
As above but this also setups a Zero border on the input tensor of the specified bordersize.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Interface for filling the border of a kernel.
void configure(T first, Args &&... args)
Configure the kernel.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
As above but this also setups a Zero border on the input tensor of the kernel's bordersize.
Basic function to run opencl::kernels::ClFillKernel.
This template synthetizes an ICLSimpleFunction which runs the given kernel K.
Basic interface for functions which have a single async CL kernel.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Basic interface for functions which have a single OpenCL kernel.
As above but this also initializes to zero the input tensor.
CLCompileContext & get_compile_context()
Gets the compile context used.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
void configure(ICLTensor *tensor, const PixelValue &constant_value, Window *window=nullptr)
Initialize the kernel's tensor and filling value.
As above but this also initializes to zero the input tensor.
static Status validate(Args &&... args)
Validate input arguments.
static CLScheduler & get()
Access the scheduler singleton.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
void run() override final
Run the kernels contained in the function.
GPUTarget
Available GPU Targets.
void configure(Args &&... args)
Configure the kernel.
void configure(Args &&... args)
Configure the kernel.
Copyright (c) 2017-2024 Arm Limited.
void configure(T first, T second, Args &&... args)
Configure the kernel.
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
Status validate(const ITensorInfo *scores_in, const ITensorInfo *boxes_in, const ITensorInfo *batch_splits_in, const ITensorInfo *scores_out, const ITensorInfo *boxes_out, const ITensorInfo *classes, const ITensorInfo *batch_splits_out, const ITensorInfo *keeps, const ITensorInfo *keeps_size, const BoxNMSLimitInfo info)
Basic function to run kernels::ClFillKernel.
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.
void configure(GPUTarget gpu_target, Args &&... args)
Configure the kernel setting the GPU target as well.