blob: 8cc918f4c8f40b788a682a0138f8806b97910c97 [file] [log] [blame]
John Richardson2f498e42018-06-07 10:12:07 +01001/*
2 * Copyright (c) 2018 ARM Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#include "arm_compute/core/Types.h"
25#include "arm_compute/runtime/CL/CLTensor.h"
26#include "arm_compute/runtime/CL/functions/CLCannyEdge.h"
27#include "tests/CL/CLAccessor.h"
28#include "tests/benchmark/fixtures/CannyEdgeFixture.h"
29#include "tests/datasets/BorderModeDataset.h"
30#include "tests/datasets/ImageFileDatasets.h"
31#include "tests/framework/Macros.h"
32#include "tests/framework/datasets/Datasets.h"
33#include "utils/TypePrinter.h"
34
35namespace arm_compute
36{
37namespace test
38{
39namespace benchmark
40{
41namespace
42{
43// *INDENT-OFF*
44// clang-format off
John Richardson2f498e42018-06-07 10:12:07 +010045const auto canny_edge_dataset = combine(framework::dataset::make("GradientSize", { 3, 5, 7 }),
46 combine(framework::dataset::make("Normalization", { MagnitudeType::L1NORM, MagnitudeType::L2NORM }),
Georgios Pinitas09d34512018-08-30 16:02:11 +010047 datasets::BorderModes()));
John Richardson2f498e42018-06-07 10:12:07 +010048} // namespace
49
50using CLCannyEdgeFixture = CannyEdgeFixture<CLTensor, CLCannyEdge, CLAccessor>;
51
52TEST_SUITE(CL)
53TEST_SUITE(CannyEdge)
54
55REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLCannyEdgeFixture, framework::DatasetMode::PRECOMMIT,
56 combine(combine(
57 datasets::SmallImageFiles(),
58 canny_edge_dataset),
59 framework::dataset::make("Format", Format::U8)));
60
61REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLCannyEdgeFixture, framework::DatasetMode::NIGHTLY,
62 combine(combine(
63 datasets::LargeImageFiles(),
64 canny_edge_dataset),
65 framework::dataset::make("Format", Format::U8)));
66// clang-format on
67// *INDENT-ON*
68
69TEST_SUITE_END() // CannyEdge
70TEST_SUITE_END() // CL
71} // namespace benchmark
72} // namespace test
73} // namespace arm_compute