Compute Library
 21.02
NERemap Class Reference

Basic function to execute remap. More...

#include <NERemap.h>

Collaboration diagram for NERemap:
[legend]

Public Member Functions

void configure (ITensor *input, const ITensor *map_x, const ITensor *map_y, ITensor *output, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value=0)
 Initialise the function's sources, destination, interpolation policy and border mode. More...
 
- Public Member Functions inherited from INESimpleFunction
 INESimpleFunction ()
 Constructor. More...
 
 INESimpleFunction (const INESimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INESimpleFunction (INESimpleFunction &&)=default
 Default move constructor. More...
 
INESimpleFunctionoperator= (const INESimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INESimpleFunctionoperator= (INESimpleFunction &&)=default
 Default move assignment operator. More...
 
 ~INESimpleFunction ()
 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 execute remap.

This function calls the following Neon kernels:

  1. NEFillBorderKernel (executed if border_mode == CONSTANT or border_mode == REPLICATE)
  2. NERemapKernel
Deprecated:
This function is deprecated and is intended to be removed in 21.05 release

Definition at line 45 of file NERemap.h.

Member Function Documentation

◆ configure()

void configure ( ITensor input,
const ITensor map_x,
const ITensor map_y,
ITensor output,
InterpolationPolicy  policy,
BorderMode  border_mode,
uint8_t  constant_border_value = 0 
)

Initialise the function's sources, destination, interpolation policy and border mode.

Parameters
[in,out]inputSource tensor. Data type supported: U8. (Written to only for border_mode != UNDEFINED)
[in]map_xMap for X coordinates. Data type supported: F32.
[in]map_yMap for Y coordinates. Data type supported: F32.
[out]outputOutput tensor. Data type supported: U8.
[in]policyInterpolation policy to use. Only NEAREST and BILINEAR are supported.
[in]border_modeBorder mode to use on the input tensor.
[in]constant_border_value(Optional) Constant value to use for borders if border_mode is set to CONSTANT.

Definition at line 39 of file NERemap.cpp.

References arm_compute::AREA, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_MSG, arm_compute::test::validation::b, arm_compute::F32, and arm_compute::U8.

40 {
45  ARM_COMPUTE_ERROR_ON_MSG(policy == InterpolationPolicy::AREA, "Area interpolation is not supported");
46 
47  auto k = std::make_unique<NERemapKernel>();
48  k->configure(input, map_x, map_y, output, policy);
49  _kernel = std::move(k);
50 
51  auto b = std::make_unique<NEFillBorderKernel>();
52  b->configure(input, _kernel->border_size(), border_mode, PixelValue(constant_border_value));
53  _border_handler = std::move(b);
54 }
SimpleTensor< float > b
Definition: DFT.cpp:157
1 channel, 1 U8 per channel
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
Definition: Error.h:456
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
Definition: Validate.h:790

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