blob: de6bef4c08d185eb5a47a4108e2b2220c258c53c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include <armnn/BackendId.hpp>
#include <armnn/Types.hpp>
#include <doctest/doctest.h>
using namespace armnn;
TEST_SUITE("BackendIdTests")
{
TEST_CASE("CreateBackendIdFromCompute")
{
BackendId fromCompute{Compute::GpuAcc};
CHECK(fromCompute.Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
}
TEST_CASE("CreateBackendIdVectorFromCompute")
{
std::vector<BackendId> fromComputes = {Compute::GpuAcc, Compute::CpuRef};
CHECK(fromComputes[0].Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
CHECK(fromComputes[1].Get() == GetComputeDeviceAsCString(Compute::CpuRef));
}
}
|