24.02.1
|
#include "tests/Utils.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Validation.h"
#include "utils/TypePrinter.h"
#include <stdexcept>
Go to the source code of this file.
Functions | |
DATA_TEST_CASE (RoundHalfUp, framework::DatasetMode::ALL, zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 3.f, 3.f, -3.f, -3.f, -4.f, -4.f, -4.f })), value, result) | |
DATA_TEST_CASE (RoundHalfEven, framework::DatasetMode::ALL, zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 2.f, 3.f, -3.f, -4.f, -4.f, -4.f, -4.f })), value, result) | |
DATA_TEST_CASE (Index2Coord, framework::DatasetMode::ALL, zip(zip(framework::dataset::make("Shape", { TensorShape{ 1U }, TensorShape{ 2U }, TensorShape{ 2U, 3U } }), framework::dataset::make("Index", { 0, 1, 2 })), framework::dataset::make("Coordinates", { Coordinates{ 0 }, Coordinates{ 1 }, Coordinates{ 0, 1 } })), shape, index, ref_coordinate) | |
DATA_TEST_CASE (RoundFloatToZero, framework::DatasetMode::ALL, zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 1.f, 2.f, 2.f, -3.f, -3.f, -3.f, -4.f, -4.f })), value, result) | |
DATA_TEST_CASE (RoundFloatToNearestUp, framework::DatasetMode::ALL, zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 3.f, 3.f, -3.f, -4.f, -4.f, -4.f, -5.f })), value, result) | |
DATA_TEST_CASE (Coord2Index, framework::DatasetMode::ALL, zip(zip(framework::dataset::make("Shape", { TensorShape{ 1U }, TensorShape{ 2U }, TensorShape{ 2U, 3U } }), framework::dataset::make("Coordinates", { Coordinates{ 0 }, Coordinates{ 1 }, Coordinates{ 0, 1 } })), framework::dataset::make("Index", { 0, 1, 2 })), shape, coordinate, ref_index) | |
DATA_TEST_CASE | ( | Coord2Index | , |
framework::DatasetMode::ALL | , | ||
zip(zip(framework::dataset::make("Shape", { TensorShape{ 1U }, TensorShape{ 2U }, TensorShape{ 2U, 3U } }), framework::dataset::make("Coordinates", { Coordinates{ 0 }, Coordinates{ 1 }, Coordinates{ 0, 1 } })), framework::dataset::make("Index", { 0, 1, 2 })) | , | ||
shape | , | ||
coordinate | , | ||
ref_index | |||
) |
Definition at line 77 of file Utils.cpp.
References arm_compute::utils::cast::U.
DATA_TEST_CASE | ( | Index2Coord | , |
framework::DatasetMode::ALL | , | ||
zip(zip(framework::dataset::make("Shape", { TensorShape{ 1U }, TensorShape{ 2U }, TensorShape{ 2U, 3U } }), framework::dataset::make("Index", { 0, 1, 2 })), framework::dataset::make("Coordinates", { Coordinates{ 0 }, Coordinates{ 1 }, Coordinates{ 0, 1 } })) | , | ||
shape | , | ||
index | , | ||
ref_coordinate | |||
) |
Definition at line 54 of file Utils.cpp.
References arm_compute::utils::cast::U.
DATA_TEST_CASE | ( | RoundFloatToNearestUp | , |
framework::DatasetMode::ALL | , | ||
zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 3.f, 3.f, -3.f, -4.f, -4.f, -4.f, -5.f })) | , | ||
value | , | ||
result | |||
) |
Definition at line 70 of file Utils.cpp.
DATA_TEST_CASE | ( | RoundFloatToZero | , |
framework::DatasetMode::ALL | , | ||
zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 1.f, 2.f, 2.f, -3.f, -3.f, -3.f, -4.f, -4.f })) | , | ||
value | , | ||
result | |||
) |
Definition at line 63 of file Utils.cpp.
DATA_TEST_CASE | ( | RoundHalfEven | , |
framework::DatasetMode::ALL | , | ||
zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 2.f, 3.f, -3.f, -4.f, -4.f, -4.f, -4.f })) | , | ||
value | , | ||
result | |||
) |
Definition at line 47 of file Utils.cpp.
DATA_TEST_CASE | ( | RoundHalfUp | , |
framework::DatasetMode::ALL | , | ||
zip(framework::dataset::make("FloatIn", { 1.f, 1.2f, 1.5f, 2.5f, 2.9f, -3.f, -3.5f, -3.8f, -4.3f, -4.5f }), framework::dataset::make("FloatOut", { 1.f, 1.f, 2.f, 3.f, 3.f, -3.f, -3.f, -4.f, -4.f, -4.f })) | , | ||
value | , | ||
result | |||
) |
Definition at line 40 of file Utils.cpp.