34 struct CLPReluLayer::Impl
36 const ICLTensor *src_0{
nullptr };
37 const ICLTensor *src_1{
nullptr };
38 ICLTensor *
dst{
nullptr };
39 std::unique_ptr<OperatorType> op{
nullptr };
43 : _impl(
std::make_unique<Impl>())
60 _impl->op = std::make_unique<OperatorType>();
61 _impl->op->configure(compile_context, input->
info(), alpha->
info(), (output ==
nullptr ? input->
info() : output->
info()));
Basic function to run opencl::kernels::ClArithmeticKernel for PRELU.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
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.
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 & operator=(const CLPReluLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Interface for OpenCL tensor.
opencl::ClGemm OperatorType
static Status validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *c, const ITensorInfo *output, float alpha, float beta, const GEMMInfo &gemm_info)
Static function to check if given info will lead to a valid configuration.
CLPReluLayer()
Default Constructor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.