diff options
Diffstat (limited to 'tests/validation/fixtures/ElementWiseUnaryFixture.h')
-rw-r--r-- | tests/validation/fixtures/ElementWiseUnaryFixture.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/validation/fixtures/ElementWiseUnaryFixture.h b/tests/validation/fixtures/ElementWiseUnaryFixture.h index 7837b085fa..fd66f630ba 100644 --- a/tests/validation/fixtures/ElementWiseUnaryFixture.h +++ b/tests/validation/fixtures/ElementWiseUnaryFixture.h @@ -104,6 +104,12 @@ protected: library->fill(tensor, distribution, i); break; } + case ElementWiseUnary::ROUND: + { + std::uniform_real_distribution<> distribution(100.0f, -100.0f); + library->fill(tensor, distribution, i); + break; + } default: ARM_COMPUTE_ERROR("Not implemented"); } @@ -219,6 +225,17 @@ public: ElementWiseUnaryValidationFixture<TensorType, AccessorType, FunctionType, T>::setup(shape, data_type, ElementWiseUnary::SIN); } }; + +template <typename TensorType, typename AccessorType, typename FunctionType, typename T> +class RoundValidationFixture : public ElementWiseUnaryValidationFixture<TensorType, AccessorType, FunctionType, T> +{ +public: + template <typename...> + void setup(const TensorShape &shape, DataType data_type) + { + ElementWiseUnaryValidationFixture<TensorType, AccessorType, FunctionType, T>::setup(shape, data_type, ElementWiseUnary::ROUND); + } +}; } // namespace validation } // namespace test } // namespace arm_compute |