33 struct CLRsqrtLayer::Impl
35 const ICLTensor *
src{
nullptr };
36 ICLTensor *
dst{
nullptr };
37 std::unique_ptr<opencl::ClRsqrt> op{
nullptr };
41 : _impl(
std::make_unique<Impl>())
58 _impl->op = std::make_unique<opencl::ClRsqrt>();
59 _impl->op->configure(compile_context, input->
info(), output->
info());
75 struct CLExpLayer::Impl
79 std::unique_ptr<opencl::ClExp> op{
nullptr };
83 : _impl(
std::make_unique<Impl>())
100 _impl->op = std::make_unique<opencl::ClExp>();
101 _impl->op->configure(compile_context, input->
info(), output->
info());
114 _impl->op->run(pack);
117 struct CLNegLayer::Impl
121 std::unique_ptr<opencl::ClNeg> op{
nullptr };
125 : _impl(
std::make_unique<Impl>())
142 _impl->op = std::make_unique<opencl::ClNeg>();
143 _impl->op->configure(compile_context, input->
info(), output->
info());
155 _impl->op->run(pack);
158 struct CLSinLayer::Impl
162 std::unique_ptr<opencl::ClSin> op{
nullptr };
166 : _impl(
std::make_unique<Impl>())
183 _impl->op = std::make_unique<opencl::ClSin>();
184 _impl->op->configure(compile_context, input->
info(), output->
info());
196 _impl->op->run(pack);
199 struct CLAbsLayer::Impl
203 std::unique_ptr<opencl::ClAbs> op{
nullptr };
207 : _impl(
std::make_unique<Impl>())
224 _impl->op = std::make_unique<opencl::ClAbs>();
225 _impl->op->configure(compile_context, input->
info(), output->
info());
237 _impl->op->run(pack);
240 struct CLLogLayer::Impl
244 std::unique_ptr<opencl::ClLog> op{
nullptr };
248 : _impl(
std::make_unique<Impl>())
265 _impl->op = std::make_unique<opencl::ClLog>();
266 _impl->op->configure(compile_context, input->
info(), output->
info());
278 _impl->op->run(pack);
281 struct CLRoundLayer::Impl
285 std::unique_ptr<opencl::ClRound> op{
nullptr };
289 : _impl(
std::make_unique<Impl>())
306 _impl->op = std::make_unique<opencl::ClRound>();
307 _impl->op->configure(compile_context, input->
info(), output->
info());
319 _impl->op->run(pack);
Basic function to get the absolute value of an input tensor.
void run() override
Run the kernels contained in the function.
CLLogLayer & operator=(const CLLogLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
CLAbsLayer & operator=(const CLAbsLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLNegLayer.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClAbs.
void run() override
Run the kernels contained in the function.
Basic function to perform exponential on an input tensor.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLRsqrtLayer.
CLSinLayer & operator=(const CLSinLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
Basic function to perform inverse square root on an input tensor.
CLAbsLayer()
Default Constructor.
CLExpLayer & operator=(const CLExpLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
CLRsqrtLayer & operator=(const CLRsqrtLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
~CLSinLayer()
Default Destructor.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLAbsLayer.
Basic function to get the round (to the nearest even) value of an input tensor.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
~CLExpLayer()
Default Destructor.
~CLRsqrtLayer()
Default Destructor.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClSin.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClRsqrt.
void run() override
Run the kernels contained in the function.
void run() override
Run the kernels contained in the function.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLExpLayer.
CLRsqrtLayer()
Default Constructor.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLRoundLayer.
Basic function to calculate sine of an input tensor.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClExp.
CLNegLayer & operator=(const CLNegLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLSinLayer.
Interface for OpenCL tensor.
~CLLogLayer()
Default Destructor.
CLSinLayer()
Default Constructor.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLLogLayer.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
~CLRoundLayer()
Default Destructor.
CLRoundLayer()
Default Constructor.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClRound.
CLNegLayer()
Default Constructor.
~CLNegLayer()
Default Destructor.
Basic function to negate an input tensor.
CLRoundLayer & operator=(const CLRoundLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers) ...
~CLAbsLayer()
Default Destructor.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
CLLogLayer()
Default Constructor.
void run() override
Run the kernels contained in the function.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
CLExpLayer()
Default Constructor.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClNeg.
void run() override
Run the kernels contained in the function.
Basic function to perform elementwise log on an input tensor.
void run() override
Run the kernels contained in the function.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of ClLog.