Compute Library
 21.05
ClFill Class Reference

Basic function to run kernels::ClFillKernel. More...

#include <ClFill.h>

Collaboration diagram for ClFill:
[legend]

Public Member Functions

 ClFill ()=default
 Constructor. More...
 
void configure (const CLCompileContext &compile_context, ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
 Initialise the kernel's tensor and filling value. More...
 
- Public Member Functions inherited from ICLOperator
 ICLOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLOperator (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLOperator (ICLOperator &&)=default
 Default move constructor. More...
 
ICLOperatoroperator= (const ICLOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLOperatoroperator= (ICLOperator &&)=default
 Default move assignment operator. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
 Static function to check if given info will lead to a valid configuration of kernels::ClFillKernel. More...
 

Detailed Description

Basic function to run kernels::ClFillKernel.

Definition at line 36 of file ClFill.h.

Constructor & Destructor Documentation

◆ ClFill()

ClFill ( )
default

Constructor.

Member Function Documentation

◆ configure()

void configure ( const CLCompileContext compile_context,
ITensorInfo tensor,
const PixelValue constant_value,
Window window = nullptr 
)

Initialise the kernel's tensor and filling value.

Parameters
[in]compile_contextThe compile context to be used.
[in,out]tensorSource tensor info. Supported data types: All.
[in]constant_valueThe value used to fill the planes of the tensor
[in]windowWindow to be used in case setting only part of a tensor. Default is nullptr.

Definition at line 33 of file ClFill.cpp.

34 {
35  auto k = std::make_unique<kernels::ClFillKernel>();
36  k->configure(compile_context, tensor, constant_value, dst_window);
37  _kernel = std::move(k);
38 }

◆ validate()

Status validate ( const ITensorInfo tensor,
const PixelValue constant_value,
Window window = nullptr 
)
static

Static function to check if given info will lead to a valid configuration of kernels::ClFillKernel.

Parameters
[in]tensorSource tensor info. Data types supported: All.
[in]constant_valueThe value used to fill the planes of the tensor.
[in]windowWindow to be used in case setting only part of a tensor. Default is nullptr.
Returns
a status

Definition at line 40 of file ClFill.cpp.

41 {
42  return kernels::ClFillKernel::validate(tensor, constant_value, dst_window);
43 }
static Status validate(const ITensorInfo *tensor, const PixelValue &constant_value, Window *window=nullptr)
Static function to check if given info will lead to a valid configuration of ClFillKernel.

References ClFillKernel::validate().

Referenced by CLFill::validate().


The documentation for this class was generated from the following files: