32 namespace experimental
40 auto k = std::make_unique<arm_compute::opencl::kernels::ClArithmeticKernel>();
42 _kernel = std::move(k);
56 struct CLPReluLayer::Impl
61 std::unique_ptr<experimental::CLPReluLayer> op{
nullptr };
65 : _impl(
std::make_unique<Impl>())
82 _impl->op = std::make_unique<experimental::CLPReluLayer>();
83 _impl->op->configure(compile_context, input->
info(), alpha->
info(), output->
info());
static Status validate(ArithmeticOperation op, const ITensorInfo *src1, const ITensorInfo *src2, const ITensorInfo *dst, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration of ClArithmeticKernel.
Basic function to run opencl::kernels::ClArithmeticKernel for PRELU.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
void run() override
Run the kernels contained in the function.
Copyright (c) 2017-2021 Arm Limited.
void configure(ICLTensor *input, ICLTensor *alpha, ICLTensor *output)
Set the input and output tensor.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
static Status validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLPReluLayer.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
static Status validate(const ITensorInfo *input, const ITensorInfo *alpha, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLPReluLayer.
~CLPReluLayer()
Default Destructor.
CLPReluLayer()
Default Constructor.
y*x if x < 0, x otherwise
CLPReluLayer & operator=(const CLPReluLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Interface for OpenCL tensor.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
CLPReluLayer()
Default Constructor.
void configure(const CLCompileContext &compile_context, ITensorInfo *input, ITensorInfo *alpha, ITensorInfo *output)
Set the input and output tensor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.