37 ITensorPack select_border_input(ITensorPack &tensors)
55 namespace experimental
65 auto k = std::make_unique<CLPixelWiseMultiplicationKernel>();
66 k->configure(compile_context, input1, input2, output, scale, overflow_policy, rounding_policy, act_info);
67 _kernel = std::move(k);
75 _border_handler->configure(compile_context, broadcasted_info, _kernel->border_size(),
BorderMode::REPLICATE);
88 auto border_pack = select_border_input(tensors);
100 auto k = std::make_unique<CLComplexPixelWiseMultiplicationKernel>();
101 k->configure(compile_context, input1, input2, output, act_info);
102 _kernel = std::move(k);
110 _border_handler->configure(compile_context, broadcasted_info, _kernel->border_size(),
BorderMode::REPLICATE);
122 auto border_pack = select_border_input(tensors);
128 struct CLPixelWiseMultiplication::Impl
133 std::unique_ptr<experimental::CLPixelWiseMultiplication> op{
nullptr };
137 : _impl(
std::make_unique<Impl>())
153 _impl->src_0 = input1;
154 _impl->src_1 = input2;
156 _impl->op = std::make_unique<experimental::CLPixelWiseMultiplication>();
157 _impl->op->configure(compile_context, input1->
info(), input2->
info(), output->
info(),
scale, overflow_policy, rounding_policy, act_info);
173 _impl->op->run(pack);
176 struct CLComplexPixelWiseMultiplication::Impl
181 std::unique_ptr<experimental::CLComplexPixelWiseMultiplication> op{
nullptr };
185 : _impl(
std::make_unique<Impl>())
199 _impl->src_0 = input1;
200 _impl->src_1 = input2;
202 _impl->op = std::make_unique<experimental::CLComplexPixelWiseMultiplication>();
203 _impl->op->configure(compile_context, input1->
info(), input2->
info(), output->
info(), act_info);
218 _impl->op->run(pack);
void configure(const CLCompileContext &compile_context, ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output.
~CLComplexPixelWiseMultiplication()
Default Destructor.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
static CLScheduler & get()
Access the scheduler singleton.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
void run() override
Run the kernels contained in the function.
Basic function to run CLComplexPixelWiseMultiplicationKernel.
void configure(ICLTensor *input1, ICLTensor *input2, ICLTensor *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and convertion policy.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
CLPixelWiseMultiplication & operator=(const CLPixelWiseMultiplication &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Activation Layer Information class.
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLPixelWiseMultiplicatio...
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
CLComplexPixelWiseMultiplication()
Default Constructor.
RoundingPolicy
Rounding method.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
CLComplexPixelWiseMultiplication()
Default Constructor.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLComplexPixelWiseMultip...
Basic function to run CLPixelWiseMultiplicationKernel.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLPixelWiseMultiplicatio...
void configure(const CLCompileContext &compile_context, ITensorInfo *input1, ITensorInfo *input2, ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output and convertion policy.
CLComplexPixelWiseMultiplication & operator=(const CLComplexPixelWiseMultiplication &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
CLPixelWiseMultiplication()
Default Constructor.
Interface for filling the border of a kernel.
Interface for OpenCL tensor.
void run() override
Run the kernels contained in the function.
Pixels outside the image are assumed to have the same value as the closest image pixel.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLComplexPixelWiseMultip...
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLComplexPixelWiseMultip...
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
CLPixelWiseMultiplication()
Default Constructor.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
void configure(ICLTensor *input1, ICLTensor *input2, ICLTensor *output, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Initialise the kernel's inputs, output.
ConvertPolicy
Policy to handle overflow.
static Status validate(const ITensorInfo *input1, const ITensorInfo *input2, const ITensorInfo *output, float scale, ConvertPolicy overflow_policy, RoundingPolicy rounding_policy, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of CLPixelWiseMultiplicatio...
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
~CLPixelWiseMultiplication()
Default Destructor.