2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
5 #include <boost/test/unit_test.hpp>
7 #include <armnn/BackendId.hpp>
8 #include <armnn/Types.hpp>
10 using namespace armnn;
12 BOOST_AUTO_TEST_SUITE(BackendIdTests)
14 BOOST_AUTO_TEST_CASE(CreateBackendIdFromCompute)
16 BackendId fromCompute{Compute::GpuAcc};
17 BOOST_TEST(fromCompute.Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
20 BOOST_AUTO_TEST_CASE(CreateBackendIdVectorFromCompute)
22 std::vector<BackendId> fromComputes = {Compute::GpuAcc, Compute::CpuRef};
23 BOOST_TEST(fromComputes[0].Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
24 BOOST_TEST(fromComputes[1].Get() == GetComputeDeviceAsCString(Compute::CpuRef));
27 BOOST_AUTO_TEST_SUITE_END()