From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_flow_control_8cpp.xhtml | 169 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 21.02/_flow_control_8cpp.xhtml (limited to '21.02/_flow_control_8cpp.xhtml') diff --git a/21.02/_flow_control_8cpp.xhtml b/21.02/_flow_control_8cpp.xhtml new file mode 100644 index 0000000000..4b40ea5f9c --- /dev/null +++ b/21.02/_flow_control_8cpp.xhtml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/FlowControl.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
FlowControl.cpp File Reference
+
+
+
#include <armnn/Descriptors.hpp>
+#include <armnn/IRuntime.hpp>
+#include <armnn/INetwork.hpp>
+#include <boost/test/unit_test.hpp>
+#include <set>
+
+

Go to the source code of this file.

+ + + + +

+Functions

 BOOST_AUTO_TEST_CASE (ErrorOnLoadNetwork)
 
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE()

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (ErrorOnLoadNetwork )
+
+ +

Definition at line 16 of file FlowControl.cpp.

+ +

References armnn::Boolean, BOOST_AUTO_TEST_SUITE_END(), IOutputSlot::Connect(), armnn::CpuRef, IRuntime::Create(), INetwork::Create(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::Optimize(), and IOutputSlot::SetTensorInfo().

+
17 {
18  using namespace armnn;
19 
20  // Create runtime in which test will run
22  IRuntimePtr runtime(IRuntime::Create(options));
23 
24  // build up the structure of the network
25  // It's equivalent to something like
26  // if (0) {} else {}
28 
29  std::vector<uint8_t> falseData = {0};
30  ConstTensor falseTensor(armnn::TensorInfo({1}, armnn::DataType::Boolean), falseData);
31  IConnectableLayer* constLayer = net->AddConstantLayer(falseTensor, "const");
33 
34  IConnectableLayer* input = net->AddInputLayer(0);
36 
37  IConnectableLayer* switchLayer = net->AddSwitchLayer("switch");
40 
41  IConnectableLayer* mergeLayer = net->AddMergeLayer("merge");
43 
44  IConnectableLayer* output = net->AddOutputLayer(0);
45 
46  input->GetOutputSlot(0).Connect(switchLayer->GetInputSlot(0));
47  constLayer->GetOutputSlot(0).Connect(switchLayer->GetInputSlot(1));
48  switchLayer->GetOutputSlot(0).Connect(mergeLayer->GetInputSlot(0));
49  switchLayer->GetOutputSlot(1).Connect(mergeLayer->GetInputSlot(1));
50  mergeLayer->GetOutputSlot(0).Connect(output->GetInputSlot(0));
51 
52  // optimize the network
53  std::vector<BackendId> backends = {Compute::CpuRef};
54  std::vector<std::string> errMessages;
55 
56  try
57  {
58  Optimize(*net, backends, runtime->GetDeviceSpec(), OptimizerOptions(), errMessages);
59  BOOST_FAIL("Should have thrown an exception.");
60  }
61  catch (const InvalidArgumentException& e)
62  {
63  // Different exceptions are thrown on different backends
64  }
65  BOOST_TEST(errMessages.size() > 0);
66 }
static IRuntimePtr Create(const CreationOptions &options)
Definition: Runtime.cpp:37
+
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:62
+ +
CPU Execution: Reference C++ kernels.
+ +
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
Definition: IRuntime.hpp:26
+
Copyright (c) 2021 ARM Limited and Contributors.
+
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
+
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())
Create an optimized version of the network.
Definition: Network.cpp:1502
+
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:314
+ + + +
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
+
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
+
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:173
+
virtual int Connect(IInputSlot &destination)=0
+
static INetworkPtr Create(NetworkOptions networkOptions={})
Definition: Network.cpp:510
+
+
+
+
+
+ + + + -- cgit v1.2.1