Compute Library
 19.08
CLRange Class Reference

Basic function to run CLRangeKernel. More...

#include <CLRange.h>

Collaboration diagram for CLRange:
[legend]

Public Member Functions

void configure (ICLTensor *output, float start, float end, float step=1.f)
 Initialize the kernel's start, end, step and output tensor. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction ()
 Default constructor. More...
 
void run () override final
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *output, float start, float end, float step=1.f)
 Static function to check if given info will lead to a valid configuration of CLRange. More...
 

Detailed Description

Basic function to run CLRangeKernel.

Note
The tensor data type for the output must be U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32.
The function performs generates a sequence with the given start, end and step.

Definition at line 39 of file CLRange.h.

Member Function Documentation

◆ configure()

void configure ( ICLTensor output,
float  start,
float  end,
float  step = 1.f 
)

Initialize the kernel's start, end, step and output tensor.

Parameters
[out]outputOutput tensor. Data types supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32.
[in]startThe starting value of the sequence.
[in]endThe ending (not including) value of the sequence.
[in]stepThe gap between each pair of values in the sequence. Default is 1.

Definition at line 35 of file CLRange.cpp.

36 {
37  auto k = arm_compute::support::cpp14::make_unique<CLRangeKernel>();
38  k->set_target(CLScheduler::get().target());
39  k->configure(output, start, end, step);
40  _kernel = std::move(k);
41 
42  // Tune kernels
44 }
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
void tune_kernel_static(ICLKernel &kernel)
Tunes OpenCL kernel.
Definition: CLScheduler.h:172

References CLScheduler::get(), arm_compute::test::validation::step, and CLScheduler::tune_kernel_static().

◆ validate()

Status validate ( const ITensorInfo output,
float  start,
float  end,
float  step = 1.f 
)
static

Static function to check if given info will lead to a valid configuration of CLRange.

Parameters
[in]outputOutput tensor info. Data types supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32.
[in]startThe starting value of the sequence.
[in]endThe ending (not including) value of the sequence.
[in]stepThe gap between each pair of values in the sequence. Default is 1.
Returns
a status

Definition at line 46 of file CLRange.cpp.

47 {
48  return CLRangeKernel::validate(output, start, end, step);
49 }
static Status validate(const ITensorInfo *output, float start, float end, float step)
Static function to check if given info will lead to a valid configuration of CLRangeKernel.

References arm_compute::test::validation::step, and CLRangeKernel::validate().


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