24.02.1
|
Dummy access window. More...
#include <AccessWindowAutoPadding.h>
Public Member Functions | |
AccessWindowAutoPadding (ITensorInfo *info) | |
Default constructor. More... | |
AccessWindowAutoPadding (const AccessWindowAutoPadding &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowAutoPadding & | operator= (const AccessWindowAutoPadding &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowAutoPadding (AccessWindowAutoPadding &&)=default | |
Allow instances of this class to be move constructed. More... | |
AccessWindowAutoPadding & | operator= (AccessWindowAutoPadding &&)=default |
Allow instances of this class to be moved. More... | |
~AccessWindowAutoPadding ()=default | |
Default destructor. More... | |
void | set_valid_region () |
Set the valid region to match the entire tensor. More... | |
ValidRegion | compute_valid_region () const |
Return a valid region that spans across the entire tensor. More... | |
bool | update_window_if_needed (Window &window) const override |
Shrink the window if padding is not large enough. More... | |
bool | update_padding_if_needed (const Window &window) override |
Increase the padding to be large enough for the window. More... | |
ValidRegion | compute_valid_region (const Window &window, ValidRegion input_valid_region, bool border_undefined, BorderSize border_size) const override |
Compute the valid region based on access pattern and valid region of the inputs. More... | |
Public Member Functions inherited from IAccessWindow | |
virtual | ~IAccessWindow ()=default |
Default virtual destructor. More... | |
Dummy access window.
This implementation always uses the auto padding of the tensor info and never updates the window. The valid region is always set to cover the entire tensor.
Definition at line 47 of file AccessWindowAutoPadding.h.
AccessWindowAutoPadding | ( | ITensorInfo * | info | ) |
Default constructor.
[in,out] | info | Tensor info of the accessed kernel. |
Definition at line 31 of file AccessWindowAutoPadding.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be move constructed.
|
default |
Default destructor.
ValidRegion compute_valid_region | ( | ) | const |
Return a valid region that spans across the entire tensor.
Definition at line 48 of file AccessWindowAutoPadding.cpp.
References ITensorInfo::tensor_shape().
Referenced by AccessWindowAutoPadding::compute_valid_region(), and AccessWindowAutoPadding::set_valid_region().
|
overridevirtual |
Compute the valid region based on access pattern and valid region of the inputs.
[in] | window | Execution window of the kernel. |
[in] | input_valid_region | Combined valid region of all inputs. |
[in] | border_undefined | Undefined borders are excluded from the valid region. |
[in] | border_size | Size of the border around the XY-plane of the tensor. |
Implements IAccessWindow.
Definition at line 35 of file AccessWindowAutoPadding.cpp.
References ARM_COMPUTE_UNUSED, and AccessWindowAutoPadding::compute_valid_region().
|
default |
Allow instances of this class to be moved.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
void set_valid_region | ( | ) |
Set the valid region to match the entire tensor.
Definition at line 58 of file AccessWindowAutoPadding.cpp.
References AccessWindowAutoPadding::compute_valid_region(), and ITensorInfo::set_valid_region().
|
overridevirtual |
Increase the padding to be large enough for the window.
[in] | window | Window used by the kernel. |
Implements IAccessWindow.
Definition at line 75 of file AccessWindowAutoPadding.cpp.
References ARM_COMPUTE_UNUSED, ITensorInfo::auto_padding(), and ITensorInfo::is_resizable().
|
overridevirtual |
Shrink the window if padding is not large enough.
[in] | window | Window used by the kernel. |
Implements IAccessWindow.
Definition at line 68 of file AccessWindowAutoPadding.cpp.
References ARM_COMPUTE_UNUSED.