24.02
|
Implementation of a XY-transpose access pattern. More...
#include <AccessWindowTranspose.h>
Public Member Functions | |
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... | |
AccessWindowRectangle (ITensorInfo *info, int x, int y, int width, int height) | |
Constructor for a rectangular access pattern. More... | |
AccessWindowRectangle (ITensorInfo *info, int x, int y, int width, int height, float scale_x, float scale_y) | |
Constructor for a rectangular access pattern. More... | |
AccessWindowRectangle (const AccessWindowRectangle &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowRectangle (AccessWindowRectangle &&)=default | |
Allow instances of this class to be move constructed. More... | |
ValidRegion | compute_valid_region (const Window &window, const ValidRegion &input_valid_region) const |
Compute the valid region based on access pattern, valid region of the inputs and border mode. 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 AccessWindowRectangle | |
AccessWindowRectangle (ITensorInfo *info, int x, int y, int width, int height) | |
Constructor for a rectangular access pattern. More... | |
AccessWindowRectangle (ITensorInfo *info, int x, int y, int width, int height, float scale_x, float scale_y) | |
Constructor for a rectangular access pattern. More... | |
AccessWindowRectangle (const AccessWindowRectangle &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowRectangle (AccessWindowRectangle &&)=default | |
Allow instances of this class to be move constructed. More... | |
AccessWindowRectangle & | operator= (const AccessWindowRectangle &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowRectangle & | operator= (AccessWindowRectangle &&)=default |
Allow instances of this class to be moved. More... | |
~AccessWindowRectangle ()=default | |
Default destructor. More... | |
void | set_valid_region (const Window &window, const ValidRegion &input_valid_region, bool border_undefined=false, const BorderSize &border_size=BorderSize(0)) |
Set the valid region based on access pattern, valid region of the inputs and border mode. More... | |
ValidRegion | compute_valid_region (const Window &window, const ValidRegion &input_valid_region) const |
Compute the valid region based on access pattern, valid region of the inputs and border mode. More... | |
Public Member Functions inherited from IAccessWindow | |
virtual | ~IAccessWindow ()=default |
Default virtual destructor. More... | |
Implementation of a XY-transpose access pattern.
Definition at line 38 of file AccessWindowTranspose.h.
|
default |
Allow instances of this class to be move constructed.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
inline |
Constructor for a rectangular access pattern.
[in,out] | info | Tensor info of the accessed kernel. |
[in] | x | Offset of the access in X direction. |
[in] | y | Offset of the access in Y direction. |
[in] | width | Number of elements that are accessed in X direction. |
[in] | height | Number of elements that are accessed in Y direction. |
Definition at line 123 of file IAccessWindow.h.
|
inline |
Constructor for a rectangular access pattern.
[in,out] | info | Tensor info of the accessed kernel. |
[in] | x | Offset of the access in X direction. |
[in] | y | Offset of the access in Y direction. |
[in] | width | Number of elements that are accessed in X direction. |
[in] | height | Number of elements that are accessed in Y direction. |
[in] | scale_x | Ratio along the X direction between the window used by the execute_window_loop and the rectangular access pattern defined |
[in] | scale_y | Ratio along the Y direction between the window used by the execute_window_loop and the rectangular access pattern defined |
Definition at line 140 of file IAccessWindow.h.
ValidRegion compute_valid_region |
Compute the valid region based on access pattern, valid region of the inputs and border mode.
[in] | window | Execution window of the kernel. |
[in] | input_valid_region | Combined valid region of all inputs. |
Definition at line 32 of file IAccessWindow.cpp.
|
override |
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. |
Definition at line 38 of file IAccessWindow.cpp.
|
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. |
Reimplemented from AccessWindowRectangle.
Definition at line 32 of file AccessWindowTranspose.cpp.
References ValidRegion::anchor, BorderSize::bottom, Window::Dimension::end(), arm_compute::mlgo::parser::end(), BorderSize::left, BorderSize::right, Dimensions< T >::set(), arm_compute::test::validation::shape, ValidRegion::shape, Window::Dimension::start(), Window::Dimension::step(), BorderSize::top, Window::x(), and Window::y().
|
overridevirtual |
Increase the padding to be large enough for the window.
[in] | window | Window used by the kernel. |
Reimplemented from AccessWindowRectangle.
Definition at line 201 of file AccessWindowTranspose.cpp.
References ARM_COMPUTE_ERROR_ON, BorderSize::bottom, Window::Dimension::end(), BorderSize::left, BorderSize::right, arm_compute::test::validation::shape, Window::Dimension::start(), Window::Dimension::step(), BorderSize::top, Window::x(), and Window::y().
|
overridevirtual |
Shrink the window if padding is not large enough.
[in] | window | Window used by the kernel. |
Reimplemented from AccessWindowRectangle.
Definition at line 96 of file AccessWindowTranspose.cpp.
References arm_compute::adjust_down(), arm_compute::adjust_up(), Window::Dimension::end(), arm_compute::mlgo::parser::end(), Window::set(), arm_compute::test::validation::shape, Window::Dimension::start(), Window::Dimension::step(), Window::validate(), Window::x(), and Window::y().