24.04
|
Go to the documentation of this file.
34 struct CLRsqrtLayer::Impl
36 const ICLTensor *
src{
nullptr};
37 ICLTensor *
dst{
nullptr};
38 std::unique_ptr<opencl::ClRsqrt> op{
nullptr};
58 _impl->op = std::make_unique<opencl::ClRsqrt>();
59 _impl->op->configure(compile_context,
input->info(), output->
info());
75 struct CLExpLayer::Impl
78 ICLTensor *
dst{
nullptr};
79 std::unique_ptr<opencl::ClExp> op{
nullptr};
99 _impl->op = std::make_unique<opencl::ClExp>();
100 _impl->op->configure(compile_context,
input->info(), output->
info());
113 _impl->op->run(
pack);
116 struct CLNegLayer::Impl
119 ICLTensor *
dst{
nullptr};
120 std::unique_ptr<opencl::ClNeg> op{
nullptr};
140 _impl->op = std::make_unique<opencl::ClNeg>();
141 _impl->op->configure(compile_context,
input->info(), output->
info());
153 _impl->op->run(
pack);
156 struct CLSinLayer::Impl
159 ICLTensor *
dst{
nullptr};
160 std::unique_ptr<opencl::ClSin> op{
nullptr};
180 _impl->op = std::make_unique<opencl::ClSin>();
181 _impl->op->configure(compile_context,
input->info(), output->
info());
193 _impl->op->run(
pack);
196 struct CLAbsLayer::Impl
199 ICLTensor *
dst{
nullptr};
200 std::unique_ptr<opencl::ClAbs> op{
nullptr};
220 _impl->op = std::make_unique<opencl::ClAbs>();
221 _impl->op->configure(compile_context,
input->info(), output->
info());
233 _impl->op->run(
pack);
236 struct CLLogLayer::Impl
239 ICLTensor *
dst{
nullptr};
240 std::unique_ptr<opencl::ClLog> op{
nullptr};
260 _impl->op = std::make_unique<opencl::ClLog>();
261 _impl->op->configure(compile_context,
input->info(), output->
info());
273 _impl->op->run(
pack);
276 struct CLRoundLayer::Impl
279 ICLTensor *
dst{
nullptr};
280 std::unique_ptr<opencl::ClRound> op{
nullptr};
300 _impl->op = std::make_unique<opencl::ClRound>();
301 _impl->op->configure(compile_context,
input->info(), output->
info());
313 _impl->op->run(
pack);
Basic function to negate an input tensor.
~CLRoundLayer()
Default Destructor.
SimpleTensor< float > src
Basic function to calculate sine of an input tensor.
CLExpLayer & operator=(const CLExpLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
CLRsqrtLayer()
Default Constructor.
CLAbsLayer & operator=(const CLAbsLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
void run() override
Run the kernels contained in the function.
Basic function to perform elementwise log on an input tensor.
Interface for OpenCL tensor.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
Basic function to perform inverse square root 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.
Basic function to get the round (to the nearest even) value of 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 CLRoundLayer.
Basic function to get the absolute value of an input tensor.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context.
~CLAbsLayer()
Default Destructor.
CLNegLayer & operator=(const CLNegLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
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 CLSinLayer.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
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.
CLSinLayer()
Default Constructor.
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 CLExpLayer.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
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)
CLAbsLayer()
Default Constructor.
void run() override
Run the kernels contained in the function.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLLogLayer.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
CLNegLayer()
Default Constructor.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
CLLogLayer & operator=(const CLLogLayer &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
CLLogLayer()
Default Constructor.
~CLExpLayer()
Default Destructor.
CLRoundLayer()
Default Constructor.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
Copyright (c) 2017-2024 Arm Limited.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration.
void run() override
Run the kernels contained in the function.
~CLLogLayer()
Default Destructor.
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.
Store the tensor's metadata.
void run() override
Run the kernels contained in the function.
~CLNegLayer()
Default Destructor.
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLAbsLayer.
void run() override
Run the kernels contained in the function.
~CLSinLayer()
Default Destructor.
CLRoundLayer & operator=(const CLRoundLayer &)=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.
void configure(const ICLTensor *input, ICLTensor *output)
Initialize the function.
~CLRsqrtLayer()
Default Destructor.
void run() override
Run the kernels contained in the function.