From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_get_buffer_8cpp.xhtml | 231 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 20.02/_get_buffer_8cpp.xhtml (limited to '20.02/_get_buffer_8cpp.xhtml') diff --git a/20.02/_get_buffer_8cpp.xhtml b/20.02/_get_buffer_8cpp.xhtml new file mode 100644 index 0000000000..bb3047ec9a --- /dev/null +++ b/20.02/_get_buffer_8cpp.xhtml @@ -0,0 +1,231 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfLiteParser/test/GetBuffer.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GetBuffer.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "ParserFlatbuffersFixture.hpp"
+#include "../TfLiteParser.hpp"
+#include <sstream>
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

 BOOST_FIXTURE_TEST_CASE (GetBufferCheckContents, GetBufferFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetBufferCheckEmpty, GetBufferFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetBufferCheckParseException, GetBufferFixture)
 
+

Function Documentation

+ +

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetBufferCheckContents ,
GetBufferFixture  
)
+
+ +

Definition at line 101 of file GetBuffer.cpp.

+
102 {
103  //Check contents of buffer are correct
104  TfLiteParser::ModelPtr model = TfLiteParser::LoadModelFromBinary(m_GraphBinary.data(), m_GraphBinary.size());
105  std::vector<int32_t> bufferValues = {2,1,0,6,2,1,4,1,2};
106  CheckBufferContents(model, bufferValues, 2);
107 }
std::unique_ptr< onnx::ModelProto > ModelPtr
Definition: OnnxParser.hpp:23
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetBufferCheckEmpty ,
GetBufferFixture  
)
+
+ +

Definition at line 109 of file GetBuffer.cpp.

+ +

References BOOST_CHECK().

+
110 {
111  //Check if test fixture buffers are empty or not
112  TfLiteParser::ModelPtr model = TfLiteParser::LoadModelFromBinary(m_GraphBinary.data(), m_GraphBinary.size());
113  BOOST_CHECK(TfLiteParser::GetBuffer(model, 0)->data.empty());
114  BOOST_CHECK(TfLiteParser::GetBuffer(model, 1)->data.empty());
115  BOOST_CHECK(!TfLiteParser::GetBuffer(model, 2)->data.empty());
116  BOOST_CHECK(TfLiteParser::GetBuffer(model, 3)->data.empty());
117 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
+
std::unique_ptr< onnx::ModelProto > ModelPtr
Definition: OnnxParser.hpp:23
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetBufferCheckParseException ,
GetBufferFixture  
)
+
+ +

Definition at line 119 of file GetBuffer.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END().

+
120 {
121  //Check if armnn::ParseException thrown when invalid buffer index used
122  TfLiteParser::ModelPtr model = TfLiteParser::LoadModelFromBinary(m_GraphBinary.data(), m_GraphBinary.size());
123  BOOST_CHECK_THROW(TfLiteParser::GetBuffer(model, 4)->data.empty(), armnn::Exception);
124 }
std::unique_ptr< onnx::ModelProto > ModelPtr
Definition: OnnxParser.hpp:23
+
Base class for all ArmNN exceptions so that users can filter to just those.
Definition: Exceptions.hpp:46
+
+
+
+
+
+ + + + -- cgit v1.2.1