Compute Library
18.05
|
Calculate required padding. More...
#include <PaddingCalculator.h>
Public Types | |
enum | Option { EXCLUDE_BORDER, INCLUDE_BORDER } |
Options for computing the padding. More... | |
Public Member Functions | |
PaddingCalculator (int size, int processed_elements) | |
Construct calculator with size of tensor's dimension and step size. More... | |
void | set_border_mode (BorderMode mode) |
Set border mode. More... | |
void | set_border_size (int size) |
Set border size. More... | |
void | set_access_offset (int offset) |
Set offset of the access relative to the current position. More... | |
void | set_processed_elements (int elements) |
Set number of processed elements. More... | |
void | set_accessed_elements (int elements) |
Set number of accessed elements. More... | |
PaddingSize | required_padding () const |
Compute the required padding. More... | |
PaddingSize | required_padding (Option option) const |
Compute the required padding. More... | |
Calculate required padding.
Definition at line 36 of file PaddingCalculator.h.
|
strong |
Options for computing the padding.
Enumerator | |
---|---|
EXCLUDE_BORDER | |
INCLUDE_BORDER |
Definition at line 40 of file PaddingCalculator.h.
|
inline |
Construct calculator with size of tensor's dimension and step size.
[in] | size | Number of elements available. |
[in] | processed_elements | Number of elements processed per iteration. |
Definition at line 51 of file PaddingCalculator.h.
References offset(), PaddingCalculator::required_padding(), PaddingCalculator::set_access_offset(), PaddingCalculator::set_accessed_elements(), PaddingCalculator::set_border_mode(), PaddingCalculator::set_border_size(), PaddingCalculator::set_processed_elements(), and arm_compute::UNDEFINED.
|
inline |
Compute the required padding.
If access offset is negative and border mode is not undefined, the top, bottom and left padding is set to boder size. Otherwise it is zero. The right padding is always computed based on the specified parameters.
Definition at line 141 of file PaddingCalculator.h.
References PaddingCalculator::EXCLUDE_BORDER, and PaddingCalculator::INCLUDE_BORDER.
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and PaddingCalculator::PaddingCalculator().
|
inline |
Compute the required padding.
If option
is INCLUDE_BORDER and border mode is not undefined, the top, bottom and left padding is set to boder size. Otherwise it is zero. The right padding is always computed based on the specified parameters.
[in] | option | Padding option |
Definition at line 146 of file PaddingCalculator.h.
References PaddingCalculator::EXCLUDE_BORDER, arm_compute::test::fixed_point_arithmetic::detail::max(), arm_compute::U, and arm_compute::UNDEFINED.
|
inline |
Set offset of the access relative to the current position.
[in] | offset | Offset of the access. |
Definition at line 127 of file PaddingCalculator.h.
References offset().
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and PaddingCalculator::PaddingCalculator().
|
inline |
Set number of accessed elements.
[in] | elements | Number of accessed elements per iteration. |
Definition at line 136 of file PaddingCalculator.h.
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and PaddingCalculator::PaddingCalculator().
|
inline |
Set border mode.
[in] | mode | Border mode. |
Definition at line 117 of file PaddingCalculator.h.
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and PaddingCalculator::PaddingCalculator().
|
inline |
Set border size.
[in] | size | Border size in elements. |
Definition at line 122 of file PaddingCalculator.h.
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and PaddingCalculator::PaddingCalculator().
|
inline |
Set number of processed elements.
[in] | elements | Number of processed elements per iteration. |
Definition at line 132 of file PaddingCalculator.h.
Referenced by PaddingCalculator::PaddingCalculator().