Compute Library
18.05
|
Implementation of a static rectangular access pattern. More...
#include <AccessWindowStatic.h>
Public Member Functions | |
AccessWindowStatic (ITensorInfo *info, int start_x, int start_y, int end_x, int end_y) | |
Constructor for a static access pattern. More... | |
AccessWindowStatic (const AccessWindowStatic &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowStatic & | operator= (const AccessWindowStatic &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
AccessWindowStatic (AccessWindowStatic &&)=default | |
Allow instances of this class to be move constructed. More... | |
AccessWindowStatic & | operator= (AccessWindowStatic &&)=default |
Allow instances of this class to be moved. More... | |
~AccessWindowStatic ()=default | |
Default destructor. More... | |
void | set_valid_region (const Window &window, const ValidRegion &input_valid_region) |
Set the valid region based on the static access pattern and valid region of the inputs. More... | |
ValidRegion | compute_valid_region (const Window &window, ValidRegion input_valid_region) const |
Compute the valid region based on the static access pattern and valid region of the inputs. 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... | |
Implementation of a static rectangular access pattern.
In this implementation the access offsets and sizes are not relative to the current element. Instead they are considered to be absolute coordinates within the accessed tensor's shape.
Definition at line 46 of file AccessWindowStatic.h.
AccessWindowStatic | ( | ITensorInfo * | info, |
int | start_x, | ||
int | start_y, | ||
int | end_x, | ||
int | end_y | ||
) |
Constructor for a static access pattern.
[in,out] | info | Tensor info of the accessed kernel. |
[in] | start_x | Start of the access in X direction. |
[in] | start_y | Start of the access in Y direction. |
[in] | end_x | End of the access in X direction. |
[in] | end_y | End of the access in Y direction. |
|
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 Window & | window, |
ValidRegion | input_valid_region | ||
) | const |
Compute the valid region based on the static 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. |
|
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.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
void set_valid_region | ( | const Window & | window, |
const ValidRegion & | input_valid_region | ||
) |
Set the valid region based on the static 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. |
|
overridevirtual |
Increase the padding to be large enough for the window.
[in] | window | Window used by the kernel. |
Implements IAccessWindow.
|
overridevirtual |
Shrink the window if padding is not large enough.
[in] | window | Window used by the kernel. |
Implements IAccessWindow.