Compute Library
 21.02
NEAccumulateWeighted Class Reference

Basic function to run NEAccumulateWeightedKernel. More...

#include <NEAccumulate.h>

Collaboration diagram for NEAccumulateWeighted:
[legend]

Public Member Functions

 NEAccumulateWeighted ()=default
 Default constructor. More...
 
 NEAccumulateWeighted (const NEAccumulateWeighted &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
NEAccumulateWeightedoperator= (const NEAccumulateWeighted &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 NEAccumulateWeighted (NEAccumulateWeighted &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
NEAccumulateWeightedoperator= (NEAccumulateWeighted &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
 ~NEAccumulateWeighted ()
 Default destructor. More...
 
void configure (const ITensor *input, float alpha, ITensor *output, bool use_fp16=false)
 Set the input and accumulation tensors, and the scale value. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INESimpleFunctionNoBorder (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INESimpleFunctionNoBorder (INESimpleFunctionNoBorder &&)=default
 Default move constructor. More...
 
INESimpleFunctionNoBorderoperator= (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INESimpleFunctionNoBorderoperator= (INESimpleFunctionNoBorder &&)=default
 Default move assignment operator. More...
 
 ~INESimpleFunctionNoBorder ()
 Default destructor. 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...
 

Detailed Description

Basic function to run NEAccumulateWeightedKernel.

Deprecated:
This function is deprecated and is intended to be removed in 21.05 release

Definition at line 68 of file NEAccumulate.h.

Constructor & Destructor Documentation

◆ NEAccumulateWeighted() [1/3]

NEAccumulateWeighted ( )
default

Default constructor.

◆ NEAccumulateWeighted() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ NEAccumulateWeighted() [3/3]

Prevent instances of this class from being moved (As this class contains non movable objects)

◆ ~NEAccumulateWeighted()

~NEAccumulateWeighted ( )
default

Default destructor.

Referenced by NEAccumulate::configure().

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
float  alpha,
ITensor output,
bool  use_fp16 = false 
)

Set the input and accumulation tensors, and the scale value.

Parameters
[in]inputSource tensor. Data type supported: U8.
[in]alphaThe input scalar value with a value input the range of [0, 1.0]
[in,out]outputAccumulated tensor. Data type supported: U8.
[in]use_fp16(Optional) If true the FP16 kernels will be used. If false F32 kernels are used.

Definition at line 43 of file NEAccumulate.cpp.

References NEAccumulateSquared::~NEAccumulateSquared().

44 {
45  if(use_fp16)
46  {
47  auto k = std::make_unique<NEAccumulateWeightedFP16Kernel>();
48  k->configure(input, alpha, output);
49  _kernel = std::move(k);
50  }
51  else
52  {
53  auto k = std::make_unique<NEAccumulateWeightedKernel>();
54  k->configure(input, alpha, output);
55  _kernel = std::move(k);
56  }
57 }

◆ operator=() [1/2]

NEAccumulateWeighted& operator= ( const NEAccumulateWeighted )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

NEAccumulateWeighted& operator= ( NEAccumulateWeighted &&  )
delete

Prevent instances of this class from being moved (As this class contains non movable objects)


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