ArmNN
 21.11
BackendIdTests.cpp File Reference
#include <armnn/BackendId.hpp>
#include <armnn/Types.hpp>
#include <doctest/doctest.h>

Go to the source code of this file.

Functions

 TEST_SUITE ("BackendIdTests")
 

Function Documentation

◆ TEST_SUITE()

TEST_SUITE ( "BackendIdTests"  )

Definition at line 13 of file BackendIdTests.cpp.

References armnn::CpuRef, armnn::GetComputeDeviceAsCString(), and armnn::GpuAcc.

14 {
15 TEST_CASE("CreateBackendIdFromCompute")
16 {
17  BackendId fromCompute{Compute::GpuAcc};
18  CHECK(fromCompute.Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
19 }
20 
21 TEST_CASE("CreateBackendIdVectorFromCompute")
22 {
23  std::vector<BackendId> fromComputes = {Compute::GpuAcc, Compute::CpuRef};
24  CHECK(fromComputes[0].Get() == GetComputeDeviceAsCString(Compute::GpuAcc));
25  CHECK(fromComputes[1].Get() == GetComputeDeviceAsCString(Compute::CpuRef));
26 }
27 
28 }
constexpr char const * GetComputeDeviceAsCString(Compute compute)
Deprecated function that will be removed together with the Compute enum.
Definition: BackendId.hpp:34